diff --git a/connector/src/main/resources/application.properties b/connector/src/main/resources/application.properties
index 99bfec6c..f6203805 100644
--- a/connector/src/main/resources/application.properties
+++ b/connector/src/main/resources/application.properties
@@ -105,6 +105,8 @@ eidas.ms.auth.eIDAS.szrclient.eidasbind.mds.inject=false
#### matching######
+eidas.ms.auth.eIDAS.matching.byaddress.enable=true
+
# ZMR communication
#eidas.ms.auth.eIDAS.zmrclient.endpoint=http://localhost:1234/demozmr
#eidas.ms.auth.eIDAS.zmrclient.ssl.keyStore.type=jks
diff --git a/connector/src/main/resources/properties/messages.properties b/connector/src/main/resources/properties/messages.properties
index a2aaf95d..cc60cd6e 100644
--- a/connector/src/main/resources/properties/messages.properties
+++ b/connector/src/main/resources/properties/messages.properties
@@ -47,11 +47,8 @@ gui.countryselection.country.is=Iceland
gui.countryselection.country.is.logo.alt=Iceland-eID
gui.countryselection.country.it=Italy
gui.countryselection.country.it.logo.alt=Italy-eID
-<<<<<<< HEAD
gui.countryselection.country.li=Lichtenstein
gui.countryselection.country.li.logo.alt=Lichtensteinische-eID
-=======
->>>>>>> 1ad67c91820de1c7f2b2541f8e39752baac197d2
gui.countryselection.country.lt=Lithuania
gui.countryselection.country.lt.logo.alt=Lithuania-eID
gui.countryselection.country.lv=Latvia
diff --git a/connector/src/main/resources/properties/messages_de.properties b/connector/src/main/resources/properties/messages_de.properties
index 187b7b37..6f470ea0 100644
--- a/connector/src/main/resources/properties/messages_de.properties
+++ b/connector/src/main/resources/properties/messages_de.properties
@@ -48,11 +48,8 @@ gui.countryselection.country.is=Island
gui.countryselection.country.is.logo.alt=Isländische-eID
gui.countryselection.country.it=Italien
gui.countryselection.country.it.logo.alt=Italienische-eID
-<<<<<<< HEAD
gui.countryselection.country.li=Lichtenstein
gui.countryselection.country.li.logo.alt=Lichtensteinische-eID
-=======
->>>>>>> 1ad67c91820de1c7f2b2541f8e39752baac197d2
gui.countryselection.country.lt=Litauen
gui.countryselection.country.lt.logo.alt=Litauische-eID
gui.countryselection.country.lv=Lettland
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java
index 588ea912..9bb7055b 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java
@@ -128,7 +128,10 @@ public class Constants {
public static final String CONIG_PROPS_EIDAS_COMMON_CLIENT_SSL_TRUSTSTORE_NAME = CONIG_PROPS_EIDAS_COMMON_CLIENT
+ ".ssl.trustStore.name";
-
+ /** Enable / Disable matching based on address search **/
+ public static final String CONFIG_PROP_MATCHING_BY_ADDRESS = CONIG_PROPS_EIDAS_PREFIX + ".matching.byaddress.enable";
+
+
// ZMR Client configuration properties
public static final String CONIG_PROPS_EIDAS_ZMRCLIENT = CONIG_PROPS_EIDAS_PREFIX + ".zmrclient";
public static final String CONIG_PROPS_EIDAS_ZMRCLIENT_ENDPOINT = CONIG_PROPS_EIDAS_ZMRCLIENT
@@ -343,6 +346,7 @@ public class Constants {
// UI options
+ public static final String HTML_FORM_ENABLE_MATCHING_BY_ADDRESS_SEARCH = "enableMatchingByAddressSearch";
public static final String HTML_FORM_CREATE_NEW_ERNP_ENTRY = "createNewErnpEntry";
public static final String HTML_FORM_ADVANCED_MATCHING_FAILED = "advancedMatchingFailed";
public static final String HTML_FORM_ADVANCED_MATCHING_FAILED_REASON =
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/SelectedLoginMethod.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/SelectedLoginMethod.java
index 70904e4f..993c0924 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/SelectedLoginMethod.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/SelectedLoginMethod.java
@@ -1,5 +1,5 @@
package at.asitplus.eidas.specific.modules.auth.eidas.v2.dao;
public enum SelectedLoginMethod {
- EIDAS_LOGIN, MOBILE_PHONE_SIGNATURE_LOGIN, NO_OTHER_LOGIN, ADD_ME_AS_NEW
+ EIDAS_LOGIN, MOBILE_PHONE_SIGNATURE_LOGIN, NO_OTHER_LOGIN, ADD_ME_AS_NEW, REQUESTING_NEW_ENTRY
}
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateOtherLoginMethodGuiTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateOtherLoginMethodGuiTask.java
index a90c5929..94b29b8e 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateOtherLoginMethodGuiTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateOtherLoginMethodGuiTask.java
@@ -87,6 +87,11 @@ public class GenerateOtherLoginMethodGuiTask extends AbstractLocaleAuthServletTa
}
}
+ // inject flag for matching-by-address allowed
+ config.putCustomParameter(AbstractGuiFormBuilderConfiguration.PARAM_GROUP_UIOPTIONS,
+ Constants.HTML_FORM_ENABLE_MATCHING_BY_ADDRESS_SEARCH,
+ String.valueOf(basicConfig.getBasicConfigurationBoolean(Constants.CONFIG_PROP_MATCHING_BY_ADDRESS)));
+
// inject request to create a new ERnP entry
config.putCustomParameter(AbstractGuiFormBuilderConfiguration.PARAM_GROUP_UIOPTIONS,
Constants.HTML_FORM_CREATE_NEW_ERNP_ENTRY,
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java
index 184ad499..3fc29c4e 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java
@@ -37,6 +37,8 @@ import com.google.common.collect.Sets;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SelectedLoginMethod;
import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
+import at.gv.egiz.eaaf.core.exceptions.EaafException;
+import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException;
import at.gv.egiz.eaaf.core.impl.idp.controller.tasks.AbstractLocaleAuthServletTask;
import lombok.extern.slf4j.Slf4j;
@@ -73,7 +75,7 @@ public class ReceiveOtherLoginMethodGuiResponseTask extends AbstractLocaleAuthSe
@Override
public void executeWithLocale(ExecutionContext executionContext, HttpServletRequest request,
- HttpServletResponse response) {
+ HttpServletResponse response) throws TaskExecutionException {
try {
SelectedLoginMethod selection = SelectedLoginMethod.valueOf(extractUserSelection(request));
executionContext.put(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK, false);
@@ -82,6 +84,9 @@ public class ReceiveOtherLoginMethodGuiResponseTask extends AbstractLocaleAuthSe
executionContext.remove(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON);
transitionToNextTask(executionContext, selection);
+ } catch (TaskExecutionException e) {
+ throw e;
+
} catch (final Exception e) {
log.error("Parsing selected login method FAILED.", e);
executionContext.put(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED, true);
@@ -100,7 +105,8 @@ public class ReceiveOtherLoginMethodGuiResponseTask extends AbstractLocaleAuthSe
return null;
}
- private void transitionToNextTask(ExecutionContext executionContext, SelectedLoginMethod selection) {
+ private void transitionToNextTask(ExecutionContext executionContext, SelectedLoginMethod selection)
+ throws TaskExecutionException {
switch (selection) {
case EIDAS_LOGIN:
executionContext.put(Constants.TRANSITION_TO_GENERATE_EIDAS_LOGIN, true);
@@ -111,9 +117,22 @@ public class ReceiveOtherLoginMethodGuiResponseTask extends AbstractLocaleAuthSe
return;
case NO_OTHER_LOGIN:
+ if (!authConfig.getBasicConfigurationBoolean(Constants.CONFIG_PROP_MATCHING_BY_ADDRESS)) {
+ log.error("Matching by address was requested but it's disabled by configuration!");
+ throw new TaskExecutionException(pendingReq,
+ "Matching by address was requested but it's disabled by configuration!",
+ new EaafException("module.eidasauth.matching.98"));
+
+ }
+
executionContext.put(Constants.TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK, true);
return;
+
+ case REQUESTING_NEW_ENTRY:
+ executionContext.put(Constants.TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK, true);
+ return;
+
case ADD_ME_AS_NEW:
executionContext.put(Constants.TRANSITION_TO_CREATE_NEW_ERNP_ENTRY_TASK, true);
return;
diff --git a/modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml b/modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml
index dfa8622c..e57f9ca6 100644
--- a/modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml
+++ b/modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml
@@ -45,6 +45,8 @@
from="receiveOtherLoginMethodGuiResponseTask" to="generateMobilePhoneSignatureRequestTask" />
+
diff --git a/modules/authmodule-eIDAS-v2/src/main/resources/messages/eidas_connector_message.properties b/modules/authmodule-eIDAS-v2/src/main/resources/messages/eidas_connector_message.properties
index 6d73c43a..dafa7ce3 100644
--- a/modules/authmodule-eIDAS-v2/src/main/resources/messages/eidas_connector_message.properties
+++ b/modules/authmodule-eIDAS-v2/src/main/resources/messages/eidas_connector_message.properties
@@ -30,5 +30,6 @@ module.eidasauth.matching.24=Matching be using Austrian Identity not possible. U
module.eidasauth.matching.25=Matching be using alternative eIDAS authentication not possible. Provide more or other data or use another method for matching.
module.eidasauth.matching.26=Matching be using alternative eIDAS authentication not possible, because Name or Country not matched. Provide more or other data or use another method for matching.
+module.eidasauth.matching.98=Matching failed, because a method was selected that was not allowed.
module.eidasauth.matching.99=Matching failed, because of an unexpected processing error. Reason: {0}
diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java
index 496158fa..6d08a731 100644
--- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java
+++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java
@@ -29,6 +29,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.json.JsonMapper;
+import at.asitplus.eidas.specific.core.test.config.dummy.MsConnectorDummyConfigMap;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SelectedLoginMethod;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.GenerateOtherLoginMethodGuiTask;
@@ -53,6 +54,8 @@ public class GenerateOtherLoginMethodGuiTaskTest {
private static final String TEST_PATTER_REQ_PARAM =
"";
+ @Autowired MsConnectorDummyConfigMap config;
+
@Autowired
GenerateOtherLoginMethodGuiTask task;
@@ -86,6 +89,9 @@ public class GenerateOtherLoginMethodGuiTaskTest {
executionContext = new ExecutionContextImpl();
+ config.putConfigValue("auth.eIDAS.matching.byaddress.enable", "false");
+
+
LocaleContextHolder.resetLocaleContext();
}
@@ -172,6 +178,10 @@ public class GenerateOtherLoginMethodGuiTaskTest {
assertNotNull("createNewErnpEntry", json.get(Constants.HTML_FORM_CREATE_NEW_ERNP_ENTRY));
assertFalse("createNewErnpEntry", json.get(Constants.HTML_FORM_CREATE_NEW_ERNP_ENTRY).asBoolean());
+ assertNotNull("enableMatchingByAddressSearch", json.get(Constants.HTML_FORM_CREATE_NEW_ERNP_ENTRY));
+ assertFalse("enableMatchingByAddressSearch", json.get(Constants.HTML_FORM_CREATE_NEW_ERNP_ENTRY).asBoolean());
+
+
assertNotNull("pendingRequest not stored",
storage.getPendingRequest(pendingReq.getPendingRequestId()));
@@ -199,10 +209,11 @@ public class GenerateOtherLoginMethodGuiTaskTest {
@Test
public void advancedMatchingFailedMsg() throws TaskExecutionException, UnsupportedEncodingException {
executionContext.put(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED, true);
-
+ config.putConfigValue("auth.eIDAS.matching.byaddress.enable", "true");
+
task.execute(pendingReq, executionContext);
- String html = doBasicValidation();
+ String html = doBasicValidation(true);
Assert.assertFalse("Missing eIDAS infos",
html.contains(MessageFormat.format(TEST_PATTER_REQ_PARAM, SelectedLoginMethod.ADD_ME_AS_NEW)));
Assert.assertTrue("missing errorfield",
@@ -218,7 +229,7 @@ public class GenerateOtherLoginMethodGuiTaskTest {
task.execute(pendingReq, executionContext);
- String html = doBasicValidation();
+ String html = doBasicValidation(false);
Assert.assertTrue("missing errorfield",
html.contains("
task.execute(pendingReq, executionContext));
+
+ assertEquals("wrong errorCode", "module.eidasauth.matching.98",
+ ((EaafException) error.getOriginalException()).getErrorId());
+
+ }
+
@Test
public void withAddMeAsNewSelection() throws TaskExecutionException {
testTransition(SelectedLoginMethod.ADD_ME_AS_NEW, Constants.TRANSITION_TO_CREATE_NEW_ERNP_ENTRY_TASK);
@@ -99,6 +120,14 @@ public class ReceiveOtherLoginMethodGuiResponseTaskTest {
}
+ @Test
+ public void withRequestingNewEntrySelection() throws TaskExecutionException {
+ testTransition(SelectedLoginMethod.REQUESTING_NEW_ENTRY, Constants.TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK);
+ assertEquals("return to selection", true, executionContext.get(Constants.TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK));
+ assertEquals("return to selection", false, executionContext.get(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK));
+
+ }
+
public void testTransition(SelectedLoginMethod loginMethod, String expectedTransition) throws TaskExecutionException {
httpReq.setParameter(Constants.REQ_SELECTED_LOGIN_METHOD_PARAMETER, loginMethod.name());
executionContext.put(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED, true);
@@ -109,6 +138,8 @@ public class ReceiveOtherLoginMethodGuiResponseTaskTest {
assertFalse("wrong process-cancelled flag", executionContext.isProcessCancelled());
assertNotNull("no login-selection found", executionContext.get(Constants.REQ_SELECTED_LOGIN_METHOD_PARAMETER));
assertEquals("Wrong login-selection found", loginMethod.name(), executionContext.get(Constants.REQ_SELECTED_LOGIN_METHOD_PARAMETER));
+
+
assertEquals("Next task", true, executionContext.get(expectedTransition));
assertNull("find advancedMatchingError flag", executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED));
--
cgit v1.2.3
From 8bb5373a38f43d83c041ec0739459e38eb7cc3e2 Mon Sep 17 00:00:00 2001
From: Thomas <>
Date: Fri, 1 Jul 2022 14:48:10 +0200
Subject: feat(matching): optimize order of address search results
---
.../eidas/v2/controller/AdresssucheController.java | 78 ++++++++++++++--------
.../v2/test/utils/AddressSearchResultTest.java | 55 +++++++++++++++
2 files changed, 105 insertions(+), 28 deletions(-)
create mode 100644 modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/utils/AddressSearchResultTest.java
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java
index 6f49c700..1c47f02c 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java
@@ -25,6 +25,7 @@ package at.asitplus.eidas.specific.modules.auth.eidas.v2.controller;
import java.util.Collection;
import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
@@ -67,17 +68,17 @@ public class AdresssucheController {
public static final String PARAM_VILLAGE = "village";
public static final String PARAM_STREET = "street";
public static final String PARAM_NUMBER = "number";
-
+
@Autowired
private ZmrAddressSoapClient client;
@Autowired
private IPendingRequestIdGenerationStrategy pendingReqGeneration;
-
+
/**
* Performs search for addresses in ZMR.
*/
- @RequestMapping(value = {MsEidasNodeConstants.ENDPOINT_RESIDENCY_SEARCH}, method = {RequestMethod.POST})
+ @RequestMapping(value = { MsEidasNodeConstants.ENDPOINT_RESIDENCY_SEARCH }, method = { RequestMethod.POST })
public ResponseEntity search(
@RequestParam(PARAM_POSTLEITZAHL) String postleitzahl,
@RequestParam(PARAM_MUNIPICALITY) String municipality,
@@ -90,26 +91,26 @@ public class AdresssucheController {
municipality.replaceAll("[\r\n]", ""),
village.replaceAll("[\r\n]", ""),
street.replaceAll("[\r\n]", ""),
- number.replaceAll("[\r\n]", ""));
+ number.replaceAll("[\r\n]", ""));
try {
pendingReqGeneration.validateAndGetPendingRequestId(pendingId);
-
- } catch (PendingReqIdValidationException e) {
+
+ } catch (final PendingReqIdValidationException e) {
log.warn("Search with pendingId '{}' is not valid", pendingId.replaceAll("[\r\n]", ""));
return ResponseEntity.badRequest().build();
-
+
}
-
+
try {
- Adressdaten searchInput = buildSearchInput(postleitzahl, municipality, village, street, number);
- ZmrAddressSoapClient.AddressInfo searchOutput = client.searchAddress(searchInput);
- AdresssucheResult output = buildResponse(searchOutput);
+ final Adressdaten searchInput = buildSearchInput(postleitzahl, municipality, village, street, number);
+ final ZmrAddressSoapClient.AddressInfo searchOutput = client.searchAddress(searchInput);
+ final AdresssucheResult output = buildResponse(searchOutput);
return ResponseEntity.ok(output);
-
- } catch (EidasSAuthenticationException e) {
+
+ } catch (final EidasSAuthenticationException e) {
log.warn("Search failed", e);
return ResponseEntity.badRequest().build();
-
+
}
}
@@ -117,27 +118,27 @@ public class AdresssucheController {
if (searchOutput.getPersonResult().isEmpty()) {
log.warn("No result from ZMR");
return new AdresssucheResult(Collections.emptyList(), 0);
-
+
}
-
+
log.info("Result level is {}", searchOutput.getLevel());
- Set result = searchOutput.getPersonResult().stream()
+ final Set result = searchOutput.getPersonResult().stream()
.map(Adressdaten::getPostAdresse)
.map(it -> new AdresssucheOutput(it.getPostleitzahl(), it.getGemeinde(), it.getOrtschaft(),
it.getZustelladresse().getStrassenname(), it.getZustelladresse().getOrientierungsnummer()))
.collect(Collectors.toSet());
// TODO Add configuration option for the limit of 30
- List sorted = result.stream().sorted().limit(30).collect(Collectors.toList());
+ final List sorted = result.stream().sorted().limit(30).collect(Collectors.toList());
return new AdresssucheResult(sorted, result.size());
-
+
}
private Adressdaten buildSearchInput(String postleitzahl,
- String municipality,
- String village,
- String street,
- String number) {
- PostAdresseTyp postAdresse = new PostAdresseTyp();
+ String municipality,
+ String village,
+ String street,
+ String number) {
+ final PostAdresseTyp postAdresse = new PostAdresseTyp();
if (StringUtils.isNotBlank(postleitzahl)) {
postAdresse.setPostleitzahl(postleitzahl);
}
@@ -148,7 +149,7 @@ public class AdresssucheController {
postAdresse.setOrtschaft(village);
}
if (StringUtils.isNotBlank(street) || StringUtils.isNotBlank(number)) {
- ZustelladresseTyp zustelladresse = new ZustelladresseTyp();
+ final ZustelladresseTyp zustelladresse = new ZustelladresseTyp();
if (StringUtils.isNotBlank(street)) {
zustelladresse.setStrassenname(street);
}
@@ -157,10 +158,10 @@ public class AdresssucheController {
}
postAdresse.setZustelladresse(zustelladresse);
}
- Adressdaten searchInput = new Adressdaten();
+ final Adressdaten searchInput = new Adressdaten();
searchInput.setPostAdresse(postAdresse);
return searchInput;
-
+
}
@Data
@@ -187,9 +188,30 @@ public class AdresssucheController {
.append(this.municipality, o.municipality)
.append(this.village, o.village)
.append(this.street, o.street)
- .append(this.number, o.number)
+
+ /*
+ * TODO: implement better sort method, because current version results to 1, 10,
+ * 11, .... 2, 20, 21
+ */
+ .appendSuper(getCustomIntegerComperatpr().compare(this.number, o.number))
+
.toComparison();
}
+
+ private Comparator getCustomIntegerComperatpr() {
+ return new Comparator() {
+ @Override
+ public int compare(String o1, String o2) {
+ return extractInt(o1) - extractInt(o2);
+ }
+
+ int extractInt(String s) {
+ final String num = s.replaceAll("\\D", "");
+ // return 0 if no digits found
+ return num.isEmpty() ? 0 : Integer.parseInt(num);
+ }
+ };
+ }
}
}
diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/utils/AddressSearchResultTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/utils/AddressSearchResultTest.java
new file mode 100644
index 00000000..89692ab7
--- /dev/null
+++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/utils/AddressSearchResultTest.java
@@ -0,0 +1,55 @@
+package at.asitplus.eidas.specific.modules.auth.eidas.v2.test.utils;
+
+import static org.junit.Assert.assertArrayEquals;
+
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.BlockJUnit4ClassRunner;
+import org.mockito.internal.util.collections.Sets;
+
+import at.asitplus.eidas.specific.modules.auth.eidas.v2.controller.AdresssucheController.AdresssucheOutput;
+
+@RunWith(BlockJUnit4ClassRunner.class)
+public class AddressSearchResultTest {
+
+ @Test
+ public void checkNumbers() {
+
+ Set result = Sets.newSet(
+ buildRandom("2"),
+ buildRandom("3"),
+ buildRandom("1"),
+ buildRandom("10"),
+ buildRandom("10-12"),
+ buildRandom("15")
+ );
+
+ final List sorted = result.stream().sorted().limit(30)
+ .map(el -> el.getNumber())
+ .collect(Collectors.toList());
+
+
+ assertArrayEquals("wrong order",
+ new Object[]{"1", "2", "3", "10", "15", "10-12"},
+ sorted.toArray());
+
+
+
+
+ }
+
+ private AdresssucheOutput buildRandom(String number) {
+ return AdresssucheOutput.builder()
+ .municipality("aaaaaaaa")
+ .postleitzahl("8080")
+ .street("bbbbb")
+ .number(number)
+ .village("cccccc")
+ .build();
+ }
+
+}
--
cgit v1.2.3
From 590404735d3ee5c4da714cf4faf7ef16d3ed35bc Mon Sep 17 00:00:00 2001
From: Thomas <>
Date: Fri, 1 Jul 2022 14:56:29 +0200
Subject: feat(matching): add configuration property to define max. results for
address searching
---
.../src/main/resources/application.properties | 1 +
.../specific/modules/auth/eidas/v2/Constants.java | 6 +++++-
.../eidas/v2/controller/AdresssucheController.java | 24 +++++++++++++++++++++-
3 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/connector/src/main/resources/application.properties b/connector/src/main/resources/application.properties
index f6203805..6b6af637 100644
--- a/connector/src/main/resources/application.properties
+++ b/connector/src/main/resources/application.properties
@@ -106,6 +106,7 @@ eidas.ms.auth.eIDAS.szrclient.eidasbind.mds.inject=false
#### matching######
eidas.ms.auth.eIDAS.matching.byaddress.enable=true
+eidas.ms.auth.eIDAS.matching.byaddress.maxresults=250
# ZMR communication
#eidas.ms.auth.eIDAS.zmrclient.endpoint=http://localhost:1234/demozmr
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java
index 9bb7055b..ce1d2a11 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java
@@ -130,7 +130,11 @@ public class Constants {
/** Enable / Disable matching based on address search **/
public static final String CONFIG_PROP_MATCHING_BY_ADDRESS = CONIG_PROPS_EIDAS_PREFIX + ".matching.byaddress.enable";
-
+
+ public static final String CONFIG_PROP_MATCHING_BY_ADDRESS_MAX_RESULTS =
+ CONIG_PROPS_EIDAS_PREFIX + ".matching.byaddress.maxresults";
+ public static final String DEFAULT_MATCHING_BY_ADDRESS_MAX_RESULTS = "250";
+
// ZMR Client configuration properties
public static final String CONIG_PROPS_EIDAS_ZMRCLIENT = CONIG_PROPS_EIDAS_PREFIX + ".zmrclient";
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java
index 1c47f02c..4bb1343a 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java
@@ -41,12 +41,14 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import at.asitplus.eidas.specific.core.MsEidasNodeConstants;
+import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.clients.zmr.ZmrAddressSoapClient;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.exception.EidasSAuthenticationException;
import at.gv.bmi.namespace.zmr_su.zrm._20040201_.address.Adressdaten;
import at.gv.e_government.reference.namespace.persondata.de._20040201.PostAdresseTyp;
import at.gv.e_government.reference.namespace.persondata.de._20040201.ZustelladresseTyp;
import at.gv.egiz.eaaf.core.api.data.EaafConstants;
+import at.gv.egiz.eaaf.core.api.idp.IConfiguration;
import at.gv.egiz.eaaf.core.api.utils.IPendingRequestIdGenerationStrategy;
import at.gv.egiz.eaaf.core.exceptions.PendingReqIdValidationException;
import lombok.AllArgsConstructor;
@@ -69,6 +71,8 @@ public class AdresssucheController {
public static final String PARAM_STREET = "street";
public static final String PARAM_NUMBER = "number";
+ @Autowired IConfiguration basicConfig;
+
@Autowired
private ZmrAddressSoapClient client;
@@ -128,11 +132,29 @@ public class AdresssucheController {
it.getZustelladresse().getStrassenname(), it.getZustelladresse().getOrientierungsnummer()))
.collect(Collectors.toSet());
// TODO Add configuration option for the limit of 30
- final List sorted = result.stream().sorted().limit(30).collect(Collectors.toList());
+
+ final List sorted = result.stream()
+ .sorted()
+ .limit(getMaxResults())
+ .collect(Collectors.toList());
+
return new AdresssucheResult(sorted, result.size());
}
+ private long getMaxResults() {
+ String maxSearchResults = basicConfig.getBasicConfiguration(
+ Constants.CONFIG_PROP_MATCHING_BY_ADDRESS_MAX_RESULTS,
+ Constants.DEFAULT_MATCHING_BY_ADDRESS_MAX_RESULTS);
+ try {
+ return Long.valueOf(maxSearchResults);
+
+ } catch (Exception e) {
+ log.warn("Invalid number of max. addressSearchResults. Using default value", e);
+ return Long.valueOf(Constants.DEFAULT_MATCHING_BY_ADDRESS_MAX_RESULTS);
+ }
+ }
+
private Adressdaten buildSearchInput(String postleitzahl,
String municipality,
String village,
--
cgit v1.2.3
From 7a5060da48321a335a078eb248dadf049b3320d0 Mon Sep 17 00:00:00 2001
From: Thomas <>
Date: Fri, 1 Jul 2022 15:16:38 +0200
Subject: chore(core): update GUI descriptions for matching process
---
basicConfig/properties/messages.properties | 17 +++++++++--------
basicConfig/properties/messages_de.properties | 13 +++++++------
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/basicConfig/properties/messages.properties b/basicConfig/properties/messages.properties
index 8d2b692c..bac206f0 100644
--- a/basicConfig/properties/messages.properties
+++ b/basicConfig/properties/messages.properties
@@ -151,7 +151,7 @@ gui.countryselection.country.uk.img = /img/countries/UnitedKingdom-EU_.png
gui.otherlogin.title=eIDAS-Login Other Login Methods
gui.otherlogin.header.selection=Personal data not found
-gui.otherlogin.info.first=Your personal data from the conducted EU login could not be clearly assigned to any register entry in the registers of the Austrian administration. This may be due to a missing register entry of your personal data, or an incorrect match of your login data and your register entry stored in the registers.
+gui.otherlogin.info.first=Your personal data from the EU login could not be clearly assigned to any register entry in the registers of the Austrian administration. This may be due to a missing register entry of your personal data, or an incorrect match of your login data and your register entry stored in the registers.
gui.otherlogin.info.second=The following describes options to achieve a correct assignment:
gui.otherlogin.info.list.1=If you have an Austrian Mobile-Phone Signature (or ID Austria) or an alternative possibility of an EU login, please log in again using one of these options. For this purpose, please use the corresponding button for “ID Austria” or “Alternative EU-Login”.
gui.otherlogin.info.list.2=If you do not have either of the two additional registration options mentioned above, please continue with the button “No alternative login”.
@@ -162,9 +162,9 @@ gui.otherlogin.button.none=No alternative login
gui.otherlogin.button.inserternp=Create new register entry
gui.otherlogin.cancel=Cancel
-gui.otherlogin.inserternp.header.selection=Re-registration
+gui.otherlogin.inserternp.header.selection=New registration
gui.otherlogin.inserternp.first=Your personal data could not be clearly assigned to any entry in the registers of the Austrian administration.
-gui.otherlogin.inserternp.second=Allow the re-registration of your personal data in the registers of the Austrian administration to complete the registration process successfully.
+gui.otherlogin.inserternp.second=Allow the registration of your personal data in the registers of the Austrian administration to complete the registration process successfully.
gui.otherlogin.inserternp.third.prefix=Attention: If you think you already have an entry in the registers of the Austrian administration, it is recommended not to allow your data to be entered again at this point in order to avoid double entries. In this case, please contact
gui.otherlogin.inserternp.third.postfix=, to arrange a manual assignment of your personal data.
@@ -190,10 +190,10 @@ module.eidasauth.matching.99=Matching failed, because of an unexpected processin
gui.residency.title=Austrian Residency
gui.residency.header.selection=Search for Austrian residence
gui.residency.header.help=You can search for the address that you have been registered at in the past. Please enter a \
- postcode, municipality or village first to start the search.
+ postal code, municipality, or city first to start the search.
gui.residency.info.first=If you have a current or former registered residence in Austria, an assignment to your existing register entry can be made by entering the residence data. Please use the form below to enter your residence details.
-gui.residency.info.second=First, please enter a postal code, municipality or locality and subsequently start the search for your home address using the "Search" button. Afterwards, you will be interactively supported in completing the address of residence, where you just have to follow the instructions on the form. You can restart the search process at any time by clicking the button "Delete". If all residence data has been filled in completely via the search function, please continue with the button "Continue".
+gui.residency.info.second=First, please enter a postal code, municipality, or city and subsequently start the search for your home address using the "Search" button. Afterwards, you will be interactively supported in completing the address of residence, where you just have to follow the instructions on the form. You can restart the search process at any time by clicking the button "Clear". If all residence data has been filled in completely via the search function, please continue with the button "Continue".
gui.residency.info.third=If you do not have a current or former place of residence in Austria, please continue with the button "No residence available".
gui.residency.header.inputinvalid=Be sure to enter a value for Municipality or Village
@@ -203,12 +203,13 @@ gui.residency.search=Search
gui.residency.clear=Clear
gui.residency.proceed=Continue
gui.residency.updated=Updated your input
+gui.residency.noentry=no results found
gui.residency.found=Found {0} results, click on one result to refine your search
-gui.residency.unique=Unique result found, please proceed
+gui.residency.unique=Unique result found, please proceed by clicking button Continue
gui.residency.error=Error on Backend Call
-gui.residency.input.postleitzahl=Postcode
+gui.residency.input.postleitzahl=Postal Code
gui.residency.input.municipality=Municipality
-gui.residency.input.village=Village
+gui.residency.input.village=City
gui.residency.input.street=Street
gui.residency.input.number=Number
diff --git a/basicConfig/properties/messages_de.properties b/basicConfig/properties/messages_de.properties
index 76624ebe..1686e388 100644
--- a/basicConfig/properties/messages_de.properties
+++ b/basicConfig/properties/messages_de.properties
@@ -104,16 +104,16 @@ gui.countryselection.mode.dev=Development
##Other Login Methods page
gui.otherlogin.title=eIDAS-Login Alternative Anmeldemethoden
gui.otherlogin.header.selection=Personendaten nicht gefunden
-gui.otherlogin.button.hs=ID Austria
-gui.otherlogin.button.eidas=Alternativer eIDAS Login
+gui.otherlogin.button.hs=Handy-Signatur
+gui.otherlogin.button.eidas=Alternativer EU-Login
gui.otherlogin.button.none=Keine alternative Anmeldemöglichkeit
-gui.otherlogin.button.inserternp=Eine neue österreichische Identity auf Basis meiner eIDAS Daten erzeugen
+gui.otherlogin.button.inserternp=Eine neue österreichische elektronische Identität auf Basis meiner eIDAS Daten erzeugen
gui.otherlogin.cancel=Abbrechen
gui.otherlogin.info.first=Ihre Personendaten aus dem eben erfolgten EU-Login konnten in den Registern der österreichischen Verwaltung keinem Registereintrag eindeutig zugeordnet werden. Das kann daran liegen, dass Sie in den Registern bisher nicht eingetragen sind, oder ihre aktuellen Anmeldedaten nicht vollständig mit den in den Registern hinterlegten Daten zu Ihrer Person übereinstimmen.
gui.otherlogin.info.second=Sie haben folgende Möglichkeiten, um eine korrekte Zuordnung zu erreichen:
-gui.otherlogin.info.list.1=Wenn Sie über eine österreichische ID Austria (oder Handy-Signatur) oder über eine alternative Möglichkeit eines EU-Logins verfügen, melden Sie sich mit diesen bitte erneut an. Verwenden Sie dazu bitte die entsprechende Schaltfläche „ID Austria“ oder „Alternativer EU-Login“.
-gui.otherlogin.info.list.2=Verfügen Sie über keine der beiden oben genannten zusätzlichen Anmeldemöglichkeiten, setzen Sie bitte über die Schaltfläche „Keine alternative Anmeldemöglichkeit“ fort
+gui.otherlogin.info.list.1=Wenn Sie über eine österreichische Handy-Signatur (oder ID Austria) oder über eine alternative Möglichkeit eines EU-Logins verfügen, melden Sie sich mit diesen bitte erneut an. Verwenden Sie dazu bitte die entsprechende Schaltfläche "Handy-Signatur" oder "Alternativer EU-Login".
+gui.otherlogin.info.list.2=Verfügen Sie über keine der beiden oben genannten zusätzlichen Anmeldemöglichkeiten, setzen Sie bitte über Schaltfläche "Keine alternative Anmeldemöglichkeit" fort.
gui.otherlogin.inserternp.header.selection=Neueintragung
gui.otherlogin.inserternp.first=Ihre Personendaten konnten in den Registern der österreichischen Verwaltung keinem Eintrag eindeutig zugeordnet werden.
@@ -134,7 +134,7 @@ module.eidasauth.matching.99=Matching schlug Aufgrund eines internen Fehler fehl
##Austrian Residency page
gui.residency.title=Österreichischer Wohnsitz
gui.residency.header.selection=Suche nach Österreichischem Wohnsitz
-gui.residency.header.help=Hier können Sie nach einem Wohnsitze in Österreich suchen. Bitte geben Sie zuerst eine \
+gui.residency.header.help=Hier können Sie nach einem Wohnsitz in Österreich suchen. Bitte geben Sie zuerst eine \
Postleitzahl, Gemeinde oder Ortschaft ein um die Suche zu starten.
gui.residency.info.first=Haben Sie einen aktuellen oder ehemaligen gemeldeten Wohnsitz in Österreich, kann eine Zuordnung zu Ihrem bestehenden Registereintrag über Eingabe der Wohnsitzdaten erfolgen. Bitte benutzen Sie das untenstehende Formular, um Ihre Wohnsitzdaten einzugeben.
@@ -148,6 +148,7 @@ gui.residency.search=Suche
gui.residency.clear=Löschen
gui.residency.proceed=Fortfahren
gui.residency.updated=Eingabe aktualisiert
+gui.residency.noentry=keine Ergebnisse gefunden
gui.residency.found={0} Ergebnisse gefunden, klicken Sie auf ein Ergebnis um die Suche zu verfeinern
gui.residency.unique=Eindeutiges Ergebnis gefunden, bitte fortfahren
gui.residency.error=Fehler bei Addresssuche
--
cgit v1.2.3
From 62bea15ec763f09f2a8df1ba4266804b4e8641c3 Mon Sep 17 00:00:00 2001
From: Thomas <>
Date: Fri, 1 Jul 2022 15:58:16 +0200
Subject: fix(matching): add null-check in custom comperator for address-search
results
---
.../auth/eidas/v2/controller/AdresssucheController.java | 12 +++++++++---
.../auth/eidas/v2/test/utils/AddressSearchResultTest.java | 3 ++-
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java
index 4bb1343a..6faa35fd 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java
@@ -228,9 +228,15 @@ public class AdresssucheController {
}
int extractInt(String s) {
- final String num = s.replaceAll("\\D", "");
- // return 0 if no digits found
- return num.isEmpty() ? 0 : Integer.parseInt(num);
+ if (StringUtils.isNotEmpty(s)) {
+ final String num = s.replaceAll("\\D", "");
+ // return 0 if no digits found
+ return num.isEmpty() ? 0 : Integer.parseInt(num);
+
+ } else {
+ return 0;
+
+ }
}
};
}
diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/utils/AddressSearchResultTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/utils/AddressSearchResultTest.java
index 89692ab7..fef157db 100644
--- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/utils/AddressSearchResultTest.java
+++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/utils/AddressSearchResultTest.java
@@ -24,6 +24,7 @@ public class AddressSearchResultTest {
buildRandom("3"),
buildRandom("1"),
buildRandom("10"),
+ buildRandom(null),
buildRandom("10-12"),
buildRandom("15")
);
@@ -34,7 +35,7 @@ public class AddressSearchResultTest {
assertArrayEquals("wrong order",
- new Object[]{"1", "2", "3", "10", "15", "10-12"},
+ new Object[]{null, "1", "2", "3", "10", "15", "10-12"},
sorted.toArray());
--
cgit v1.2.3
From f2a32b225c243e2cf8b5b368cc6ac4611ce3a476 Mon Sep 17 00:00:00 2001
From: Thomas <>
Date: Fri, 1 Jul 2022 15:59:01 +0200
Subject: feat(matching): distiguish between empty and non empty address-search
results
---
basicConfig/templates/residency.html | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/basicConfig/templates/residency.html b/basicConfig/templates/residency.html
index 26812ec0..de77269f 100644
--- a/basicConfig/templates/residency.html
+++ b/basicConfig/templates/residency.html
@@ -33,6 +33,7 @@
function search() {
let updatedText = /*[[#{gui.residency.updated}]]*/ 'Updated text';
let errorText = /*[[#{gui.residency.error}]]*/ 'Error';
+ let emptyText = /*[[#{gui.residency.noentry}]]*/ 'Found {0}'
let foundText = /*[[#{gui.residency.found}]]*/ 'Found {0}';
let uniqueText = /*[[#{gui.residency.unique}]]*/ 'Unique';
let invalidInputText = /*[[#{gui.residency.header.inputinvalid}]]*/ 'Invalid';
@@ -57,7 +58,12 @@
$("#inputForm #inputNumber").val(data["results"][0]["number"]);
return;
}
- $("#textResult").show().text(foundText.replace("{0}", data["resultCount"]));
+
+ if (data["resultCount"] === 0) {
+ $("#textResult").show().text(emptyText);
+ } else {
+ $("#textResult").show().text(foundText.replace("{0}", data["resultCount"]));
+ }
$("#tableResult").show();
$("#tableResult tbody").empty();
$.each(data.results, function (i, output) {
--
cgit v1.2.3
From e3afbc7442ad3893e7615d50747c03f600eb1a1b Mon Sep 17 00:00:00 2001
From: Thomas <>
Date: Fri, 1 Jul 2022 16:41:00 +0200
Subject: feat(core): update statistic-logger to include matching results
---
basicConfig/templates/other_login_method.html | 2 +-
.../specific/modules/auth/eidas/v2/Constants.java | 2 +-
.../auth/eidas/v2/dao/SelectedLoginMethod.java | 2 +-
.../auth/eidas/v2/tasks/AlternativeSearchTask.java | 2 ++
.../eidas/v2/tasks/CreateNewErnpEntryTask.java | 4 +++-
.../auth/eidas/v2/tasks/InitialSearchTask.java | 5 ++++-
.../ReceiveAustrianResidenceGuiResponseTask.java | 5 ++++-
.../ReceiveMobilePhoneSignatureResponseTask.java | 2 ++
.../ReceiveOtherLoginMethodGuiResponseTask.java | 16 ++++++++++++----
.../auth/eidas/v2/utils/MatchingTaskUtils.java | 22 +++++++++++++++++++++-
...ReceiveOtherLoginMethodGuiResponseTaskTest.java | 11 +++++++++++
.../eidas/specific/core/MsEidasNodeConstants.java | 14 ++++++++++++++
.../specific/core/logger/StatisticLogger.java | 18 +++++++++++++++---
13 files changed, 91 insertions(+), 14 deletions(-)
diff --git a/basicConfig/templates/other_login_method.html b/basicConfig/templates/other_login_method.html
index c5bc9668..31ff74a6 100644
--- a/basicConfig/templates/other_login_method.html
+++ b/basicConfig/templates/other_login_method.html
@@ -150,7 +150,7 @@
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java
index ce1d2a11..66848fcc 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java
@@ -128,7 +128,7 @@ public class Constants {
public static final String CONIG_PROPS_EIDAS_COMMON_CLIENT_SSL_TRUSTSTORE_NAME = CONIG_PROPS_EIDAS_COMMON_CLIENT
+ ".ssl.trustStore.name";
- /** Enable / Disable matching based on address search **/
+ /** Enable / Disable matching based on address search. **/
public static final String CONFIG_PROP_MATCHING_BY_ADDRESS = CONIG_PROPS_EIDAS_PREFIX + ".matching.byaddress.enable";
public static final String CONFIG_PROP_MATCHING_BY_ADDRESS_MAX_RESULTS =
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/SelectedLoginMethod.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/SelectedLoginMethod.java
index 993c0924..c8a2da88 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/SelectedLoginMethod.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/SelectedLoginMethod.java
@@ -1,5 +1,5 @@
package at.asitplus.eidas.specific.modules.auth.eidas.v2.dao;
public enum SelectedLoginMethod {
- EIDAS_LOGIN, MOBILE_PHONE_SIGNATURE_LOGIN, NO_OTHER_LOGIN, ADD_ME_AS_NEW, REQUESTING_NEW_ENTRY
+ EIDAS_LOGIN, MOBILE_PHONE_SIGNATURE_LOGIN, NO_OTHER_LOGIN, ADD_ME_AS_NEW, REQUESTING_NEW_ENTRY, STOP_MATCHING_PROCESS
}
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/AlternativeSearchTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/AlternativeSearchTask.java
index e8fb5b6b..ccc84f46 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/AlternativeSearchTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/AlternativeSearchTask.java
@@ -36,6 +36,7 @@ import javax.servlet.http.HttpServletResponse;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Component;
+import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MATCHING_STATES;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.MatchedPersonResult;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SimpleEidasData;
@@ -243,6 +244,7 @@ public class AlternativeSearchTask extends AbstractAuthServletTask {
throws WorkflowException, EaafStorageException {
MatchedPersonResult result = MatchedPersonResult.generateFormMatchingResult(
searchResult.getResult(), eidasData.getCitizenCountryCode());
+ MatchingTaskUtils.setMatchingState(pendingReq, MATCHING_STATES.BY_EIDAS);
MatchingTaskUtils.storeFinalMatchingResult(pendingReq, result);
//remove intermediate matching-state
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateNewErnpEntryTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateNewErnpEntryTask.java
index c7843be5..6680650e 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateNewErnpEntryTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateNewErnpEntryTask.java
@@ -29,6 +29,7 @@ import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
+import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MATCHING_STATES;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.clients.ernp.ErnpRestClient;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.clients.ernp.ErnpRestClient.ErnpRegisterResult;
@@ -91,7 +92,8 @@ public class CreateNewErnpEntryTask extends AbstractAuthServletTask {
}
// finish matching process, because new user-entry uniquly matches
- log.info("User successfully registerred into ERnP and matching tasks are finished ");
+ log.info("User successfully registerred into ERnP and matching tasks are finished ");
+ MatchingTaskUtils.setMatchingState(pendingReq, MATCHING_STATES.BY_NEW_ERNP_ENTRY);
MatchingTaskUtils.storeFinalMatchingResult(pendingReq,
MatchedPersonResult.generateFormMatchingResult(
resp.getPersonResult().get(0), simpleEidasData.getCitizenCountryCode()));
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java
index 3a775837..86d279c6 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java
@@ -34,6 +34,7 @@ import javax.servlet.http.HttpServletResponse;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Component;
+import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MATCHING_STATES;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.MatchedPersonResult;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.RegisterResult;
@@ -123,7 +124,8 @@ public class InitialSearchTask extends AbstractAuthServletTask {
step6CountrySpecificSearch(executionContext, searchResult.getOperationStatus(), eidasData);
} else if (resultCount == 1) {
- RegisterResult updatedResult = step3CheckRegisterUpdateNecessary(searchResult, eidasData);
+ RegisterResult updatedResult = step3CheckRegisterUpdateNecessary(searchResult, eidasData);
+ MatchingTaskUtils.setMatchingState(pendingReq, MATCHING_STATES.BY_PERSONALID);
foundMatchFinalizeTask(updatedResult, eidasData);
} else {
@@ -151,6 +153,7 @@ public class InitialSearchTask extends AbstractAuthServletTask {
} else if (searchResult.getResultCount() == 1) {
log.trace("'step6CountrySpecificSearch' finds a person. Forward to 'step7aKittProcess' step ... ");
RegisterStatusResults updatedResult = registerSearchService.step7aKittProcess(searchResult, eidasData);
+ MatchingTaskUtils.setMatchingState(pendingReq, MATCHING_STATES.BY_COUNTRY_SPECIFIC);
foundMatchFinalizeTask(updatedResult.getResult(), eidasData);
} else {
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveAustrianResidenceGuiResponseTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveAustrianResidenceGuiResponseTask.java
index f335bc2a..00a7e28d 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveAustrianResidenceGuiResponseTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveAustrianResidenceGuiResponseTask.java
@@ -41,6 +41,7 @@ import org.springframework.stereotype.Component;
import com.google.common.collect.Sets;
+import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MATCHING_STATES;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.controller.AdresssucheController;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.controller.AdresssucheController.AdresssucheOutput;
@@ -185,7 +186,8 @@ public class ReceiveAustrianResidenceGuiResponseTask extends AbstractLocaleAuthS
// update register information
RegisterStatusResults updateResult = registerSearchService.step7aKittProcess(residencyResult, eidasData);
- // store updated result to re-used in CreateIdentityLink step, because there we need bPK and MDS
+ // store updated result to re-used in CreateIdentityLink step, because there we need bPK and MDS
+ MatchingTaskUtils.setMatchingState(pendingReq, MATCHING_STATES.BY_ADDRESS);
MatchingTaskUtils.storeFinalMatchingResult(pendingReq,
MatchedPersonResult.generateFormMatchingResult(
updateResult.getResult(), eidasData.getCitizenCountryCode()));
@@ -193,6 +195,7 @@ public class ReceiveAustrianResidenceGuiResponseTask extends AbstractLocaleAuthS
} else {
log.warn("Suspect state FOUND. Matching by residence was neccessary but NO register-update are required!");
// no update required. Data can be used as it is.
+ MatchingTaskUtils.setMatchingState(pendingReq, MATCHING_STATES.BY_ADDRESS);
MatchingTaskUtils.storeFinalMatchingResult(pendingReq,
MatchedPersonResult.generateFormMatchingResult(
residencyResult.getResult(), eidasData.getCitizenCountryCode()));
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java
index b212d133..11ac9549 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java
@@ -47,6 +47,7 @@ import org.opensaml.saml.saml2.core.StatusCode;
import org.opensaml.saml.saml2.metadata.IDPSSODescriptor;
import org.springframework.stereotype.Component;
+import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MATCHING_STATES;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.MatchedPersonResult;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.RegisterResult;
@@ -204,6 +205,7 @@ public class ReceiveMobilePhoneSignatureResponseTask extends AbstractAuthServlet
registerSearchService.step7aKittProcess(registerResult, eidasData);
// store search result to re-used in CreateIdentityLink step, because there we need bPK and MDS
+ MatchingTaskUtils.setMatchingState(pendingReq, MATCHING_STATES.BY_ID_AUSTRIA);
MatchingTaskUtils.storeFinalMatchingResult(pendingReq,
MatchedPersonResult.generateFormMatchingResult(registerResult.getResult(),
eidasData.getCitizenCountryCode()));
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java
index 3fc29c4e..159b5b51 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java
@@ -34,8 +34,10 @@ import org.springframework.stereotype.Component;
import com.google.common.collect.Sets;
+import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MATCHING_STATES;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SelectedLoginMethod;
+import at.asitplus.eidas.specific.modules.auth.eidas.v2.utils.MatchingTaskUtils;
import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
import at.gv.egiz.eaaf.core.exceptions.EaafException;
import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException;
@@ -81,8 +83,8 @@ public class ReceiveOtherLoginMethodGuiResponseTask extends AbstractLocaleAuthSe
executionContext.put(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK, false);
executionContext.put(Constants.REQ_SELECTED_LOGIN_METHOD_PARAMETER, selection.name());
executionContext.remove(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED);
- executionContext.remove(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON);
- transitionToNextTask(executionContext, selection);
+ executionContext.remove(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON);
+ transitionToNextTask(executionContext, selection, request, response);
} catch (TaskExecutionException e) {
throw e;
@@ -105,9 +107,15 @@ public class ReceiveOtherLoginMethodGuiResponseTask extends AbstractLocaleAuthSe
return null;
}
- private void transitionToNextTask(ExecutionContext executionContext, SelectedLoginMethod selection)
- throws TaskExecutionException {
+ private void transitionToNextTask(ExecutionContext executionContext, SelectedLoginMethod selection,
+ HttpServletRequest request, HttpServletResponse response) throws TaskExecutionException {
switch (selection) {
+ case STOP_MATCHING_PROCESS:
+ log.info("Matching process WAS stopped by entity. Stopping auth. process ... ");
+ MatchingTaskUtils.setMatchingState(pendingReq, MATCHING_STATES.CANCELED_BY_USER);
+ stopProcessFromUserDecision(executionContext, request, response);
+ return;
+
case EIDAS_LOGIN:
executionContext.put(Constants.TRANSITION_TO_GENERATE_EIDAS_LOGIN, true);
return;
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/utils/MatchingTaskUtils.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/utils/MatchingTaskUtils.java
index c8a1f190..8ecefe49 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/utils/MatchingTaskUtils.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/utils/MatchingTaskUtils.java
@@ -15,6 +15,8 @@ import org.springframework.lang.NonNull;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
+import at.asitplus.eidas.specific.core.MsEidasNodeConstants;
+import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MATCHING_STATES;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.MatchedPersonResult;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SimpleEidasData;
@@ -27,7 +29,9 @@ import at.gv.egiz.eaaf.core.impl.idp.auth.data.AuthProcessDataWrapper;
import eu.eidas.auth.commons.attribute.AttributeDefinition;
import eu.eidas.auth.commons.attribute.AttributeValue;
import eu.eidas.auth.commons.protocol.eidas.impl.PostalAddress;
+import lombok.extern.slf4j.Slf4j;
+@Slf4j
public class MatchingTaskUtils {
/**
@@ -105,7 +109,6 @@ public class MatchingTaskUtils {
* @param personInfos Person information after a successful match
* @throws EaafStorageException In case of data can not be add into session
*/
- @Nullable
public static void storeFinalMatchingResult(IRequest pendingReq, MatchedPersonResult personInfos)
throws EaafStorageException {
getAuthProcessDataWrapper(pendingReq).setGenericDataToSession(
@@ -113,6 +116,23 @@ public class MatchingTaskUtils {
}
+ /**
+ * Store matching result-state.
+ *
+ * @param pendingReq Current pendingRequest
+ * @param state Operation that results into a person match
+ */
+ public static void setMatchingState(IRequest pendingReq, MATCHING_STATES state) {
+ try {
+ pendingReq.setRawDataToTransaction(MsEidasNodeConstants.DATA_MATCHING_STATE, state);
+
+ } catch (EaafStorageException e) {
+ log.warn("Can NOT set matching-state for statistic logging.", e);
+
+ }
+ }
+
+
/**
* Get holder for authentication information for the current process.
*
diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveOtherLoginMethodGuiResponseTaskTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveOtherLoginMethodGuiResponseTaskTest.java
index af7bf0bf..66867fce 100644
--- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveOtherLoginMethodGuiResponseTaskTest.java
+++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveOtherLoginMethodGuiResponseTaskTest.java
@@ -5,6 +5,7 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThrows;
+import static org.junit.Assert.assertTrue;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.Before;
@@ -78,6 +79,16 @@ public class ReceiveOtherLoginMethodGuiResponseTaskTest {
LocaleContextHolder.resetLocaleContext();
}
+ @Test
+ public void withStopMatchingSelection() throws TaskExecutionException {
+httpReq.setParameter(Constants.REQ_SELECTED_LOGIN_METHOD_PARAMETER, SelectedLoginMethod.STOP_MATCHING_PROCESS.name());
+
+ task.execute(pendingReq, executionContext);
+
+ assertTrue("stoppedByUser", pendingReq.isAbortedByUser());
+
+ }
+
@Test
public void withMobileSignatureSelection() throws TaskExecutionException {
testTransition(SelectedLoginMethod.MOBILE_PHONE_SIGNATURE_LOGIN, Constants.TRANSITION_TO_GENERATE_MOBILE_PHONE_SIGNATURE_REQUEST_TASK);
diff --git a/modules/core_common_lib/src/main/java/at/asitplus/eidas/specific/core/MsEidasNodeConstants.java b/modules/core_common_lib/src/main/java/at/asitplus/eidas/specific/core/MsEidasNodeConstants.java
index be5d7c7d..eb7c90f2 100644
--- a/modules/core_common_lib/src/main/java/at/asitplus/eidas/specific/core/MsEidasNodeConstants.java
+++ b/modules/core_common_lib/src/main/java/at/asitplus/eidas/specific/core/MsEidasNodeConstants.java
@@ -184,6 +184,9 @@ public class MsEidasNodeConstants {
public static final String DATA_REQUESTED_LOA_LIST = "req_requestedLoA";
public static final String DATA_REQUESTED_LOA_COMPERISON = "req_requestedLoAComperision";
+
+ public static final String DATA_MATCHING_STATE = "process_matchingstate";
+
public static final List COUNTRY_SELECTION_PARAM_WHITELIST =
Arrays.asList(REQ_PARAM_SELECTED_COUNTRY, REQ_PARAM_SELECTED_ENVIRONMENT);
@@ -235,6 +238,17 @@ public class MsEidasNodeConstants {
});
+ public enum MATCHING_STATES {
+ NO_REQUIRED,
+ CANCELED_BY_USER,
+ BY_PERSONALID,
+ BY_COUNTRY_SPECIFIC,
+ BY_ID_AUSTRIA,
+ BY_EIDAS,
+ BY_ADDRESS,
+ BY_NEW_ERNP_ENTRY
+ };
+
private MsEidasNodeConstants() {
//hidden Constructor for class with static values only.
}
diff --git a/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/logger/StatisticLogger.java b/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/logger/StatisticLogger.java
index bdaf83f6..c2c8d368 100644
--- a/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/logger/StatisticLogger.java
+++ b/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/logger/StatisticLogger.java
@@ -30,6 +30,7 @@ import org.slf4j.LoggerFactory;
import at.asitplus.eidas.specific.core.MsEidasNodeConstants;
import at.gv.egiz.eaaf.core.api.IRequest;
+import at.gv.egiz.eaaf.core.api.IStatusMessenger;
import at.gv.egiz.eaaf.core.api.idp.IAuthData;
import at.gv.egiz.eaaf.core.api.logging.IStatisticLogger;
import at.gv.egiz.eaaf.core.exceptions.EaafException;
@@ -50,6 +51,7 @@ public class StatisticLogger implements IStatisticLogger {
protocolRequest.getRawData(MsEidasNodeConstants.DATA_REQUESTERID),
protocolRequest.getServiceProviderConfiguration().getAreaSpecificTargetIdentifier(),
authData.getCiticenCountryCode(),
+ extractMatchingState(protocolRequest.getRawData(MsEidasNodeConstants.DATA_MATCHING_STATE)),
STATUS_SUCCESS,
StringUtils.EMPTY,
StringUtils.EMPTY));
@@ -58,7 +60,7 @@ public class StatisticLogger implements IStatisticLogger {
@Override
public void logErrorOperation(Throwable throwable) {
- String errorId = "TODO";
+ String errorId = IStatusMessenger.CODES_INTERNAL_ERROR_GENERIC;
if (throwable instanceof EaafException) {
errorId = ((EaafException) throwable).getErrorId();
}
@@ -69,6 +71,7 @@ public class StatisticLogger implements IStatisticLogger {
StringUtils.EMPTY,
StringUtils.EMPTY,
StringUtils.EMPTY,
+ StringUtils.EMPTY,
STATUS_ERROR,
errorId,
throwable.getMessage()));
@@ -89,6 +92,7 @@ public class StatisticLogger implements IStatisticLogger {
errorRequest.getRawData(MsEidasNodeConstants.DATA_REQUESTERID),
errorRequest.getServiceProviderConfiguration().getAreaSpecificTargetIdentifier(),
StringUtils.EMPTY,
+ extractMatchingState(errorRequest.getRawData(MsEidasNodeConstants.DATA_MATCHING_STATE)),
STATUS_ERROR,
errorId,
throwable.getMessage()));
@@ -99,6 +103,7 @@ public class StatisticLogger implements IStatisticLogger {
StringUtils.EMPTY,
StringUtils.EMPTY,
StringUtils.EMPTY,
+ StringUtils.EMPTY,
STATUS_ERROR,
errorId,
throwable.getMessage()));
@@ -112,8 +117,13 @@ public class StatisticLogger implements IStatisticLogger {
}
+ private String extractMatchingState(Object state) {
+ return state != null ? state.toString() : MsEidasNodeConstants.MATCHING_STATES.NO_REQUIRED.toString();
+
+ }
+
private String buildLogMessage(String transId, String entityId, Object requesterId, String target,
- String cc,
+ String cc, String matchingState,
String status, String errorCode, String errorMsg) {
String logMsg = StringUtils.EMPTY;
@@ -131,7 +141,9 @@ public class StatisticLogger implements IStatisticLogger {
logMsg += target + ",";
logMsg += cc + ",";
-
+
+ logMsg += matchingState + ",";
+
logMsg += status + ",";
logMsg += errorCode + ",";
logMsg += errorMsg;
--
cgit v1.2.3
From 99351e33f4e3e47bb2496c9c656d671079876742 Mon Sep 17 00:00:00 2001
From: Thomas <>
Date: Fri, 1 Jul 2022 17:10:52 +0200
Subject: refact(matching): make address-search sort result more resistent
---
.../eidas/v2/controller/AdresssucheController.java | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java
index 6faa35fd..a08128d3 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java
@@ -230,13 +230,18 @@ public class AdresssucheController {
int extractInt(String s) {
if (StringUtils.isNotEmpty(s)) {
final String num = s.replaceAll("\\D", "");
- // return 0 if no digits found
- return num.isEmpty() ? 0 : Integer.parseInt(num);
-
- } else {
- return 0;
-
- }
+ try {
+ // return 0 if no digits found
+ return num.isEmpty() ? 0 : Integer.parseInt(num);
+
+ } catch (Exception e) {
+ log.info("Can not parse number from ZMR", e);
+
+ }
+ }
+
+ return 0;
+
}
};
}
--
cgit v1.2.3
From e25d3559d2747b60c19dab90a0b6524e7e7eed3a Mon Sep 17 00:00:00 2001
From: Thomas <>
Date: Fri, 1 Jul 2022 17:11:54 +0200
Subject: style(matching): fix code-style issue
---
basicConfig/templates/other_login_method.html | 2 +-
.../specific/modules/auth/eidas/v2/tasks/AlternativeSearchTask.java | 4 ++--
.../modules/auth/eidas/v2/tasks/CreateNewErnpEntryTask.java | 4 ++--
.../specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java | 6 +++---
.../eidas/v2/tasks/ReceiveAustrianResidenceGuiResponseTask.java | 6 +++---
.../eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java | 4 ++--
.../auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java | 4 ++--
.../specific/modules/auth/eidas/v2/utils/MatchingTaskUtils.java | 4 ++--
.../java/at/asitplus/eidas/specific/core/MsEidasNodeConstants.java | 5 ++---
.../at/asitplus/eidas/specific/core/logger/StatisticLogger.java | 2 +-
10 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/basicConfig/templates/other_login_method.html b/basicConfig/templates/other_login_method.html
index 31ff74a6..d392a553 100644
--- a/basicConfig/templates/other_login_method.html
+++ b/basicConfig/templates/other_login_method.html
@@ -150,7 +150,7 @@
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/AlternativeSearchTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/AlternativeSearchTask.java
index ccc84f46..dd46bfea 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/AlternativeSearchTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/AlternativeSearchTask.java
@@ -36,7 +36,7 @@ import javax.servlet.http.HttpServletResponse;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Component;
-import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MATCHING_STATES;
+import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MatchingStates;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.MatchedPersonResult;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SimpleEidasData;
@@ -244,7 +244,7 @@ public class AlternativeSearchTask extends AbstractAuthServletTask {
throws WorkflowException, EaafStorageException {
MatchedPersonResult result = MatchedPersonResult.generateFormMatchingResult(
searchResult.getResult(), eidasData.getCitizenCountryCode());
- MatchingTaskUtils.setMatchingState(pendingReq, MATCHING_STATES.BY_EIDAS);
+ MatchingTaskUtils.setMatchingState(pendingReq, MatchingStates.BY_EIDAS);
MatchingTaskUtils.storeFinalMatchingResult(pendingReq, result);
//remove intermediate matching-state
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateNewErnpEntryTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateNewErnpEntryTask.java
index 6680650e..563a66ba 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateNewErnpEntryTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateNewErnpEntryTask.java
@@ -29,7 +29,7 @@ import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
-import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MATCHING_STATES;
+import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MatchingStates;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.clients.ernp.ErnpRestClient;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.clients.ernp.ErnpRestClient.ErnpRegisterResult;
@@ -93,7 +93,7 @@ public class CreateNewErnpEntryTask extends AbstractAuthServletTask {
// finish matching process, because new user-entry uniquly matches
log.info("User successfully registerred into ERnP and matching tasks are finished ");
- MatchingTaskUtils.setMatchingState(pendingReq, MATCHING_STATES.BY_NEW_ERNP_ENTRY);
+ MatchingTaskUtils.setMatchingState(pendingReq, MatchingStates.BY_NEW_ERNP_ENTRY);
MatchingTaskUtils.storeFinalMatchingResult(pendingReq,
MatchedPersonResult.generateFormMatchingResult(
resp.getPersonResult().get(0), simpleEidasData.getCitizenCountryCode()));
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java
index 86d279c6..8e6c7790 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java
@@ -34,7 +34,7 @@ import javax.servlet.http.HttpServletResponse;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Component;
-import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MATCHING_STATES;
+import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MatchingStates;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.MatchedPersonResult;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.RegisterResult;
@@ -125,7 +125,7 @@ public class InitialSearchTask extends AbstractAuthServletTask {
} else if (resultCount == 1) {
RegisterResult updatedResult = step3CheckRegisterUpdateNecessary(searchResult, eidasData);
- MatchingTaskUtils.setMatchingState(pendingReq, MATCHING_STATES.BY_PERSONALID);
+ MatchingTaskUtils.setMatchingState(pendingReq, MatchingStates.BY_PERSONALID);
foundMatchFinalizeTask(updatedResult, eidasData);
} else {
@@ -153,7 +153,7 @@ public class InitialSearchTask extends AbstractAuthServletTask {
} else if (searchResult.getResultCount() == 1) {
log.trace("'step6CountrySpecificSearch' finds a person. Forward to 'step7aKittProcess' step ... ");
RegisterStatusResults updatedResult = registerSearchService.step7aKittProcess(searchResult, eidasData);
- MatchingTaskUtils.setMatchingState(pendingReq, MATCHING_STATES.BY_COUNTRY_SPECIFIC);
+ MatchingTaskUtils.setMatchingState(pendingReq, MatchingStates.BY_COUNTRY_SPECIFIC);
foundMatchFinalizeTask(updatedResult.getResult(), eidasData);
} else {
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveAustrianResidenceGuiResponseTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveAustrianResidenceGuiResponseTask.java
index 00a7e28d..09ef0129 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveAustrianResidenceGuiResponseTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveAustrianResidenceGuiResponseTask.java
@@ -41,7 +41,7 @@ import org.springframework.stereotype.Component;
import com.google.common.collect.Sets;
-import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MATCHING_STATES;
+import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MatchingStates;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.controller.AdresssucheController;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.controller.AdresssucheController.AdresssucheOutput;
@@ -187,7 +187,7 @@ public class ReceiveAustrianResidenceGuiResponseTask extends AbstractLocaleAuthS
RegisterStatusResults updateResult = registerSearchService.step7aKittProcess(residencyResult, eidasData);
// store updated result to re-used in CreateIdentityLink step, because there we need bPK and MDS
- MatchingTaskUtils.setMatchingState(pendingReq, MATCHING_STATES.BY_ADDRESS);
+ MatchingTaskUtils.setMatchingState(pendingReq, MatchingStates.BY_ADDRESS);
MatchingTaskUtils.storeFinalMatchingResult(pendingReq,
MatchedPersonResult.generateFormMatchingResult(
updateResult.getResult(), eidasData.getCitizenCountryCode()));
@@ -195,7 +195,7 @@ public class ReceiveAustrianResidenceGuiResponseTask extends AbstractLocaleAuthS
} else {
log.warn("Suspect state FOUND. Matching by residence was neccessary but NO register-update are required!");
// no update required. Data can be used as it is.
- MatchingTaskUtils.setMatchingState(pendingReq, MATCHING_STATES.BY_ADDRESS);
+ MatchingTaskUtils.setMatchingState(pendingReq, MatchingStates.BY_ADDRESS);
MatchingTaskUtils.storeFinalMatchingResult(pendingReq,
MatchedPersonResult.generateFormMatchingResult(
residencyResult.getResult(), eidasData.getCitizenCountryCode()));
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java
index 11ac9549..57790b01 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java
@@ -47,7 +47,7 @@ import org.opensaml.saml.saml2.core.StatusCode;
import org.opensaml.saml.saml2.metadata.IDPSSODescriptor;
import org.springframework.stereotype.Component;
-import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MATCHING_STATES;
+import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MatchingStates;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.MatchedPersonResult;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.RegisterResult;
@@ -205,7 +205,7 @@ public class ReceiveMobilePhoneSignatureResponseTask extends AbstractAuthServlet
registerSearchService.step7aKittProcess(registerResult, eidasData);
// store search result to re-used in CreateIdentityLink step, because there we need bPK and MDS
- MatchingTaskUtils.setMatchingState(pendingReq, MATCHING_STATES.BY_ID_AUSTRIA);
+ MatchingTaskUtils.setMatchingState(pendingReq, MatchingStates.BY_ID_AUSTRIA);
MatchingTaskUtils.storeFinalMatchingResult(pendingReq,
MatchedPersonResult.generateFormMatchingResult(registerResult.getResult(),
eidasData.getCitizenCountryCode()));
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java
index 159b5b51..03414f9e 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java
@@ -34,7 +34,7 @@ import org.springframework.stereotype.Component;
import com.google.common.collect.Sets;
-import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MATCHING_STATES;
+import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MatchingStates;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SelectedLoginMethod;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.utils.MatchingTaskUtils;
@@ -112,7 +112,7 @@ public class ReceiveOtherLoginMethodGuiResponseTask extends AbstractLocaleAuthSe
switch (selection) {
case STOP_MATCHING_PROCESS:
log.info("Matching process WAS stopped by entity. Stopping auth. process ... ");
- MatchingTaskUtils.setMatchingState(pendingReq, MATCHING_STATES.CANCELED_BY_USER);
+ MatchingTaskUtils.setMatchingState(pendingReq, MatchingStates.CANCELED_BY_USER);
stopProcessFromUserDecision(executionContext, request, response);
return;
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/utils/MatchingTaskUtils.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/utils/MatchingTaskUtils.java
index 8ecefe49..c350cb05 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/utils/MatchingTaskUtils.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/utils/MatchingTaskUtils.java
@@ -16,7 +16,7 @@ import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import at.asitplus.eidas.specific.core.MsEidasNodeConstants;
-import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MATCHING_STATES;
+import at.asitplus.eidas.specific.core.MsEidasNodeConstants.MatchingStates;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.MatchedPersonResult;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SimpleEidasData;
@@ -122,7 +122,7 @@ public class MatchingTaskUtils {
* @param pendingReq Current pendingRequest
* @param state Operation that results into a person match
*/
- public static void setMatchingState(IRequest pendingReq, MATCHING_STATES state) {
+ public static void setMatchingState(IRequest pendingReq, MatchingStates state) {
try {
pendingReq.setRawDataToTransaction(MsEidasNodeConstants.DATA_MATCHING_STATE, state);
diff --git a/modules/core_common_lib/src/main/java/at/asitplus/eidas/specific/core/MsEidasNodeConstants.java b/modules/core_common_lib/src/main/java/at/asitplus/eidas/specific/core/MsEidasNodeConstants.java
index eb7c90f2..835070b1 100644
--- a/modules/core_common_lib/src/main/java/at/asitplus/eidas/specific/core/MsEidasNodeConstants.java
+++ b/modules/core_common_lib/src/main/java/at/asitplus/eidas/specific/core/MsEidasNodeConstants.java
@@ -238,7 +238,7 @@ public class MsEidasNodeConstants {
});
- public enum MATCHING_STATES {
+ public enum MatchingStates {
NO_REQUIRED,
CANCELED_BY_USER,
BY_PERSONALID,
@@ -246,8 +246,7 @@ public class MsEidasNodeConstants {
BY_ID_AUSTRIA,
BY_EIDAS,
BY_ADDRESS,
- BY_NEW_ERNP_ENTRY
- };
+ BY_NEW_ERNP_ENTRY }
private MsEidasNodeConstants() {
//hidden Constructor for class with static values only.
diff --git a/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/logger/StatisticLogger.java b/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/logger/StatisticLogger.java
index c2c8d368..22cace10 100644
--- a/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/logger/StatisticLogger.java
+++ b/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/logger/StatisticLogger.java
@@ -118,7 +118,7 @@ public class StatisticLogger implements IStatisticLogger {
}
private String extractMatchingState(Object state) {
- return state != null ? state.toString() : MsEidasNodeConstants.MATCHING_STATES.NO_REQUIRED.toString();
+ return state != null ? state.toString() : MsEidasNodeConstants.MatchingStates.NO_REQUIRED.toString();
}
--
cgit v1.2.3
From ffc1157b1ba58848f1c56000cb17aaf4b9885f56 Mon Sep 17 00:00:00 2001
From: Thomas <>
Date: Fri, 1 Jul 2022 17:12:22 +0200
Subject: doc: add first draft of readme and update handbook
---
infos/Handbuch_MS-eIDAS-Node.docx | Bin 50668 -> 50625 bytes
infos/handbook/Handbuch_MS-eIDAS-Node.pdf | Bin 585307 -> 599029 bytes
infos/readme_1.3.1.md | 49 ++++++++++++++++++++++++++++++
3 files changed, 49 insertions(+)
create mode 100644 infos/readme_1.3.1.md
diff --git a/infos/Handbuch_MS-eIDAS-Node.docx b/infos/Handbuch_MS-eIDAS-Node.docx
index 86e7b596..02406cf1 100644
Binary files a/infos/Handbuch_MS-eIDAS-Node.docx and b/infos/Handbuch_MS-eIDAS-Node.docx differ
diff --git a/infos/handbook/Handbuch_MS-eIDAS-Node.pdf b/infos/handbook/Handbuch_MS-eIDAS-Node.pdf
index c61dc7b9..e26d1fe7 100644
Binary files a/infos/handbook/Handbuch_MS-eIDAS-Node.pdf and b/infos/handbook/Handbuch_MS-eIDAS-Node.pdf differ
diff --git a/infos/readme_1.3.1.md b/infos/readme_1.3.1.md
new file mode 100644
index 00000000..36746f64
--- /dev/null
+++ b/infos/readme_1.3.1.md
@@ -0,0 +1,49 @@
+# MS-Connector v1.3.1 Release vom xx.07.2022
+
+Der MS-Connector implementiert eine Bridge zwischen dem österreichischen E-ID System und dem eIDAS Framework um ausländischen Benutzern eine Anmeldung am österreichischen Service-Providern zu ermöglichen.
+
+### Änderungen in dieser Version
+
+ - Mindestens Java 11 erforderlich
+ - Erweitertes Identitätsmatching welches sowohl bestehende ZMR und ERnP Einträge berücksichtigt
+ - Integration der vom BM.I übermittelten UX Templates in die Beispielkonfiguration
+ - Bugfix
+ - Fehler bei der Verarbeitung von leeren Attributewerten behoben
+ - Akutalisierung von Drittherstellerbibliotheken
+ - openSAML 4.0.1
+ - EAAF-Components 1.3.2
+ - SpringBoot 2.5.13
+ - Spring-Framework 5.3.20
+ - Apache CXF 3.5.2
+
+
+### Durchführen eines Updates
+
+Nachfolgend finden Sie die erforderlichen Schritte für das Update eines bestehenden MS-specific eIDAS Connectors auf die aktuelle Version 1.3.1. Das vollständige Handbuch mit allen Konfigurationsparametern finden Sie im Releasepackage im Verzeichnis: _infos/handbook/_
+
+### Ausgehend von einer bestehenden Version 1.2.x
+
+1. Stoppen Sie die *MS-Connector* Applikation und fertigen Sie eine Sicherungskopie Ihrer Applikation inklusive Konfiguration an
+
+2. Entpacken Sie das Releasepacket *ms_specific_connector-1.3.1-dist.zip* in ein temporäres Verzeichnis welches in weiterer Folge __MsConnectorPackage__ bezeichnet wird.
+
+3. Kopieren sie die Applikation __MsConnectorPackage__/ms_connector.war nach in das Applikationsverzeichnis ihres Applikationsservers
+
+4. Update bestehender Dateien . Die nachfolgenden Dateien wurden geändert und erfordern eine Anpassung oder eine Übernahme dem Releasepacket, sofern die Anpassung nicht bereits durchgeführt wurde
+
+ * Vollständige Übernahme: __MsConnectorPackage__/config/templates/other_login_method.html
+ * Vollständige Übernahme: __MsConnectorPackage__/config/templates/residency.html
+ * Vollständige Übernahme: __MsConnectorPackage__/config/properties/messages.properties
+ * Vollständige Übernahme: __MsConnectorPackage__/config/properties/messages_de.properties
+ * Vollständige Übernahme: __MsConnectorPackage__/config/keys/id_austria_truststore.jks
+
+6. Neue optionale Konfigurationsparameter
+
+ - *Matching allgemein*
+
+ - ```eidas.ms.auth.eIDAS.matching.byaddress.enable```
+ - ```eidas.ms.auth.eIDAS.matching.byaddress.maxresults```
+
+
+
+
--
cgit v1.2.3
From e74f79ea814da1e0dafec9adfe56ed2fba0b6ed5 Mon Sep 17 00:00:00 2001
From: Thomas <>
Date: Tue, 5 Jul 2022 15:58:54 +0200
Subject: doc: finalize readme and history for next release
---
infos/history.txt | 8 ++++++++
infos/readme_1.3.1.md | 52 +++++++++++++++++++++++++++++++++++----------------
2 files changed, 44 insertions(+), 16 deletions(-)
diff --git a/infos/history.txt b/infos/history.txt
index 73c2bdf7..5dbe4d56 100644
--- a/infos/history.txt
+++ b/infos/history.txt
@@ -1,5 +1,13 @@
Dieses Dokument zeigt die Veränderungen und Erweiterungen am eIDAS MS-Connector
+Version 1.3.1 (2022-07-05):
+ - Optimierung und Fehlerkorrektur für UX basierten Matching-Schritten
+ - Konfigurierbare Maximalanzahl von Ergebnissen bei Adresssuche
+ - Statistiklogger um Matching-Informationen erweitert
+ - Bugfix
+ - Sortierung bei Adresssuchergebnissen optimiert
+
+
Version 1.3.0 (2022-05-19):
- Mindestens Java 11 erforderlich
- Erweitertes Identitätsmatching welches sowohl bestehende ZMR und ERnP Einträge berücksichtigt
diff --git a/infos/readme_1.3.1.md b/infos/readme_1.3.1.md
index 36746f64..a32eaacd 100644
--- a/infos/readme_1.3.1.md
+++ b/infos/readme_1.3.1.md
@@ -1,27 +1,21 @@
-# MS-Connector v1.3.1 Release vom xx.07.2022
+# MS-Connector v1.3.1 Release vom 05.07.2022
Der MS-Connector implementiert eine Bridge zwischen dem österreichischen E-ID System und dem eIDAS Framework um ausländischen Benutzern eine Anmeldung am österreichischen Service-Providern zu ermöglichen.
### Änderungen in dieser Version
- - Mindestens Java 11 erforderlich
- - Erweitertes Identitätsmatching welches sowohl bestehende ZMR und ERnP Einträge berücksichtigt
- - Integration der vom BM.I übermittelten UX Templates in die Beispielkonfiguration
+ - Optimierung und Fehlerkorrektur für UX basierten Matching-Schritten
+ - Konfigurierbare Maximalanzahl von Ergebnissen bei Adresssuche
+ - Statistiklogger um Matching-Informationen erweitert
- Bugfix
- - Fehler bei der Verarbeitung von leeren Attributewerten behoben
- - Akutalisierung von Drittherstellerbibliotheken
- - openSAML 4.0.1
- - EAAF-Components 1.3.2
- - SpringBoot 2.5.13
- - Spring-Framework 5.3.20
- - Apache CXF 3.5.2
+ - Sortierung bei Adresssuchergebnissen optimiert
### Durchführen eines Updates
Nachfolgend finden Sie die erforderlichen Schritte für das Update eines bestehenden MS-specific eIDAS Connectors auf die aktuelle Version 1.3.1. Das vollständige Handbuch mit allen Konfigurationsparametern finden Sie im Releasepackage im Verzeichnis: _infos/handbook/_
-### Ausgehend von einer bestehenden Version 1.2.x
+### Ausgehend von einer bestehenden Version 1.3.0
1. Stoppen Sie die *MS-Connector* Applikation und fertigen Sie eine Sicherungskopie Ihrer Applikation inklusive Konfiguration an
@@ -35,15 +29,41 @@ Nachfolgend finden Sie die erforderlichen Schritte für das Update eines bestehe
* Vollständige Übernahme: __MsConnectorPackage__/config/templates/residency.html
* Vollständige Übernahme: __MsConnectorPackage__/config/properties/messages.properties
* Vollständige Übernahme: __MsConnectorPackage__/config/properties/messages_de.properties
- * Vollständige Übernahme: __MsConnectorPackage__/config/keys/id_austria_truststore.jks
-
+
6. Neue optionale Konfigurationsparameter
- *Matching allgemein*
- ```eidas.ms.auth.eIDAS.matching.byaddress.enable```
- ```eidas.ms.auth.eIDAS.matching.byaddress.maxresults```
-
-
+6. Aktualisierung Statistiklogger
+
+ Der CSV Eintrag des Statistikloggers wurde um ein Element erweitert, welches den für den Anmeldeprozess erfolgreichen Matchingschritt ausweist.
+
+ z.B.:
+
+ ```2022.07.01-16:51:58+CEST,65ed49c5-a494-4bfd-a860-ae7988dbf010,https://eid.egiz.gv.at/authHandler/restricted/eidas/metadata,https://eid.egiz.gv.at/openID_demo/,urn:publicid:gv.at:cdid+GH,EE,BY_PERSONALID,success,,```
+
+
+
+ Folgende Matching-Status werden durch den Statistik-Logger gesetzt:
+
+ - BY_PERSONALID --> Matching über eIDAS PersonalIdentifier
+ + BY_COUNTRY_SPECIFIC --> Matching über länderspezifische Eigenschaften (z.B. für DE)
+ + BY_ID_AUSTRIA --> Matching via ID Austria Login
+ + BY_EIDAS --> Matching via alternativer eIDAS Anmeldung
+ + BY_ADDRESS --> Matching über Adresssuche
+ + BY_NEW_ERNP_ENTRY --> falls die Person neu angelegt wurde
+ + CANCELED_BY_USER --> Anmeldeprozess wurde durch den Benutzer bei GUI basierten Matching-Prozess abgebrochen
+ + NO_REQUIRED --> Falls für den aktuellen Anmeldeprozess kein / noch kein Matching erforderlich war (z.B. Fehler am eIDAS Node vor Matching)
+
+
+
+
+
+
+
+
+
--
cgit v1.2.3
From 0c3ea866abcbcac59594c4102729f01019429b06 Mon Sep 17 00:00:00 2001
From: Thomas <>
Date: Tue, 5 Jul 2022 15:59:47 +0200
Subject: build(core): switch to next release version
---
build_reporting/pom.xml | 2 +-
connector/pom.xml | 2 +-
modules/authmodule-eIDAS-v2/pom.xml | 2 +-
modules/core_common_lib/pom.xml | 2 +-
modules/core_common_webapp/pom.xml | 2 +-
modules/pom.xml | 2 +-
pom.xml | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/build_reporting/pom.xml b/build_reporting/pom.xml
index 95644c1c..f8a5f652 100644
--- a/build_reporting/pom.xml
+++ b/build_reporting/pom.xml
@@ -6,7 +6,7 @@
at.asitplus.eidasms_specific
- 1.3.1-SNAPSHOT
+ 1.3.1build_reportingpom
diff --git a/connector/pom.xml b/connector/pom.xml
index 9c47b2d3..1b984236 100644
--- a/connector/pom.xml
+++ b/connector/pom.xml
@@ -6,7 +6,7 @@
at.asitplus.eidasms_specific
- 1.3.1-SNAPSHOT
+ 1.3.1at.asitplus.eidas.ms_specific
diff --git a/modules/authmodule-eIDAS-v2/pom.xml b/modules/authmodule-eIDAS-v2/pom.xml
index c87dc726..2e313241 100644
--- a/modules/authmodule-eIDAS-v2/pom.xml
+++ b/modules/authmodule-eIDAS-v2/pom.xml
@@ -6,7 +6,7 @@
at.asitplus.eidas.ms_specificmodules
- 1.3.1-SNAPSHOT
+ 1.3.1at.asitplus.eidas.ms_specific.modulesauthmodule-eIDAS-v2
diff --git a/modules/core_common_lib/pom.xml b/modules/core_common_lib/pom.xml
index 413a201e..1b077f75 100644
--- a/modules/core_common_lib/pom.xml
+++ b/modules/core_common_lib/pom.xml
@@ -7,7 +7,7 @@
at.asitplus.eidas.ms_specificmodules
- 1.3.1-SNAPSHOT
+ 1.3.1core_common_libms_specific_common_lib
diff --git a/modules/core_common_webapp/pom.xml b/modules/core_common_webapp/pom.xml
index c8a0f1f9..7c1debfc 100644
--- a/modules/core_common_webapp/pom.xml
+++ b/modules/core_common_webapp/pom.xml
@@ -3,7 +3,7 @@
at.asitplus.eidas.ms_specificmodules
- 1.3.1-SNAPSHOT
+ 1.3.1core_common_webappWebApplication commons
diff --git a/modules/pom.xml b/modules/pom.xml
index 3f377523..b604d33f 100644
--- a/modules/pom.xml
+++ b/modules/pom.xml
@@ -4,7 +4,7 @@
at.asitplus.eidasms_specific
- 1.3.1-SNAPSHOT
+ 1.3.1at.asitplus.eidas.ms_specificmodules
diff --git a/pom.xml b/pom.xml
index 78b1041e..85d50139 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
4.0.0at.asitplus.eidasms_specific
- 1.3.1-SNAPSHOT
+ 1.3.1pomMS specific eIDAS components
--
cgit v1.2.3
From 3388756bc1c66b0d81049e5f489ac38f0ee8addb Mon Sep 17 00:00:00 2001
From: Thomas <>
Date: Tue, 5 Jul 2022 17:20:29 +0200
Subject: build(core): switch to next snapshot version
---
build_reporting/pom.xml | 2 +-
connector/pom.xml | 2 +-
modules/authmodule-eIDAS-v2/pom.xml | 2 +-
modules/core_common_lib/pom.xml | 2 +-
modules/core_common_webapp/pom.xml | 2 +-
modules/pom.xml | 2 +-
pom.xml | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/build_reporting/pom.xml b/build_reporting/pom.xml
index f8a5f652..76de79a3 100644
--- a/build_reporting/pom.xml
+++ b/build_reporting/pom.xml
@@ -6,7 +6,7 @@
at.asitplus.eidasms_specific
- 1.3.1
+ 1.3.2-SNAPSHOTbuild_reportingpom
diff --git a/connector/pom.xml b/connector/pom.xml
index 1b984236..514ad766 100644
--- a/connector/pom.xml
+++ b/connector/pom.xml
@@ -6,7 +6,7 @@
at.asitplus.eidasms_specific
- 1.3.1
+ 1.3.2-SNAPSHOTat.asitplus.eidas.ms_specific
diff --git a/modules/authmodule-eIDAS-v2/pom.xml b/modules/authmodule-eIDAS-v2/pom.xml
index 2e313241..24491951 100644
--- a/modules/authmodule-eIDAS-v2/pom.xml
+++ b/modules/authmodule-eIDAS-v2/pom.xml
@@ -6,7 +6,7 @@
at.asitplus.eidas.ms_specificmodules
- 1.3.1
+ 1.3.2-SNAPSHOTat.asitplus.eidas.ms_specific.modulesauthmodule-eIDAS-v2
diff --git a/modules/core_common_lib/pom.xml b/modules/core_common_lib/pom.xml
index 1b077f75..f3378b17 100644
--- a/modules/core_common_lib/pom.xml
+++ b/modules/core_common_lib/pom.xml
@@ -7,7 +7,7 @@
at.asitplus.eidas.ms_specificmodules
- 1.3.1
+ 1.3.2-SNAPSHOTcore_common_libms_specific_common_lib
diff --git a/modules/core_common_webapp/pom.xml b/modules/core_common_webapp/pom.xml
index 7c1debfc..058f1bbe 100644
--- a/modules/core_common_webapp/pom.xml
+++ b/modules/core_common_webapp/pom.xml
@@ -3,7 +3,7 @@
at.asitplus.eidas.ms_specificmodules
- 1.3.1
+ 1.3.2-SNAPSHOTcore_common_webappWebApplication commons
diff --git a/modules/pom.xml b/modules/pom.xml
index b604d33f..f706a492 100644
--- a/modules/pom.xml
+++ b/modules/pom.xml
@@ -4,7 +4,7 @@
at.asitplus.eidasms_specific
- 1.3.1
+ 1.3.2-SNAPSHOTat.asitplus.eidas.ms_specificmodules
diff --git a/pom.xml b/pom.xml
index 85d50139..d31a322a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
4.0.0at.asitplus.eidasms_specific
- 1.3.1
+ 1.3.2-SNAPSHOTpomMS specific eIDAS components
--
cgit v1.2.3
From 76085d4f597eaf585e1194181bf82a4442333256 Mon Sep 17 00:00:00 2001
From: Thomas <>
Date: Tue, 5 Jul 2022 17:21:07 +0200
Subject: chore(core): change log-level from debug to trace
---
.../specific/core/storage/EidasCacheTransactionStoreDecorator.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/storage/EidasCacheTransactionStoreDecorator.java b/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/storage/EidasCacheTransactionStoreDecorator.java
index 9b1c8eae..5a59a4e0 100644
--- a/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/storage/EidasCacheTransactionStoreDecorator.java
+++ b/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/storage/EidasCacheTransactionStoreDecorator.java
@@ -171,7 +171,7 @@ public class EidasCacheTransactionStoreDecorator implements ITransactionStorage,
@Override
public void remove(String key) {
if (containsKey(key)) {
- log.debug("Remove element with key: " + key + " from " + ITransactionStorage.class.getName());
+ log.trace("Remove element with key: " + key + " from " + ITransactionStorage.class.getName());
boolean delResult = storage.remove(key);
log.trace("Object: {} removed from cache: {}", key, delResult);
--
cgit v1.2.3
From 48695aa01a86890990dc4e42b9d44493ec840b25 Mon Sep 17 00:00:00 2001
From: Thomas <>
Date: Tue, 5 Jul 2022 17:21:35 +0200
Subject: doc: add some missing release information
---
README.md | 8 ++++++++
basicConfig/default_config.properties | 3 +++
infos/readme_1.3.1.md | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index aee290b2..5eabd899 100644
--- a/README.md
+++ b/README.md
@@ -92,6 +92,14 @@ The full release package will be located add
## Changelog
+**v1.3.1**
+
+- Optimierung und Fehlerkorrektur bei UX basierten Matching-Schritten
+ - Konfigurierbare Maximalanzahl von Ergebnissen bei Adresssuche
+ - Statistiklogger um Matching-Informationen erweitert
+ - Bugfix
+ - Sortierung bei Adresssuchergebnissen optimiert
+
**v1.3.0**
- Erweitertes Identitätsmatching welches sowohl bestehende ZMR und ERnP Einträge berücksichtigt
diff --git a/basicConfig/default_config.properties b/basicConfig/default_config.properties
index b14c0221..e1aff309 100644
--- a/basicConfig/default_config.properties
+++ b/basicConfig/default_config.properties
@@ -30,6 +30,9 @@ eidas.ms.auth.eIDAS.node_v2.forward.endpoint=
#############################################
#### eIDAS identity-matching ######
+eidas.ms.auth.eIDAS.matching.byaddress.enable=true
+
+
# ZMR communication
eidas.ms.auth.eIDAS.zmrclient.endpoint=https://stportal.bmi.gv.at/at.gv.bmi.zmrsrv-a/soap/ZMRService
eidas.ms.auth.eIDAS.zmrclient.ssl.keyStore.type=pkcs12
diff --git a/infos/readme_1.3.1.md b/infos/readme_1.3.1.md
index a32eaacd..70db47a9 100644
--- a/infos/readme_1.3.1.md
+++ b/infos/readme_1.3.1.md
@@ -4,7 +4,7 @@ Der MS-Connector implementiert eine Bridge zwischen dem österreichischen E-ID S
### Änderungen in dieser Version
- - Optimierung und Fehlerkorrektur für UX basierten Matching-Schritten
+ - Optimierung und Fehlerkorrektur bei UX basierten Matching-Schritten
- Konfigurierbare Maximalanzahl von Ergebnissen bei Adresssuche
- Statistiklogger um Matching-Informationen erweitert
- Bugfix
--
cgit v1.2.3