From 847e3f5b52a7adc6baa463258087e562049ee89b Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Fri, 1 Jul 2022 14:27:19 +0200 Subject: feat(matching): add configuration property to disable 'matching-by-address-search' --- basicConfig/templates/other_login_method.html | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'basicConfig') diff --git a/basicConfig/templates/other_login_method.html b/basicConfig/templates/other_login_method.html index 120b0ecd..c5bc9668 100644 --- a/basicConfig/templates/other_login_method.html +++ b/basicConfig/templates/other_login_method.html @@ -124,13 +124,26 @@ -
+ + + +
+
+ + + +
+
-- 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(-) (limited to 'basicConfig') 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 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(-) (limited to 'basicConfig') 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(-) (limited to 'basicConfig') 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 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(-) (limited to 'basicConfig') 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 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(-) (limited to 'basicConfig') 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