From 9385171b2137eb71b3b5a0d9524b69fa95b48699 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Fri, 12 Nov 2021 16:59:55 +0100 Subject: fix some small bugs in ZMR client that we found by adding jUnit tests --- .../auth/eidas/v2/clients/zmr/ZmrSoapClient.java | 16 +- .../v2/test/clients/ZmrClientProductionTest.java | 132 ++- .../auth/eidas/v2/test/clients/ZmrClientTest.java | 1074 ++++++++++++++++++++ .../resources/config/junit_config_1.properties | 2 +- .../test/resources/data/zmr/empty_zmr_result.xml | 39 + .../src/test/resources/data/zmr/no_bpk_zp.xml | 290 ++++++ .../data/zmr/search_with_personalId_only_resp.xml | 290 ++++++ ..._with_personalId_only_resp_historicIncluded.xml | 389 +++++++ ...earch_with_personalId_only_resp_moreThanOne.xml | 488 +++++++++ ...rch_with_personalId_only_resp_moreThanOne_2.xml | 465 +++++++++ .../zmr/seq_1-4_kitt_get_latest_version_resp.xml | 185 ++++ .../data/zmr/seq_1-6_kitt_update_resp.xml | 146 +++ .../seq_1-8_search_with_personalId_only_resp.xml | 267 +++++ 13 files changed, 3759 insertions(+), 24 deletions(-) create mode 100644 eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ZmrClientTest.java create mode 100644 eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/empty_zmr_result.xml create mode 100644 eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/no_bpk_zp.xml create mode 100644 eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/search_with_personalId_only_resp.xml create mode 100644 eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/search_with_personalId_only_resp_historicIncluded.xml create mode 100644 eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/search_with_personalId_only_resp_moreThanOne.xml create mode 100644 eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/search_with_personalId_only_resp_moreThanOne_2.xml create mode 100644 eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/seq_1-4_kitt_get_latest_version_resp.xml create mode 100644 eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/seq_1-6_kitt_update_resp.xml create mode 100644 eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/seq_1-8_search_with_personalId_only_resp.xml (limited to 'eidas_modules') diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/zmr/ZmrSoapClient.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/zmr/ZmrSoapClient.java index 0edfb357..711226e2 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/zmr/ZmrSoapClient.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/zmr/ZmrSoapClient.java @@ -132,9 +132,10 @@ public class ZmrSoapClient extends AbstractSoapClient implements IZmrClient { searchPersonReq.getEidasSuchdaten().add(eidasInfos); eidasInfos.setEidasArt(Constants.eIDAS_ATTRURN_PERSONALIDENTIFIER); eidasInfos.setEidasWert(personPseudonym); - + eidasInfos.setStaatscode2(citizenCountryCode); + // set work-flow client information - req.setWorkflowInfoClient(generateWorkFlowInfos(PROCESS_TASK_SEARCH, null)); + req.setWorkflowInfoClient(generateWorkFlowInfos(PROCESS_TASK_SEARCH, zmrProzessId)); req.setClientInfo(generateClientInfos()); // set additionl search parameters @@ -277,7 +278,7 @@ public class ZmrSoapClient extends AbstractSoapClient implements IZmrClient { log.info("Find #{} eIDAS documents for update during: {}", eidasDocumentToAdd.size(), PROCESS_KITT_GENERAL); // update entry based on selected update info's and results from search response - return updatePersonInZmr(zmrPersonToKitt, eidasDocumentToAdd, eidData.getCitizenCountryCode()); + return updatePersonInZmr(zmrProzessId, zmrPersonToKitt, eidasDocumentToAdd, eidData.getCitizenCountryCode()); } @@ -517,7 +518,7 @@ public class ZmrSoapClient extends AbstractSoapClient implements IZmrClient { log.error("Find more-than-one ZMR entry with search criteria that has to be unique"); throw new WorkflowException(processStepFiendlyname, "Find more-than-one ZMR entry with search criteria that has to be unique", true); - + } else { return Arrays.asList(processPersonResult(personErgebnisSatz.get(0), citizenCountryCode)); @@ -533,7 +534,7 @@ public class ZmrSoapClient extends AbstractSoapClient implements IZmrClient { personEl.getPersonendaten().getPersonErgebnis().size()); if (personEl.getPersonendaten().getPersonErgebnis().size() > 1) { - log.error("Find more than on person with eIDAS personalIdentifier."); + log.error("Find more than on PersoenErgebnis in Personendaten."); throw new EaafAuthenticationException(ERROR_MATCHING_02, null); } else { @@ -573,6 +574,7 @@ public class ZmrSoapClient extends AbstractSoapClient implements IZmrClient { .map(el -> el.getValue()) .orElse(null); if (StringUtils.isEmpty(bpk)) { + //TODO: should we throw an error in that case? log.warn("ZMR response contains no 'bPK' for target: 'ZP'"); } @@ -749,13 +751,13 @@ public class ZmrSoapClient extends AbstractSoapClient implements IZmrClient { } } - private ZmrRegisterResult updatePersonInZmr(PersonErgebnisType zmrPersonToKitt, + private ZmrRegisterResult updatePersonInZmr(BigInteger zmrProzessId, PersonErgebnisType zmrPersonToKitt, Collection eidasDocumentToAdd, String citizenCountryCode) throws ServiceFault { final RequestType req = new RequestType(); // set work-flow client information - req.setWorkflowInfoClient(generateWorkFlowInfos(PROCESS_TASK_UPDATE, null)); + req.setWorkflowInfoClient(generateWorkFlowInfos(PROCESS_TASK_UPDATE, zmrProzessId)); req.setClientInfo(generateClientInfos()); PersonAendernRequest updateReq = new PersonAendernRequest(); diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ZmrClientProductionTest.java b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ZmrClientProductionTest.java index a338ebed..ba55c466 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ZmrClientProductionTest.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ZmrClientProductionTest.java @@ -61,6 +61,7 @@ public class ZmrClientProductionTest { } + @Ignore @Test public void searchWithMdsOnly() throws EidasSAuthenticationException { @@ -89,6 +90,12 @@ public class ZmrClientProductionTest { } + /* + * Ignore this test because "javier", "Garcia", "1964-12-31", "EE" is used as test-identity + * in test-country on vidp.gv.at. vidp.gv.at uses Test-SZR, but Test-SZR is connected to + * Q-ZMR and Q-ERnP. There is a staging problem because this test uses T-ZMR and T-ERnP. + */ + @Ignore @Test public void searchWithMdsOnlyEidasIdentity() throws EidasSAuthenticationException { @@ -136,7 +143,7 @@ public class ZmrClientProductionTest { } @Test - public void searchWithPersonalIdOnly() throws EidasSAuthenticationException { + public void searchWithPersonalIdOnlyNoExisting() throws EidasSAuthenticationException { final ZmrRegisterResult result = client.searchWithPersonIdentifier(null, RandomStringUtils.randomAlphanumeric(25), @@ -245,6 +252,73 @@ public class ZmrClientProductionTest { } + @Test + public void updateZmrEntryDeSpecific() throws EidasSAuthenticationException { + final String personalIdentifierFirst = "7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit"; + final String cc = "DE"; + final SimpleEidasData eidasDataFirst = SimpleEidasData.builder() + .citizenCountryCode(cc) + .familyName("XXXvon Brandenburg") + .givenName("XXXClaus - Maria") + .dateOfBirth("1994-12-31") + .personalIdentifier(cc + "/AT/" + personalIdentifierFirst) + .pseudonym(personalIdentifierFirst) + .placeOfBirth("Hintergigritzpotschn") + .birthName("XXXvon Heuburg") + .build(); + + // first login with update + // get initial result + final ZmrRegisterResult result = client.searchWithMds(null, + eidasDataFirst.getGivenName(), + eidasDataFirst.getFamilyName(), + eidasDataFirst.getDateOfBirth(), + eidasDataFirst.getCitizenCountryCode()); + assertNotNull("ZMR response", result); + assertEquals("personResult size", 1, result.getPersonResult().size()); + + // update ZMR entry + final ZmrRegisterResult updateResult = + client.update(result.getProcessId(), + result.getPersonResult().get(0), + eidasDataFirst); + + assertNotNull("ZMR response", updateResult); + assertEquals("personResult size", 1, updateResult.getPersonResult().size()); + + // check if ZMR entry can be found by first PersonalId + final ZmrRegisterResult firstPersonalIdResult = client.searchWithPersonIdentifier(null, + personalIdentifierFirst, cc); + assertNotNull("ZMR response", firstPersonalIdResult); + assertEquals("first personResult size", 1, firstPersonalIdResult.getPersonResult().size()); + + + // check if ZMR entry is not found by valid pseudonym but wrong country + final ZmrRegisterResult wrongPersonalIdResult = client.searchWithPersonIdentifier(null, + personalIdentifierFirst, "ES"); + assertNotNull("ZMR response", wrongPersonalIdResult); + assertEquals("first personResult size", 0, wrongPersonalIdResult.getPersonResult().size()); + + + // search CC-specific with MDS + placeOfBirth + birthName + final ZmrRegisterResult ccSpecificFirstEntry = client.searchCountrySpecific(null, + generateCustomRequest( + eidasDataFirst.getCitizenCountryCode(), + eidasDataFirst.getGivenName(), + eidasDataFirst.getFamilyName(), + eidasDataFirst.getDateOfBirth(), + null, + eidasDataFirst.getPlaceOfBirth(), + eidasDataFirst.getBirthName()), + cc); + + assertNotNull("ZMR response", ccSpecificFirstEntry); + assertNotNull("ZMR processId", ccSpecificFirstEntry.getProcessId()); + assertNotNull("ZMR personResult", ccSpecificFirstEntry.getPersonResult()); + assertEquals("personResult size", 1, ccSpecificFirstEntry.getPersonResult().size()); + + } + @Test public void updateZmrEntryTestIdentity2() throws EidasSAuthenticationException { final String personalIdentifierFirst = "7cEYSvKZasdfsafsaf4CDVzNT4E7cjkU4Vq_first"; @@ -310,29 +384,55 @@ public class ZmrClientProductionTest { assertEquals("personResult size", 1, updateResultSecond.getPersonResult().size()); + // check if ZMR entry can be found by first PersonalId + final ZmrRegisterResult firstPersonalIdResult = client.searchWithPersonIdentifier(null, + personalIdentifierFirst, cc); + assertNotNull("ZMR response", firstPersonalIdResult); + assertEquals("first personResult size", 1, firstPersonalIdResult.getPersonResult().size()); + + // check if ZMR entry can be found by second PersonalId + final ZmrRegisterResult secondPersonalIdResult = client.searchWithPersonIdentifier(null, + personalIdentifierFirst, cc); + assertNotNull("ZMR response", secondPersonalIdResult); + assertEquals("second personResult size", 1, secondPersonalIdResult.getPersonResult().size()); - - final ZmrRegisterResult afterUpdateResultMds = client.searchCountrySpecific(null, - generateCustomRequest("EE", "XXXHildegard", "XXXÖhlinger", "1971-02-18", - "7cEYSvKZasdfsafsaf4CDVzNT4E7cjkU4Vq", + // search CC-specific with first MDS + final ZmrRegisterResult ccSpecificFirstEntry = client.searchCountrySpecific(null, + generateCustomRequest( + eidasDataFirst.getCitizenCountryCode(), + eidasDataFirst.getGivenName(), + eidasDataFirst.getFamilyName(), + eidasDataFirst.getDateOfBirth(), + eidasDataFirst.getPseudonym(), null, null), cc); - assertNotNull("ZMR response", afterUpdateResultMds); - assertNotNull("ZMR processId", afterUpdateResultMds.getProcessId()); - assertNotNull("ZMR personResult", afterUpdateResultMds.getPersonResult()); - assertEquals("personResult size", 1, afterUpdateResultMds.getPersonResult().size()); + assertNotNull("ZMR response", ccSpecificFirstEntry); + assertNotNull("ZMR processId", ccSpecificFirstEntry.getProcessId()); + assertNotNull("ZMR personResult", ccSpecificFirstEntry.getPersonResult()); + assertEquals("personResult size", 1, ccSpecificFirstEntry.getPersonResult().size()); - // check if ZMR entry can be found by PersonalId - final ZmrRegisterResult afterUpdateResult = client.searchWithPersonIdentifier(null, - personalIdentifierFirst, cc); - - assertNotNull("ZMR response", afterUpdateResult); - assertEquals("personResult size", 1, afterUpdateResult.getPersonResult().size()); - + // search CC-specific with second MDS + final ZmrRegisterResult ccSpecificSecondEntry = client.searchCountrySpecific(null, + generateCustomRequest( + eidasDataSecond.getCitizenCountryCode(), + eidasDataSecond.getGivenName(), + eidasDataSecond.getFamilyName(), + eidasDataSecond.getDateOfBirth(), + eidasDataSecond.getPseudonym(), + null, + null), + cc); + + assertNotNull("ZMR response", ccSpecificSecondEntry); + assertNotNull("ZMR processId", ccSpecificSecondEntry.getProcessId()); + assertNotNull("ZMR personResult", ccSpecificSecondEntry.getPersonResult()); + assertEquals("personResult size", 1, ccSpecificSecondEntry.getPersonResult().size()); + + } diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ZmrClientTest.java b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ZmrClientTest.java new file mode 100644 index 00000000..127f5d3c --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/clients/ZmrClientTest.java @@ -0,0 +1,1074 @@ +package at.asitplus.eidas.specific.modules.auth.eidas.v2.test.clients; + +import static org.junit.Assert.assertEquals; +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 static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.when; + +import java.math.BigInteger; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; + +import org.apache.commons.lang3.RandomStringUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.cxf.binding.soap.SoapFault; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.ArgumentCaptor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.annotation.DirtiesContext.ClassMode; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import com.github.skjolber.mockito.soap.SoapServiceRule; + +import at.asitplus.eidas.specific.connector.test.config.dummy.MsConnectorDummyConfigMap; +import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants; +import at.asitplus.eidas.specific.modules.auth.eidas.v2.clients.zmr.ZmrSoapClient; +import at.asitplus.eidas.specific.modules.auth.eidas.v2.clients.zmr.ZmrSoapClient.ZmrRegisterResult; +import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.RegisterResult; +import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SimpleEidasData; +import at.asitplus.eidas.specific.modules.auth.eidas.v2.exception.EidasSAuthenticationException; +import at.asitplus.eidas.specific.modules.auth.eidas.v2.exception.WorkflowException; +import at.gv.bmi.namespace.zmr_su.base._20040201.RequestType; +import at.gv.bmi.namespace.zmr_su.base._20040201.ResponseType; +import at.gv.bmi.namespace.zmr_su.base._20040201_.ServicePort; +import at.gv.bmi.namespace.zmr_su.zmr._20040201.EidasIdentitaetAnlageType; +import at.gv.bmi.namespace.zmr_su.zmr._20040201.EidasSuchdatenType; +import at.gv.bmi.namespace.zmr_su.zmr._20040201.PersonAendernRequest; +import at.gv.bmi.namespace.zmr_su.zmr._20040201.PersonSuchenRequest; +import at.gv.bmi.namespace.zmr_su.zmr._20040201.PersonensucheInfoType; +import at.gv.e_government.reference.namespace.persondata.de._20040201.NatuerlichePersonTyp; +import at.gv.e_government.reference.namespace.persondata.de._20040201.PersonenNameTyp; +import at.gv.egiz.eaaf.core.exceptions.EaafException; +import lombok.SneakyThrows; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { + "/SpringTest-context_tasks_test.xml", + "/SpringTest-context_basic_mapConfig.xml" }) +@DirtiesContext(classMode = ClassMode.AFTER_CLASS) +public class ZmrClientTest { + + private static final String PROCESS_GENERAL = "GP_EIDAS"; + private static final String PROCESS_TASK_SEARCH = "ZPR_VO_Person_suchen_Meldevorgang"; + private static final String PROCESS_TASK_UPDATE = "ZPR_VO_Person_aendern"; + + @Autowired + MsConnectorDummyConfigMap basicConfig; + @Autowired + ZmrSoapClient client; + + @Rule + public SoapServiceRule soap = SoapServiceRule.newInstance(); + + private ServicePort zmrMock = null; + + private static JAXBContext jaxbContext; + + /** + * Initialize jUnit class. + */ + @BeforeClass + @SneakyThrows + public static void classInitializer() { + jaxbContext = JAXBContext.newInstance( + at.gv.bmi.namespace.zmr_su.zmr._20040201.ObjectFactory.class, + at.gv.bmi.namespace.zmr_su.gis._20070725.ObjectFactory.class, + at.gv.bmi.namespace.zmr_su.base._20040201.ObjectFactory.class); + } + + /** + * Initialize jUnit test. + */ + @Before + public void initializer() { + if (zmrMock == null) { + zmrMock = soap.mock(ServicePort.class, "http://localhost:1234/demozmr"); + } + } + + @Test + @SneakyThrows + public void searchWithMdsEmpty() { + String familyName = RandomStringUtils.randomAlphabetic(10); + String givenName = RandomStringUtils.randomAlphabetic(10); + String dateOfBirth = RandomStringUtils.randomAlphabetic(10); + final String cc = RandomStringUtils.randomAlphabetic(2).toUpperCase(); + BigInteger processId = new BigInteger(RandomStringUtils.randomNumeric(6)); + + final ArgumentCaptor zmrReq = ArgumentCaptor.forClass(RequestType.class); + + // inject response + when(zmrMock.service(zmrReq.capture(), any())).thenReturn( + loadResponseFromFile("/data/zmr/empty_zmr_result.xml")); + + // execute operation + ZmrRegisterResult resp = client.searchWithMds(processId, + givenName, familyName, dateOfBirth, cc); + + // validate state + assertNotNull("no ZMR response", resp); + assertEquals("wrong processId", "367100000000079", resp.getProcessId().toString()); + assertEquals("wrong resp size", 0, resp.getPersonResult().size()); + + // validate request + assertEquals("wrong number of req.", 1, zmrReq.getAllValues().size()); + assertNotNull("Personensuche req.", zmrReq.getValue().getPersonSuchenRequest()); + + checkBasicRequestParameters(zmrReq.getValue(), PROCESS_TASK_SEARCH, processId, "jUnit123456"); + PersonSuchenRequest pSuche = zmrReq.getValue().getPersonSuchenRequest(); + checkSearchParameters(pSuche.getPersonensucheInfo()); + + assertEquals("eidas Docs. size", 0, pSuche.getEidasSuchdaten().size()); + assertNotNull("mds", pSuche.getNatuerlichePerson()); + + assertEquals("req. givenName", givenName, pSuche.getNatuerlichePerson().getPersonenName().getVorname()); + assertEquals("req. familyName", familyName, pSuche.getNatuerlichePerson().getPersonenName().getFamilienname()); + assertEquals("req. dateOfBirth", dateOfBirth, pSuche.getNatuerlichePerson().getGeburtsdatum()); + + } + + @Test + @SneakyThrows + public void searchWithMdsGetHistoricInfos() { + String familyName = RandomStringUtils.randomAlphabetic(10); + String givenName = RandomStringUtils.randomAlphabetic(10); + String dateOfBirth = RandomStringUtils.randomAlphabetic(10); + final String cc = "EE"; + + BigInteger processId = new BigInteger(RandomStringUtils.randomNumeric(6)); + + final ArgumentCaptor zmrReq = ArgumentCaptor.forClass(RequestType.class); + + // inject response + when(zmrMock.service(zmrReq.capture(), any())).thenReturn( + loadResponseFromFile("/data/zmr/search_with_personalId_only_resp_historicIncluded.xml")); + + // execute operation + ZmrRegisterResult resp = client.searchWithMds(processId, + givenName, familyName, dateOfBirth, cc); + + // validate state + assertNotNull("no ZMR response", resp); + assertEquals("wrong processId", "367100000000080", resp.getProcessId().toString()); + assertEquals("wrong resp size", 0, resp.getPersonResult().size()); + + } + + @Test + @SneakyThrows + public void searchWithMdsSuccess() { + String familyName = RandomStringUtils.randomAlphabetic(10); + String givenName = RandomStringUtils.randomAlphabetic(10); + String dateOfBirth = RandomStringUtils.randomAlphabetic(10); + final String cc = "EE"; + + BigInteger processId = new BigInteger(RandomStringUtils.randomNumeric(6)); + + final ArgumentCaptor zmrReq = ArgumentCaptor.forClass(RequestType.class); + + // inject response + when(zmrMock.service(zmrReq.capture(), any())).thenReturn( + loadResponseFromFile("/data/zmr/search_with_personalId_only_resp_moreThanOne_2.xml")); + + // execute operation + ZmrRegisterResult resp = client.searchWithMds(processId, + givenName, familyName, dateOfBirth, cc); + + // validate state + assertNotNull("no ZMR response", resp); + assertEquals("wrong processId", "367100000000080", resp.getProcessId().toString()); + assertEquals("wrong resp size", 2, resp.getPersonResult().size()); + + // check first person + RegisterResult persInfo = resp.getPersonResult().get(0); + assertEquals("bPK", "9/MtsPZgBHQMBpQOD6aOY2TUqcY=", persInfo.getBpk()); + assertEquals("dateOfBirth", "1983-06-04", persInfo.getDateOfBirth()); + assertEquals("familyName", "XXXTüzekçi", persInfo.getFamilyName()); + assertEquals("givenName", "XXXŐzgür", persInfo.getGivenName()); + assertNull("placeOfBirth", persInfo.getPlaceOfBirth()); + assertNull("birthName", persInfo.getBirthName()); + assertEquals("num. stored eIDAS identifiers", 1, persInfo.getPseudonym().size()); + assertEquals("stored eIDAS identifiers", + "aabbcc_should_not_be_included_for_DE", persInfo.getPseudonym().get(0)); + + // check second person + RegisterResult persInfo2 = resp.getPersonResult().get(1); + assertEquals("bPK", "UgeknNsc26lVuB7U/uYGVmWtnnA=", persInfo2.getBpk()); + assertEquals("dateOfBirth", "1983-06-04", persInfo2.getDateOfBirth()); + assertEquals("familyName", "XXXTüzekçi", persInfo2.getFamilyName()); + assertEquals("givenName", "XXXŐzgür", persInfo2.getGivenName()); + assertEquals("num. stored eIDAS identifiers", 1, persInfo2.getPseudonym().size()); + assertEquals("stored eIDAS identifiers", + "7cEYSvKZasdfsafsaf4CDVzNT4E7cjkU4Vq_first", persInfo2.getPseudonym().get(0)); + + // validate request + assertEquals("wrong number of req.", 1, zmrReq.getAllValues().size()); + assertNotNull("Personensuche req.", zmrReq.getValue().getPersonSuchenRequest()); + checkBasicRequestParameters(zmrReq.getValue(), PROCESS_TASK_SEARCH, processId, "jUnit123456"); + PersonSuchenRequest pSuche = zmrReq.getValue().getPersonSuchenRequest(); + checkSearchParameters(pSuche.getPersonensucheInfo()); + + assertEquals("eidas Docs. size", 0, pSuche.getEidasSuchdaten().size()); + assertNotNull("mds", pSuche.getNatuerlichePerson()); + + assertEquals("req. givenName", givenName, pSuche.getNatuerlichePerson().getPersonenName().getVorname()); + assertEquals("req. familyName", familyName, pSuche.getNatuerlichePerson().getPersonenName().getFamilienname()); + assertEquals("req. dateOfBirth", dateOfBirth, pSuche.getNatuerlichePerson().getGeburtsdatum()); + + } + + //TODO: test does not throw the valid exception to catch the error that we like to test. + @Ignore + @Test + @SneakyThrows + public void searchWithPersonalIdentifierZmrError() { + final String personalIdentifierFirst = RandomStringUtils.randomAlphanumeric(10); + final String cc = RandomStringUtils.randomAlphabetic(2).toUpperCase(); + + // inject response + when(zmrMock.service(any(), any())).thenThrow(injectError(false)); + + // execute operation + EidasSAuthenticationException error = assertThrows("wrong Exception", EidasSAuthenticationException.class, + () -> client.searchWithPersonIdentifier(null, personalIdentifierFirst, cc)); + + assertEquals("wrong errorCode", "module.eidasauth.matching.01", error.getErrorId()); + + } + + @Test + @SneakyThrows + public void searchWithPersonalIdentifierZmrGenericError() { + final String personalIdentifierFirst = RandomStringUtils.randomAlphanumeric(10); + final String cc = RandomStringUtils.randomAlphabetic(2).toUpperCase(); + + // inject response + when(zmrMock.service(any(), any())).thenThrow(injectError(true)); + + // execute operation + EidasSAuthenticationException error = assertThrows("wrong Exception", EidasSAuthenticationException.class, + () -> client.searchWithPersonIdentifier(null, personalIdentifierFirst, cc)); + + assertEquals("wrong errorCode", "module.eidasauth.matching.99", error.getErrorId()); + + } + + @Test + @SneakyThrows + public void searchWithPersonalIdentifierGetHistoricInfos() { + final String personalIdentifierFirst = RandomStringUtils.randomAlphanumeric(10); + final String cc = RandomStringUtils.randomAlphabetic(2).toUpperCase(); + + final ArgumentCaptor zmrReq = ArgumentCaptor.forClass(RequestType.class); + + // inject response + when(zmrMock.service(zmrReq.capture(), any())).thenReturn( + loadResponseFromFile("/data/zmr/search_with_personalId_only_resp_historicIncluded.xml")); + + // execute operation + EidasSAuthenticationException error = assertThrows("wrong Exception", EidasSAuthenticationException.class, + () -> client.searchWithPersonIdentifier(null, personalIdentifierFirst, cc)); + + assertEquals("wrong errorCode", "module.eidasauth.matching.99", error.getErrorId()); + assertEquals("wrong errorCode", "module.eidasauth.matching.02", ((EaafException) error.getCause()).getErrorId()); + + } + + @Test + @SneakyThrows + public void searchWithPersonalIdentifierEmptyResult() { + final String personalIdentifierFirst = RandomStringUtils.randomAlphanumeric(10); + final String cc = RandomStringUtils.randomAlphabetic(2).toUpperCase(); + + final ArgumentCaptor zmrReq = ArgumentCaptor.forClass(RequestType.class); + + // inject response + when(zmrMock.service(zmrReq.capture(), any())).thenReturn( + loadResponseFromFile("/data/zmr/empty_zmr_result.xml")); + + // execute operation + ZmrRegisterResult resp = client.searchWithPersonIdentifier(null, personalIdentifierFirst, cc); + + // validate state + assertNotNull("no ZMR response", resp); + assertEquals("wrong processId", "367100000000079", resp.getProcessId().toString()); + assertEquals("wrong resp size", 0, resp.getPersonResult().size()); + + // validate request + assertEquals("wrong number of req.", 1, zmrReq.getAllValues().size()); + assertNotNull("Personensuche req.", zmrReq.getValue().getPersonSuchenRequest()); + + checkBasicRequestParameters(zmrReq.getValue(), PROCESS_TASK_SEARCH, null, "jUnit123456"); + PersonSuchenRequest pSuche = zmrReq.getValue().getPersonSuchenRequest(); + checkSearchParameters(pSuche.getPersonensucheInfo()); + + assertEquals("eidas Docs. size", 1, pSuche.getEidasSuchdaten().size()); + checkEidasDocumentResult(pSuche.getEidasSuchdaten(), + "http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier", cc, personalIdentifierFirst); + assertNull("mds", pSuche.getNatuerlichePerson()); + + } + + @Test + @SneakyThrows + public void searchWithPersonalIdentifierMoreThanOneResult() { + final String personalIdentifierFirst = RandomStringUtils.randomAlphanumeric(10); + final String cc = RandomStringUtils.randomAlphabetic(2).toUpperCase(); + + // inject response + when(zmrMock.service(any(), any())).thenReturn( + loadResponseFromFile("/data/zmr/search_with_personalId_only_resp_moreThanOne.xml")); + + // execute operation + WorkflowException error = assertThrows("wrong Exception", WorkflowException.class, + () -> client.searchWithPersonIdentifier(null, personalIdentifierFirst, cc)); + + assertEquals("wrong errorCode", "module.eidasauth.matching.03", error.getErrorId()); + assertEquals("wrong param 1", "Searching PersonIdentifier", error.getParams()[0]); + assertEquals("wrong param 2", "Find more-than-one ZMR entry with search criteria that has to be unique", + error.getParams()[1]); + + } + + @Test + @SneakyThrows + public void searchWithPersonalIdentifierSuccess() { + final String personalIdentifierFirst = "7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit"; + final String cc = "DE"; + final SimpleEidasData eidasDataFirst = SimpleEidasData.builder() + .citizenCountryCode(cc) + .familyName("XXXvon Brandenburg") + .givenName("XXXClaus - Maria") + .dateOfBirth("1994-12-31") + .personalIdentifier(cc + "/AT/" + personalIdentifierFirst) + .pseudonym(personalIdentifierFirst) + .build(); + + BigInteger processId = new BigInteger(RandomStringUtils.randomNumeric(6)); + + final ArgumentCaptor zmrReq = ArgumentCaptor.forClass(RequestType.class); + + // inject response + when(zmrMock.service(zmrReq.capture(), any())).thenReturn( + loadResponseFromFile("/data/zmr/search_with_personalId_only_resp.xml")); + + // execute operation + ZmrRegisterResult resp = client.searchWithPersonIdentifier(processId, + eidasDataFirst.getPseudonym(), eidasDataFirst.getCitizenCountryCode()); + + // validate state + assertNotNull("no ZMR response", resp); + assertEquals("wrong processId", "367100000000079", resp.getProcessId().toString()); + assertEquals("wrong resp size", 1, resp.getPersonResult().size()); + + RegisterResult persInfo = resp.getPersonResult().get(0); + assertEquals("bPK", "UgeknNsc26lVuB7U/uYGVmWtnnA=", persInfo.getBpk()); + assertEquals("dateOfBirth", eidasDataFirst.getDateOfBirth(), persInfo.getDateOfBirth()); + assertEquals("familyName", eidasDataFirst.getFamilyName(), persInfo.getFamilyName()); + assertEquals("givenName", eidasDataFirst.getGivenName(), persInfo.getGivenName()); + assertEquals("placeOfBirth", "Hintergigritzpotschn", persInfo.getPlaceOfBirth()); + assertEquals("birthName", "XXXvon Heuburg", persInfo.getBirthName()); + assertEquals("num. stored eIDAS identifiers", 2, persInfo.getPseudonym().size()); + assertEquals("stored eIDAS identifiers", "7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit", + persInfo.getPseudonym().get(0)); + assertEquals("stored eIDAS identifiers", + "7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit_second_one", + persInfo.getPseudonym().get(1)); + + // validate request + assertEquals("wrong number of req.", 1, zmrReq.getAllValues().size()); + assertNotNull("Personensuche req.", zmrReq.getValue().getPersonSuchenRequest()); + checkBasicRequestParameters(zmrReq.getValue(), PROCESS_TASK_SEARCH, processId, "jUnit123456"); + PersonSuchenRequest pSuche = zmrReq.getValue().getPersonSuchenRequest(); + checkSearchParameters(pSuche.getPersonensucheInfo()); + + assertEquals("eidas Docs. size", 1, pSuche.getEidasSuchdaten().size()); + checkEidasDocumentResult(pSuche.getEidasSuchdaten(), + "http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier", cc, personalIdentifierFirst); + assertNull("mds", pSuche.getNatuerlichePerson()); + + } + + @Test + @SneakyThrows + public void searchWithPersonalIdentifierNoBpkZP() { + final String personalIdentifierFirst = "7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit"; + final String cc = "DE"; + final SimpleEidasData eidasDataFirst = SimpleEidasData.builder() + .citizenCountryCode(cc) + .familyName("XXXvon Brandenburg") + .givenName("XXXClaus - Maria") + .dateOfBirth("1994-12-31") + .personalIdentifier(cc + "/AT/" + personalIdentifierFirst) + .pseudonym(personalIdentifierFirst) + .build(); + + BigInteger processId = new BigInteger(RandomStringUtils.randomNumeric(6)); + + final ArgumentCaptor zmrReq = ArgumentCaptor.forClass(RequestType.class); + + // inject response + when(zmrMock.service(zmrReq.capture(), any())).thenReturn( + loadResponseFromFile("/data/zmr/no_bpk_zp.xml")); + + // execute operation + ZmrRegisterResult resp = client.searchWithPersonIdentifier(processId, + eidasDataFirst.getPseudonym(), eidasDataFirst.getCitizenCountryCode()); + + // validate state + assertNotNull("no ZMR response", resp); + assertEquals("wrong processId", "367100000000079", resp.getProcessId().toString()); + assertEquals("wrong resp size", 1, resp.getPersonResult().size()); + + RegisterResult persInfo = resp.getPersonResult().get(0); + assertNull("bPK", persInfo.getBpk()); + assertEquals("dateOfBirth", eidasDataFirst.getDateOfBirth(), persInfo.getDateOfBirth()); + assertEquals("familyName", eidasDataFirst.getFamilyName(), persInfo.getFamilyName()); + assertEquals("givenName", eidasDataFirst.getGivenName(), persInfo.getGivenName()); + assertEquals("placeOfBirth", "Hintergigritzpotschn", persInfo.getPlaceOfBirth()); + assertEquals("birthName", "XXXvon Heuburg", persInfo.getBirthName()); + assertEquals("num. stored eIDAS identifiers", 2, persInfo.getPseudonym().size()); + assertEquals("stored eIDAS identifiers", "7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit", + persInfo.getPseudonym().get(0)); + assertEquals("stored eIDAS identifiers", + "7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit_second_one", + persInfo.getPseudonym().get(1)); + + // validate request + assertEquals("wrong number of req.", 1, zmrReq.getAllValues().size()); + assertNotNull("Personensuche req.", zmrReq.getValue().getPersonSuchenRequest()); + checkBasicRequestParameters(zmrReq.getValue(), PROCESS_TASK_SEARCH, processId, "jUnit123456"); + PersonSuchenRequest pSuche = zmrReq.getValue().getPersonSuchenRequest(); + checkSearchParameters(pSuche.getPersonensucheInfo()); + + assertEquals("eidas Docs. size", 1, pSuche.getEidasSuchdaten().size()); + checkEidasDocumentResult(pSuche.getEidasSuchdaten(), + "http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier", cc, personalIdentifierFirst); + assertNull("mds", pSuche.getNatuerlichePerson()); + + } + + @Test + @SneakyThrows + public void searchCcSpecificEmpty() { + BigInteger processId = new BigInteger(RandomStringUtils.randomNumeric(6)); + + final String cc = "DE"; + String familyName = RandomStringUtils.randomAlphabetic(10); + String givenName = RandomStringUtils.randomAlphabetic(10); + String dateOfBirth = RandomStringUtils.randomAlphabetic(10); + String personalIdentifier = RandomStringUtils.randomAlphabetic(10); + String placeOfBirth = RandomStringUtils.randomAlphabetic(10); + String birthName = RandomStringUtils.randomAlphabetic(10); + + final ArgumentCaptor zmrReq = ArgumentCaptor.forClass(RequestType.class); + + // inject response + when(zmrMock.service(zmrReq.capture(), any())).thenReturn( + loadResponseFromFile("/data/zmr/empty_zmr_result.xml")); + + // execute operation + ZmrRegisterResult resp = client.searchCountrySpecific(processId, + generateCustomRequest(cc, familyName, givenName, dateOfBirth, personalIdentifier, placeOfBirth, birthName), + cc); + + // validate state + assertNotNull("no ZMR response", resp); + assertEquals("wrong processId", "367100000000079", resp.getProcessId().toString()); + assertEquals("wrong resp size", 0, resp.getPersonResult().size()); + + } + + @Test + @SneakyThrows + public void searchCcSpecificMoreThanOneResult() { + BigInteger processId = new BigInteger(RandomStringUtils.randomNumeric(6)); + + final String cc = "DE"; + String familyName = RandomStringUtils.randomAlphabetic(10); + String givenName = RandomStringUtils.randomAlphabetic(10); + String dateOfBirth = RandomStringUtils.randomAlphabetic(10); + String personalIdentifier = RandomStringUtils.randomAlphabetic(10); + String placeOfBirth = RandomStringUtils.randomAlphabetic(10); + String birthName = RandomStringUtils.randomAlphabetic(10); + + final ArgumentCaptor zmrReq = ArgumentCaptor.forClass(RequestType.class); + + // inject response + when(zmrMock.service(zmrReq.capture(), any())).thenReturn( + loadResponseFromFile("/data/zmr/search_with_personalId_only_resp_moreThanOne.xml")); + + // execute operation + WorkflowException error = assertThrows("wrong Exception", WorkflowException.class, + () -> client.searchCountrySpecific(processId, + generateCustomRequest(cc, familyName, givenName, dateOfBirth, personalIdentifier, placeOfBirth, birthName), + cc)); + + assertEquals("wrong errorCode", "module.eidasauth.matching.03", error.getErrorId()); + assertEquals("wrong param 1", "Searching DE specific", error.getParams()[0]); + assertEquals("wrong param 2", "Find more-than-one ZMR entry with search criteria that has to be unique", + error.getParams()[1]); + + } + + @Test + @SneakyThrows + public void searchCcSpecificSuccess() { + final String personalIdentifierFirst = "7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit"; + final String cc = "DE"; + final SimpleEidasData eidasDataFirst = SimpleEidasData.builder() + .citizenCountryCode(cc) + .familyName("XXXvon Brandenburg") + .givenName("XXXClaus - Maria") + .dateOfBirth("1994-12-31") + .personalIdentifier(cc + "/AT/" + personalIdentifierFirst) + .pseudonym(personalIdentifierFirst) + .build(); + + BigInteger processId = new BigInteger(RandomStringUtils.randomNumeric(6)); + + String familyName = RandomStringUtils.randomAlphabetic(10); + String givenName = RandomStringUtils.randomAlphabetic(10); + String dateOfBirth = RandomStringUtils.randomAlphabetic(10); + String personalIdentifier = RandomStringUtils.randomAlphabetic(10); + String placeOfBirth = RandomStringUtils.randomAlphabetic(10); + String birthName = RandomStringUtils.randomAlphabetic(10); + + final ArgumentCaptor zmrReq = ArgumentCaptor.forClass(RequestType.class); + + // inject response + when(zmrMock.service(zmrReq.capture(), any())).thenReturn( + loadResponseFromFile("/data/zmr/search_with_personalId_only_resp.xml")); + + // execute operation + ZmrRegisterResult resp = client.searchCountrySpecific(processId, + generateCustomRequest(cc, familyName, givenName, dateOfBirth, personalIdentifier, placeOfBirth, birthName), + cc); + + // validate state + assertNotNull("no ZMR response", resp); + assertEquals("wrong processId", "367100000000079", resp.getProcessId().toString()); + assertEquals("wrong resp size", 1, resp.getPersonResult().size()); + + RegisterResult persInfo = resp.getPersonResult().get(0); + assertEquals("bPK", "UgeknNsc26lVuB7U/uYGVmWtnnA=", persInfo.getBpk()); + assertEquals("dateOfBirth", eidasDataFirst.getDateOfBirth(), persInfo.getDateOfBirth()); + assertEquals("familyName", eidasDataFirst.getFamilyName(), persInfo.getFamilyName()); + assertEquals("givenName", eidasDataFirst.getGivenName(), persInfo.getGivenName()); + assertEquals("placeOfBirth", "Hintergigritzpotschn", persInfo.getPlaceOfBirth()); + assertEquals("birthName", "XXXvon Heuburg", persInfo.getBirthName()); + assertEquals("num. stored eIDAS identifiers", 2, persInfo.getPseudonym().size()); + assertEquals("stored eIDAS identifiers", "7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit", + persInfo.getPseudonym().get(0)); + assertEquals("stored eIDAS identifiers", + "7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit_second_one", + persInfo.getPseudonym().get(1)); + + // validate request + assertEquals("wrong number of req.", 1, zmrReq.getAllValues().size()); + assertNotNull("Personensuche req.", zmrReq.getValue().getPersonSuchenRequest()); + checkBasicRequestParameters(zmrReq.getValue(), PROCESS_TASK_SEARCH, processId, "jUnit123456"); + PersonSuchenRequest pSuche = zmrReq.getValue().getPersonSuchenRequest(); + checkSearchParameters(pSuche.getPersonensucheInfo()); + + assertEquals("eidas Docs. size", 3, pSuche.getEidasSuchdaten().size()); + checkEidasDocumentResult(pSuche.getEidasSuchdaten(), + "http://eidas.europa.eu/attributes/naturalperson/PlaceOfBirth", cc, placeOfBirth); + checkEidasDocumentResult(pSuche.getEidasSuchdaten(), + "http://eidas.europa.eu/attributes/naturalperson/BirthName", cc, birthName); + checkEidasDocumentResult(pSuche.getEidasSuchdaten(), + "http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier", cc, personalIdentifier); + + assertNotNull("mds", pSuche.getNatuerlichePerson()); + assertEquals("req. givenName", givenName, pSuche.getNatuerlichePerson().getPersonenName().getVorname()); + assertEquals("req. familyName", familyName, pSuche.getNatuerlichePerson().getPersonenName().getFamilienname()); + assertEquals("req. dateOfBirth", dateOfBirth, pSuche.getNatuerlichePerson().getGeburtsdatum()); + + } + + @Test + @SneakyThrows + public void updateProcessNoLatestVersionResult() { + BigInteger processId = new BigInteger(RandomStringUtils.randomNumeric(6)); + + final String personalIdentifier = "7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit"; + final String cc = "DE"; + final SimpleEidasData eidasData = SimpleEidasData.builder() + .citizenCountryCode(cc) + .familyName("XXXvon Brandenburg") + .givenName("XXXClaus - Maria") + .dateOfBirth("1994-12-31") + .personalIdentifier(cc + "/AT/" + personalIdentifier) + .pseudonym(personalIdentifier) + .birthName("XXXvon Heuburg") + .placeOfBirth("Hintergigritzpotschn") + .build(); + + RegisterResult toUpdate = RegisterResult.builder() + .bpk("UgeknNsc26lVuB7U/uYGVmWtnnA=") + .dateOfBirth("1994-12-31") + .familyName("XXXvon Brandenburg") + .givenName("XXXClaus - Maria") + //.birthName("") + //.placeOfBirth("") + //.pseudonym(Arrays.asList("")) + .build(); + + + final ArgumentCaptor zmrReq = ArgumentCaptor.forClass(RequestType.class); + + // inject response + when(zmrMock.service(zmrReq.capture(), any())) + .thenReturn(loadResponseFromFile("/data/zmr/empty_zmr_result.xml")) + .thenThrow(new RuntimeException("Request not needed any more")); + + + // execute operation + WorkflowException error = assertThrows("wrong Exception", WorkflowException.class, + () -> client.update(processId, toUpdate, eidasData)); + + assertEquals("wrong errorCode", "module.eidasauth.matching.03", error.getErrorId()); + assertEquals("wrong param 1", "KITT get-latest-version", error.getParams()[0]); + assertEquals("wrong param 2", "Find NO data-set with already matchted eID during ZMR KITT process", + error.getParams()[1]); + + } + + @Test + @SneakyThrows + public void updateProcessMultiLatestVersionResult() { + BigInteger processId = new BigInteger(RandomStringUtils.randomNumeric(6)); + + final String personalIdentifier = "7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit"; + final String cc = "DE"; + final SimpleEidasData eidasData = SimpleEidasData.builder() + .citizenCountryCode(cc) + .familyName("XXXvon Brandenburg") + .givenName("XXXClaus - Maria") + .dateOfBirth("1994-12-31") + .personalIdentifier(cc + "/AT/" + personalIdentifier) + .pseudonym(personalIdentifier) + .birthName("XXXvon Heuburg") + .placeOfBirth("Hintergigritzpotschn") + .build(); + + RegisterResult toUpdate = RegisterResult.builder() + .bpk("UgeknNsc26lVuB7U/uYGVmWtnnA=") + .dateOfBirth("1994-12-31") + .familyName("XXXvon Brandenburg") + .givenName("XXXClaus - Maria") + //.birthName("") + //.placeOfBirth("") + //.pseudonym(Arrays.asList("")) + .build(); + + + final ArgumentCaptor zmrReq = ArgumentCaptor.forClass(RequestType.class); + + // inject response + when(zmrMock.service(zmrReq.capture(), any())) + .thenReturn(loadResponseFromFile("/data/zmr/search_with_personalId_only_resp_moreThanOne.xml")) + .thenThrow(new RuntimeException("Request not needed any more")); + + + // execute operation + WorkflowException error = assertThrows("wrong Exception", WorkflowException.class, + () -> client.update(processId, toUpdate, eidasData)); + + assertEquals("wrong errorCode", "module.eidasauth.matching.03", error.getErrorId()); + assertEquals("wrong param 1", "KITT get-latest-version", error.getParams()[0]); + assertEquals("wrong param 2", "Find MORE-THAN-ONE data-sets with already matchted eID during ZMR KITT process", + error.getParams()[1]); + + } + + @Test + @SneakyThrows + public void updateProcessRequired() { + BigInteger processId = new BigInteger(RandomStringUtils.randomNumeric(6)); + + final String personalIdentifier = "7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit"; + final String cc = "DE"; + final SimpleEidasData eidasData = SimpleEidasData.builder() + .citizenCountryCode(cc) + .familyName("XXXvon Brandenburg") + .givenName("XXXClaus - Maria") + .dateOfBirth("1994-12-31") + .personalIdentifier(cc + "/AT/" + personalIdentifier) + .pseudonym(personalIdentifier) + .birthName("XXXvon Heuburg") + .placeOfBirth("Hintergigritzpotschn") + .build(); + + RegisterResult toUpdate = RegisterResult.builder() + .bpk("UgeknNsc26lVuB7U/uYGVmWtnnA=") + .dateOfBirth("1994-12-31") + .familyName("XXXvon Brandenburg") + .givenName("XXXClaus - Maria") + //.birthName("") + //.placeOfBirth("") + //.pseudonym(Arrays.asList("")) + .build(); + + + final ArgumentCaptor zmrReq = ArgumentCaptor.forClass(RequestType.class); + + // inject response + when(zmrMock.service(zmrReq.capture(), any())) + .thenReturn(loadResponseFromFile("/data/zmr/seq_1-4_kitt_get_latest_version_resp.xml")) + .thenReturn(loadResponseFromFile("/data/zmr/seq_1-6_kitt_update_resp.xml")) + .thenThrow(new RuntimeException("Request not needed any more")); + + + // execute operation + ZmrRegisterResult resp = client.update(processId, toUpdate, eidasData); + + // validate request + assertEquals("wrong number of req.", 2, zmrReq.getAllValues().size()); + + // check get laterst version request + RequestType firstReq = zmrReq.getAllValues().get(0); + assertNotNull("1 req.", firstReq.getPersonSuchenRequest()); + checkBasicRequestParameters(firstReq , PROCESS_TASK_SEARCH, processId, "jUnit123456"); + PersonSuchenRequest pSuche = firstReq .getPersonSuchenRequest(); + checkSearchParameters(pSuche.getPersonensucheInfo()); + assertNull("1 req. ZMR Zahl", pSuche.getZMRZahl()); + assertEquals("1 req. identifier size", 1, + pSuche.getNatuerlichePerson().getIdentification().size()); + assertEquals("1 req. givenName", toUpdate.getBpk(), + pSuche.getNatuerlichePerson().getIdentification().get(0).getValue()); + assertEquals("1 req. givenName", "urn:publicid:gv.at:cdid+ZP", + pSuche.getNatuerlichePerson().getIdentification().get(0).getType()); + assertNotNull("1 mds", pSuche.getNatuerlichePerson()); + assertEquals("1 req. givenName", toUpdate.getGivenName(), + pSuche.getNatuerlichePerson().getPersonenName().getVorname()); + assertEquals("1 req. familyName", toUpdate.getFamilyName(), + pSuche.getNatuerlichePerson().getPersonenName().getFamilienname()); + assertEquals("1 req. dateOfBirth", toUpdate.getDateOfBirth(), + pSuche.getNatuerlichePerson().getGeburtsdatum()); + + + // check update request + RequestType secondReq = zmrReq.getAllValues().get(1); + assertNotNull("2 req.", secondReq.getPersonAendernRequest()); + checkBasicRequestParameters(secondReq , PROCESS_TASK_UPDATE, processId, "jUnit123456"); + PersonAendernRequest secondpSuche = secondReq.getPersonAendernRequest(); + + assertEquals("2 req. ZMR Zahl", "000430320173", secondpSuche.getPersonReferenz().getZMRZahl()); + assertEquals("2 req. tech. Ref. value", "44453600000000697", + secondpSuche.getPersonReferenz().getTechnisch().getEntityID()); + assertEquals("2 req. tech. Ref. date", "2020-02-05T13:07:06.311", + secondpSuche.getPersonReferenz().getTechnisch().getLetzteAenderung().toString()); + + assertEquals("eidas Docs. size", 3, secondpSuche.getEidasIdentitaetAnlage().size()); + checkEidasDocumentAdd(secondpSuche.getEidasIdentitaetAnlage(), + "http://eidas.europa.eu/attributes/naturalperson/PlaceOfBirth", cc, eidasData.getPlaceOfBirth()); + checkEidasDocumentAdd(secondpSuche.getEidasIdentitaetAnlage(), + "http://eidas.europa.eu/attributes/naturalperson/BirthName", cc, eidasData.getBirthName()); + checkEidasDocumentAdd(secondpSuche.getEidasIdentitaetAnlage(), + "http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier", cc, eidasData.getPseudonym()); + + + // validate state + assertNotNull("no ZMR response", resp); + assertEquals("wrong processId", "366200000000082", resp.getProcessId().toString()); + assertEquals("wrong resp size", 1, resp.getPersonResult().size()); + + } + + @Test + @SneakyThrows + public void updateProcessNoUpdateRequired() { + BigInteger processId = new BigInteger(RandomStringUtils.randomNumeric(6)); + + final String personalIdentifier = "7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit"; + final String cc = "DE"; + final SimpleEidasData eidasData = SimpleEidasData.builder() + .citizenCountryCode(cc) + .familyName("XXXvon Brandenburg") + .givenName("XXXClaus - Maria") + .dateOfBirth("1994-12-31") + .personalIdentifier(cc + "/AT/" + personalIdentifier) + .pseudonym(personalIdentifier) + .birthName("XXXvon Heuburg") + .placeOfBirth("Hintergigritzpotschn") + .build(); + + RegisterResult toUpdate = RegisterResult.builder() + .bpk("UgeknNsc26lVuB7U/uYGVmWtnnA=") + .dateOfBirth("1994-12-31") + .familyName("XXXvon Brandenburg") + .givenName("XXXClaus - Maria") + .birthName("XXXvon Heuburg") + .placeOfBirth("Hintergigritzpotschn") + .pseudonym(Arrays.asList(personalIdentifier)) + .build(); + + + final ArgumentCaptor zmrReq = ArgumentCaptor.forClass(RequestType.class); + + // inject response + when(zmrMock.service(zmrReq.capture(), any())) + .thenReturn(loadResponseFromFile("/data/zmr/seq_1-8_search_with_personalId_only_resp.xml")) + .thenThrow(new RuntimeException("Request not needed any more")); + + + // execute operation + ZmrRegisterResult resp = client.update(processId, toUpdate, eidasData); + + // validate request + assertEquals("wrong number of req.", 1, zmrReq.getAllValues().size()); + + // check get laterst version request + RequestType firstReq = zmrReq.getAllValues().get(0); + assertNotNull("1 req.", firstReq.getPersonSuchenRequest()); + checkBasicRequestParameters(firstReq , PROCESS_TASK_SEARCH, processId, "jUnit123456"); + PersonSuchenRequest pSuche = firstReq .getPersonSuchenRequest(); + checkSearchParameters(pSuche.getPersonensucheInfo()); + assertNull("1 req. ZMR Zahl", pSuche.getZMRZahl()); + assertEquals("1 req. identifier size", 1, + pSuche.getNatuerlichePerson().getIdentification().size()); + assertEquals("1 req. givenName", toUpdate.getBpk(), + pSuche.getNatuerlichePerson().getIdentification().get(0).getValue()); + assertEquals("1 req. givenName", "urn:publicid:gv.at:cdid+ZP", + pSuche.getNatuerlichePerson().getIdentification().get(0).getType()); + assertNotNull("1 mds", pSuche.getNatuerlichePerson()); + assertEquals("1 req. givenName", toUpdate.getGivenName(), + pSuche.getNatuerlichePerson().getPersonenName().getVorname()); + assertEquals("1 req. familyName", toUpdate.getFamilyName(), + pSuche.getNatuerlichePerson().getPersonenName().getFamilienname()); + assertEquals("1 req. dateOfBirth", toUpdate.getDateOfBirth(), + pSuche.getNatuerlichePerson().getGeburtsdatum()); + + + // validate state + assertNotNull("no ZMR response", resp); + assertEquals("wrong processId", processId.toString(), resp.getProcessId().toString()); + assertEquals("wrong resp size", 1, resp.getPersonResult().size()); + + } + + @Test + @SneakyThrows + public void updateProcessSomeSpecialCases() { + BigInteger processId = new BigInteger(RandomStringUtils.randomNumeric(6)); + + final String personalIdentifier = RandomStringUtils.randomAlphanumeric(10); + final String cc = "DE"; + final SimpleEidasData eidasData = SimpleEidasData.builder() + .citizenCountryCode(cc) + .familyName("XXXvon Brandenburg") + .givenName("XXXClaus - Maria") + .dateOfBirth("1994-12-31") + .personalIdentifier(cc + "/AT/" + personalIdentifier) + .pseudonym(personalIdentifier) + .birthName("") //empty addr. values should be ignored + .placeOfBirth(RandomStringUtils.randomAlphabetic(10)) //should be ignored because it was already set for DE + .build(); + + RegisterResult toUpdate = RegisterResult.builder() + .bpk("UgeknNsc26lVuB7U/uYGVmWtnnA=") + .dateOfBirth("1994-12-31") + .familyName("XXXvon Brandenburg") + .givenName("XXXClaus - Maria") + .birthName("XXXvon Heuburg") + .placeOfBirth("Hintergigritzpotschn") + .pseudonym(Arrays.asList("7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit")) + .build(); + + + final ArgumentCaptor zmrReq = ArgumentCaptor.forClass(RequestType.class); + + // inject response + when(zmrMock.service(zmrReq.capture(), any())) + .thenReturn(loadResponseFromFile("/data/zmr/seq_1-8_search_with_personalId_only_resp.xml")) + .thenReturn(loadResponseFromFile("/data/zmr/seq_1-6_kitt_update_resp.xml")) + .thenThrow(new RuntimeException("Request not needed any more")); + + + // execute operation + ZmrRegisterResult resp = client.update(processId, toUpdate, eidasData); + + // validate request + assertEquals("wrong number of req.", 2, zmrReq.getAllValues().size()); + + // check get latest version request + RequestType firstReq = zmrReq.getAllValues().get(0); + assertNotNull("1 req.", firstReq.getPersonSuchenRequest()); + checkBasicRequestParameters(firstReq , PROCESS_TASK_SEARCH, processId, "jUnit123456"); + PersonSuchenRequest pSuche = firstReq .getPersonSuchenRequest(); + checkSearchParameters(pSuche.getPersonensucheInfo()); + assertNull("1 req. ZMR Zahl", pSuche.getZMRZahl()); + assertEquals("1 req. identifier size", 1, + pSuche.getNatuerlichePerson().getIdentification().size()); + assertEquals("1 req. givenName", toUpdate.getBpk(), + pSuche.getNatuerlichePerson().getIdentification().get(0).getValue()); + assertEquals("1 req. givenName", "urn:publicid:gv.at:cdid+ZP", + pSuche.getNatuerlichePerson().getIdentification().get(0).getType()); + assertNotNull("1 mds", pSuche.getNatuerlichePerson()); + assertEquals("1 req. givenName", toUpdate.getGivenName(), + pSuche.getNatuerlichePerson().getPersonenName().getVorname()); + assertEquals("1 req. familyName", toUpdate.getFamilyName(), + pSuche.getNatuerlichePerson().getPersonenName().getFamilienname()); + assertEquals("1 req. dateOfBirth", toUpdate.getDateOfBirth(), + pSuche.getNatuerlichePerson().getGeburtsdatum()); + + // check update request + RequestType secondReq = zmrReq.getAllValues().get(1); + assertNotNull("2 req.", secondReq.getPersonAendernRequest()); + checkBasicRequestParameters(secondReq , PROCESS_TASK_UPDATE, processId, "jUnit123456"); + PersonAendernRequest secondpSuche = secondReq.getPersonAendernRequest(); + + assertEquals("2 req. ZMR Zahl", "000430320173", secondpSuche.getPersonReferenz().getZMRZahl()); + assertEquals("2 req. tech. Ref. value", "44453600000000697", + secondpSuche.getPersonReferenz().getTechnisch().getEntityID()); + assertEquals("2 req. tech. Ref. date", "2020-02-05T13:07:06.311", + secondpSuche.getPersonReferenz().getTechnisch().getLetzteAenderung().toString()); + + + // only one attribute for update because birthname is empty and placeOfBirth was already set for DE + assertEquals("eidas Docs. size", 1, secondpSuche.getEidasIdentitaetAnlage().size()); + checkEidasDocumentAdd(secondpSuche.getEidasIdentitaetAnlage(), + "http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier", cc, eidasData.getPseudonym()); + + + // validate state + assertNotNull("no ZMR response", resp); + assertEquals("wrong processId", "366200000000082", resp.getProcessId().toString()); + assertEquals("wrong resp size", 1, resp.getPersonResult().size()); + + } + + + private PersonSuchenRequest generateCustomRequest(String cc, String familyName, String givenName, + String dateOfBirth, String personalId, String placeOfBirth, String birthName) { + final PersonSuchenRequest req = new PersonSuchenRequest(); + + // set basic MDS information + final NatuerlichePersonTyp searchNatPerson = new NatuerlichePersonTyp(); + req.setNatuerlichePerson(searchNatPerson); + final PersonenNameTyp searchNatPersonName = new PersonenNameTyp(); + searchNatPerson.setPersonenName(searchNatPersonName); + searchNatPersonName.setFamilienname(familyName); + searchNatPersonName.setVorname(givenName); + searchNatPerson.setGeburtsdatum(dateOfBirth); + + // add addtional eIDAS attributes if available + addIfAvailable(req.getEidasSuchdaten(), cc, Constants.eIDAS_ATTRURN_PLACEOFBIRTH, placeOfBirth); + addIfAvailable(req.getEidasSuchdaten(), cc, Constants.eIDAS_ATTRURN_BIRTHNAME, birthName); + addIfAvailable(req.getEidasSuchdaten(), cc, Constants.eIDAS_ATTRURN_PERSONALIDENTIFIER, personalId); + + return req; + + } + + private void addIfAvailable(List eidasSuchdaten, + String cc, String attrName, String attrValue) { + if (StringUtils.isNotEmpty(attrValue)) { + eidasSuchdaten.add(buildEidasSuchData(cc, attrName, attrValue)); + + } + } + + private EidasSuchdatenType buildEidasSuchData(String cc, String attrName, String attrValue) { + final EidasSuchdatenType eidasInfos = new EidasSuchdatenType(); + eidasInfos.setStaatscode2(cc); + eidasInfos.setEidasArt(attrName); + eidasInfos.setEidasWert(attrValue); + return eidasInfos; + + } + + private void checkSearchParameters(PersonensucheInfoType toCheck) { + assertTrue("searchWithHistory flag", toCheck.getSuchkriterien().isInclusivHistorie()); + assertFalse("withERsB flag", toCheck.getSuchkriterien().isInclusivERnP()); + assertFalse("formalisiert flag", toCheck.getSuchkriterien().isFormalisiert()); + assertFalse("resultWithHistory flag", toCheck.getErgebniskriterien().isInclusivHistorie()); + + } + + private void checkEidasDocumentResult(List list, String type, String cc, String value) { + Optional eidasDoc = list.stream() + .filter(el -> type.equals(el.getEidasArt())) + .findFirst(); + + assertTrue("eidas doc: " + type, eidasDoc.isPresent()); + assertEquals("eIDAS docType", type, eidasDoc.get().getEidasArt()); + assertEquals("eIDAS docValue", value, eidasDoc.get().getEidasWert()); + assertEquals("eIDAS docCC", cc, eidasDoc.get().getStaatscode2()); + + } + + private void checkEidasDocumentAdd(List list, String type, String cc, + String value) { + Optional eidasDoc = list.stream() + .filter(el -> type.equals(el.getEidasArt())) + .findFirst(); + + assertTrue("eidas doc: " + type, eidasDoc.isPresent()); + assertEquals("eIDAS docType", type, eidasDoc.get().getEidasArt()); + assertEquals("eIDAS docValue", value, eidasDoc.get().getEidasWert()); + assertEquals("eIDAS docCC", cc, eidasDoc.get().getStaatscode2()); + + } + + private void checkBasicRequestParameters(RequestType requestType, String vorgangName, BigInteger processId, + String behoerdennummer) { + assertNotNull("no workflow infos", requestType.getWorkflowInfoClient()); + assertEquals("processName", PROCESS_GENERAL, requestType.getWorkflowInfoClient().getProzessName()); + assertEquals("vorgangsName", vorgangName, requestType.getWorkflowInfoClient().getVorgangName()); + + if (processId != null) { + assertEquals("processId", processId, requestType.getWorkflowInfoClient().getProzessInstanzID()); + } else { + assertNull("processId", requestType.getWorkflowInfoClient().getProzessInstanzID()); + } + + assertNotNull("no client infos", requestType.getClientInfo()); + assertEquals("behoerdennummer", behoerdennummer, requestType.getClientInfo().getOrganisation() + .getBehoerdenNr()); + } + + private ResponseType loadResponseFromFile(String filepath) throws JAXBException { + final Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); + JAXBElement resp = (JAXBElement) unmarshaller.unmarshal(ZmrClientTest.class.getResourceAsStream( + filepath)); + return (ResponseType) resp.getValue(); + + } + + private Throwable injectError(boolean isGeneric) { + javax.xml.namespace.QName qName; + if (isGeneric) { + qName = new javax.xml.namespace.QName("urn:SZRServices", "F455", "p344"); + + } else { + qName = new javax.xml.namespace.QName("http://bmi.gv.at/namespace/zmr-su/base/20040201#", "ServiceFault", "zmr"); + + } + final SoapFault fault = new SoapFault( + "The travel document you sent to insert a person already exists for another person. " + "Either check the document or have the person altered accordingly", + qName); + fault.setRole("zmr:ServiceFault"); + return fault; + + } + +} diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/config/junit_config_1.properties b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/config/junit_config_1.properties index 9e6876f4..be716e95 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/config/junit_config_1.properties +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/config/junit_config_1.properties @@ -95,7 +95,7 @@ eidas.ms.auth.eIDAS.node_v2.attributes.requested.representation.5=LegalName,true #### matching###### # ZMR communication -eidas.ms.auth.eIDAS.zmrclient.endpoint=http://localhost:1234/demoszr +eidas.ms.auth.eIDAS.zmrclient.endpoint=http://localhost:1234/demozmr eidas.ms.auth.eIDAS.zmrclient.req.organisation.behoerdennr=jUnit123456 eidas.ms.auth.eIDAS.zmrclient.req.update.reason.code=EIDAS-KITT diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/empty_zmr_result.xml b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/empty_zmr_result.xml new file mode 100644 index 00000000..a968fabc --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/empty_zmr_result.xml @@ -0,0 +1,39 @@ + + + + GP_EIDAS + 367100000000079 + 0 + + + ZMR-Server Version: 5.9.0.0-SNAPSHOT + 2021-11-12T08:24:40.985 + 1877300000000139 + + + + + Searching PersonIdentifier + + true + false + + + false + + 10 + + + + + 5020 + Person nicht gefunden. + + + 0 + 0 + 0 + 1 + + + diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/no_bpk_zp.xml b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/no_bpk_zp.xml new file mode 100644 index 00000000..8104573e --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/no_bpk_zp.xml @@ -0,0 +1,290 @@ + + + + GP_EIDAS + 367100000000079 + 0 + + + ZMR-Server Version: 5.9.0.0-SNAPSHOT + 2021-11-12T08:24:40.985 + 1877300000000139 + + + + + Searching PersonIdentifier + + true + false + + + false + + 10 + + + + + 5020 + Person gefunden. + + + 2 + 0 + 0 + 1 + + + + + 2021-11-12T08:24:39.695 + + + + 44453600000000697 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + SONSTIGES + Sonstiges + Testerperson + + + 109091 + + + + 000430320173 + + + UgeknNsc26lVuB7U/uYGVmWtnnA= + urn:publicid:gv.at:cdid+GH + + + XXXClaus - Maria + XXXvon Brandenburg + + unbekannt + männlich + 1994-12-31 + Wien + Wien + Österreich + + AUT + Österreich + + + 44453600000000727 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + STAATSANGEH_ANLEGEN + Staatsangehörigkeit anlegen + Testerperson + + + 109091 + + + + + + + + + 1879000000000001 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/BirthName + DE + + XXXvon Heuburg + 9999-12-31 + 9999-12-31 + + + + + 1879000000000003 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PlaceOfBirth + DE + + Hintergigritzpotschn + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + DE + + 7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + EE + + aabbcc_should_not_be_included_for_DE + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + DE + + 7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit_second_one + 9999-12-31 + 9999-12-31 + + + + + + + 2020-02-05T13:07:06.311 + + + + 44453500000005242 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + WSANM + Wohnsitz anmelden + + + 109091 + + + + + + 0088 + Testgemeinde + 09988 + Testort A + + Testgasse + 1a-2b + Stg. 3c-4d + 5 + H + false + 0001 + + T800001 + 001 + T800001 + + + + HST111WWW + + T8001 + T80001 + T80000000001 + T80000000002 + + H + Testpostort + + 2020-02-05T13:07:06.311 + WSANM + Wohnsitz anmelden + + + + 44453500000005262 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + AUSK_SPERRE_SETZ + Auskunftssperre setzen + + + 109091 + + + + 2020-02-05T13:07:06.311 + 9999-12-31T23:59:59.000 + ASMG + Auskunftssperre nach § 18 / 2ff MeldeG + automatische Auskunftssperre + + + + + + + diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/search_with_personalId_only_resp.xml b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/search_with_personalId_only_resp.xml new file mode 100644 index 00000000..3d63472f --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/search_with_personalId_only_resp.xml @@ -0,0 +1,290 @@ + + + + GP_EIDAS + 367100000000079 + 0 + + + ZMR-Server Version: 5.9.0.0-SNAPSHOT + 2021-11-12T08:24:40.985 + 1877300000000139 + + + + + Searching PersonIdentifier + + true + false + + + false + + 10 + + + + + 5020 + Person gefunden. + + + 1 + 0 + 0 + 1 + + + + + 2021-11-12T08:24:39.695 + + + + 44453600000000697 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + SONSTIGES + Sonstiges + Testerperson + + + 109091 + + + + 000430320173 + + + UgeknNsc26lVuB7U/uYGVmWtnnA= + urn:publicid:gv.at:cdid+ZP + + + XXXClaus - Maria + XXXvon Brandenburg + + unbekannt + männlich + 1994-12-31 + Wien + Wien + Österreich + + AUT + Österreich + + + 44453600000000727 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + STAATSANGEH_ANLEGEN + Staatsangehörigkeit anlegen + Testerperson + + + 109091 + + + + + + + + + 1879000000000001 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/BirthName + DE + + XXXvon Heuburg + 9999-12-31 + 9999-12-31 + + + + + 1879000000000003 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PlaceOfBirth + DE + + Hintergigritzpotschn + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + DE + + 7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + EE + + aabbcc_should_not_be_included_for_DE + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + DE + + 7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit_second_one + 9999-12-31 + 9999-12-31 + + + + + + + 2020-02-05T13:07:06.311 + + + + 44453500000005242 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + WSANM + Wohnsitz anmelden + + + 109091 + + + + + + 0088 + Testgemeinde + 09988 + Testort A + + Testgasse + 1a-2b + Stg. 3c-4d + 5 + H + false + 0001 + + T800001 + 001 + T800001 + + + + HST111WWW + + T8001 + T80001 + T80000000001 + T80000000002 + + H + Testpostort + + 2020-02-05T13:07:06.311 + WSANM + Wohnsitz anmelden + + + + 44453500000005262 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + AUSK_SPERRE_SETZ + Auskunftssperre setzen + + + 109091 + + + + 2020-02-05T13:07:06.311 + 9999-12-31T23:59:59.000 + ASMG + Auskunftssperre nach § 18 / 2ff MeldeG + automatische Auskunftssperre + + + + + + + diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/search_with_personalId_only_resp_historicIncluded.xml b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/search_with_personalId_only_resp_historicIncluded.xml new file mode 100644 index 00000000..b8a6fcd0 --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/search_with_personalId_only_resp_historicIncluded.xml @@ -0,0 +1,389 @@ + + + + GP_EIDAS + 367100000000080 + 0 + + + ZMR-Server Version: 5.9.0.0-SNAPSHOT + 2021-11-12T08:24:40.985 + 1877300000000139 + + + + + Searching PersonIdentifier + + true + false + + + false + + 10 + + + + + 5020 + Person gefunden. + + + 2 + 0 + 0 + 1 + + + + + 2021-11-12T08:24:39.695 + + + + 44453600000000697 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + SONSTIGES + Sonstiges + Testerperson + + + 109091 + + + + 000430320173 + + + 9/MtsPZgBHQMBpQOD6aOY2TUqcY= + urn:publicid:gv.at:cdid+ZP + + + XXXŐzgür + XXXTüzekçi + + unbekannt + männlich + 1983-06-04 + Wien + Wien + Österreich + + AUT + Österreich + + + 44453600000000727 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + STAATSANGEH_ANLEGEN + Staatsangehörigkeit anlegen + Testerperson + + + 109091 + + + + + + + + + 1879000000000001 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/BirthName + DE + + XXXvon Heuburg + 9999-12-31 + 9999-12-31 + + + + + 1879000000000003 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PlaceOfBirth + DE + + Hintergigritzpotschn + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + DE + + 7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + EE + + aabbcc_should_not_be_included_for_DE + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + DE + + 7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit_second_one + 9999-12-31 + 9999-12-31 + + + + + + 2021-10-21T13:07:39.000 + + + + 44454000000000811 + 2020-02-05T13:45:52.563 + + 2020-02-05T13:45:52.563 + SONSTIGES + Sonstiges + Testperson + + + 109091 + + + + 000648035760 + + + UgeknNsc26lVuB7U/uYGVmWtnnA= + urn:publicid:gv.at:cdid+ZP + + + XXXŐzgür + XXXTüzekçi + + unbekannt + weiblich + 1983-06-04 + Wien + Wien + Österreich + + TUR + Türkei + + + 44454000000000841 + 2020-02-05T13:45:52.563 + + 2020-02-05T13:45:52.563 + STAATSANGEH_ANLEGEN + Staatsangehörigkeit anlegen + Testperson + + + 109091 + + + + + + + + + 44454000000000855 + 2020-02-05T13:45:52.563 + + 2020-02-05T13:45:52.563 + REISEDOK_ANLEGEN + Reisedokument anlegen + Testperson + + + 109091 + + + + FREMDEROA + + + + + 1867900000000716 + 2021-10-21T13:07:38.065 + + 2021-10-21T13:07:38.065 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + EE + + 7cEYSvKZasdfsafsaf4CDVzNT4E7cjkU4Vq_first + 9999-12-31 + 9999-12-31 + + + + + + + + 2020-02-05T13:07:06.311 + + + + 44453500000005242 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + WSANM + Wohnsitz anmelden + + + 109091 + + + + + + 0088 + Testgemeinde + 09988 + Testort A + + Testgasse + 1a-2b + Stg. 3c-4d + 5 + H + false + 0001 + + T800001 + 001 + T800001 + + + + HST111WWW + + T8001 + T80001 + T80000000001 + T80000000002 + + H + Testpostort + + 2020-02-05T13:07:06.311 + WSANM + Wohnsitz anmelden + + + + 44453500000005262 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + AUSK_SPERRE_SETZ + Auskunftssperre setzen + + + 109091 + + + + 2020-02-05T13:07:06.311 + 9999-12-31T23:59:59.000 + ASMG + Auskunftssperre nach § 18 / 2ff MeldeG + automatische Auskunftssperre + + + + + + + diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/search_with_personalId_only_resp_moreThanOne.xml b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/search_with_personalId_only_resp_moreThanOne.xml new file mode 100644 index 00000000..3259d411 --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/search_with_personalId_only_resp_moreThanOne.xml @@ -0,0 +1,488 @@ + + + + GP_EIDAS + 367100000000079 + 0 + + + ZMR-Server Version: 5.9.0.0-SNAPSHOT + 2021-11-12T08:24:40.985 + 1877300000000139 + + + + + Searching PersonIdentifier + + true + false + + + false + + 10 + + + + + 5020 + Person gefunden. + + + 2 + 0 + 0 + 1 + + + + + 2021-11-12T08:24:39.695 + + + + 44453600000000697 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + SONSTIGES + Sonstiges + Testerperson + + + 109091 + + + + 000430320173 + + + UgeknNsc26lVuB7U/uYGVmWtnnA= + urn:publicid:gv.at:cdid+ZP + + + XXXClaus - Maria + XXXvon Brandenburg + + unbekannt + männlich + 1994-12-31 + Wien + Wien + Österreich + + AUT + Österreich + + + 44453600000000727 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + STAATSANGEH_ANLEGEN + Staatsangehörigkeit anlegen + Testerperson + + + 109091 + + + + + + + + + 1879000000000001 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/BirthName + DE + + XXXvon Heuburg + 9999-12-31 + 9999-12-31 + + + + + 1879000000000003 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PlaceOfBirth + DE + + Hintergigritzpotschn + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + DE + + 7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + EE + + aabbcc_should_not_be_included_for_DE + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + DE + + 7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit_second_one + 9999-12-31 + 9999-12-31 + + + + + + + 2020-02-05T13:07:06.311 + + + + 44453500000005242 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + WSANM + Wohnsitz anmelden + + + 109091 + + + + + + 0088 + Testgemeinde + 09988 + Testort A + + Testgasse + 1a-2b + Stg. 3c-4d + 5 + H + false + 0001 + + T800001 + 001 + T800001 + + + + HST111WWW + + T8001 + T80001 + T80000000001 + T80000000002 + + H + Testpostort + + 2020-02-05T13:07:06.311 + WSANM + Wohnsitz anmelden + + + + 44453500000005262 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + AUSK_SPERRE_SETZ + Auskunftssperre setzen + + + 109091 + + + + 2020-02-05T13:07:06.311 + 9999-12-31T23:59:59.000 + ASMG + Auskunftssperre nach § 18 / 2ff MeldeG + automatische Auskunftssperre + + + + + + + + + 2021-10-21T13:07:39.000 + + + + 44454000000000811 + 2020-02-05T13:45:52.563 + + 2020-02-05T13:45:52.563 + SONSTIGES + Sonstiges + Testperson + + + 109091 + + + + 000648035760 + + + 9/MtsPZgBHQMBpQOD6aOY2TUqcY= + urn:publicid:gv.at:cdid+ZP + + + XXXŐzgür + XXXTüzekçi + + unbekannt + weiblich + 1983-06-04 + Wien + Wien + Österreich + + TUR + Türkei + + + 44454000000000841 + 2020-02-05T13:45:52.563 + + 2020-02-05T13:45:52.563 + STAATSANGEH_ANLEGEN + Staatsangehörigkeit anlegen + Testperson + + + 109091 + + + + + + + + + 44454000000000855 + 2020-02-05T13:45:52.563 + + 2020-02-05T13:45:52.563 + REISEDOK_ANLEGEN + Reisedokument anlegen + Testperson + + + 109091 + + + + FREMDEROA + + + + + 1867900000000716 + 2021-10-21T13:07:38.065 + + 2021-10-21T13:07:38.065 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + EE + + 7cEYSvKZasdfsafsaf4CDVzNT4E7cjkU4Vq_first + 9999-12-31 + 9999-12-31 + + + + + 1868500000000597 + 2021-10-21T13:07:39.000 + + 2021-10-21T13:07:39.000 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + EE + + 7cEYSvKZasdfsafsaf4CDVzNT4E7cjkU4Vq_second + 9999-12-31 + 9999-12-31 + + + + + + + 2020-02-05T13:45:52.563 + + + + 44453900000006913 + 2020-02-05T13:45:52.563 + + 2020-02-05T13:45:52.563 + WSANM + Wohnsitz anmelden + + + 109091 + + + + + + 0088 + Testgemeinde + 09988 + Testort A + + Testgasse + 1a-2b + Stg. 3c-4d + H + false + + T800001 + 001 + T800001 + + + + HSX11XWWX + + T8001 + T80001 + T80000000001 + T80000000002 + + H + Testpostort + + 2020-02-05T13:45:52.563 + WSANM + Wohnsitz anmelden + + + + 44453900000006933 + 2020-02-05T13:45:52.563 + + 2020-02-05T13:45:52.563 + AUSK_SPERRE_SETZ + Auskunftssperre setzen + + + 109091 + + + + 2020-02-05T13:45:52.563 + 9999-12-31T23:59:59.000 + ASMG + Auskunftssperre nach § 18 / 2ff MeldeG + automatische Auskunftssperre + + + + + + + diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/search_with_personalId_only_resp_moreThanOne_2.xml b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/search_with_personalId_only_resp_moreThanOne_2.xml new file mode 100644 index 00000000..ba4ad172 --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/search_with_personalId_only_resp_moreThanOne_2.xml @@ -0,0 +1,465 @@ + + + + GP_EIDAS + 367100000000080 + 0 + + + ZMR-Server Version: 5.9.0.0-SNAPSHOT + 2021-11-12T08:24:40.985 + 1877300000000139 + + + + + Searching PersonIdentifier + + true + false + + + false + + 10 + + + + + 5020 + Person gefunden. + + + 2 + 0 + 0 + 1 + + + + + 2021-11-12T08:24:39.695 + + + + 44453600000000697 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + SONSTIGES + Sonstiges + Testerperson + + + 109091 + + + + 000430320173 + + + 9/MtsPZgBHQMBpQOD6aOY2TUqcY= + urn:publicid:gv.at:cdid+ZP + + + XXXŐzgür + XXXTüzekçi + + unbekannt + männlich + 1983-06-04 + Wien + Wien + Österreich + + AUT + Österreich + + + 44453600000000727 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + STAATSANGEH_ANLEGEN + Staatsangehörigkeit anlegen + Testerperson + + + 109091 + + + + + + + + + 1879000000000001 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/BirthName + DE + + XXXvon Heuburg + 9999-12-31 + 9999-12-31 + + + + + 1879000000000003 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PlaceOfBirth + DE + + Hintergigritzpotschn + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + DE + + 7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + EE + + aabbcc_should_not_be_included_for_DE + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + DE + + 7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit_second_one + 9999-12-31 + 9999-12-31 + + + + + + + 2020-02-05T13:07:06.311 + + + + 44453500000005242 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + WSANM + Wohnsitz anmelden + + + 109091 + + + + + + 0088 + Testgemeinde + 09988 + Testort A + + Testgasse + 1a-2b + Stg. 3c-4d + 5 + H + false + 0001 + + T800001 + 001 + T800001 + + + + HST111WWW + + T8001 + T80001 + T80000000001 + T80000000002 + + H + Testpostort + + 2020-02-05T13:07:06.311 + WSANM + Wohnsitz anmelden + + + + 44453500000005262 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + AUSK_SPERRE_SETZ + Auskunftssperre setzen + + + 109091 + + + + 2020-02-05T13:07:06.311 + 9999-12-31T23:59:59.000 + ASMG + Auskunftssperre nach § 18 / 2ff MeldeG + automatische Auskunftssperre + + + + + + + + + 2021-10-21T13:07:39.000 + + + + 44454000000000811 + 2020-02-05T13:45:52.563 + + 2020-02-05T13:45:52.563 + SONSTIGES + Sonstiges + Testperson + + + 109091 + + + + 000648035760 + + + UgeknNsc26lVuB7U/uYGVmWtnnA= + urn:publicid:gv.at:cdid+ZP + + + XXXŐzgür + XXXTüzekçi + + unbekannt + weiblich + 1983-06-04 + Wien + Wien + Österreich + + TUR + Türkei + + + 44454000000000841 + 2020-02-05T13:45:52.563 + + 2020-02-05T13:45:52.563 + STAATSANGEH_ANLEGEN + Staatsangehörigkeit anlegen + Testperson + + + 109091 + + + + + + + + + 44454000000000855 + 2020-02-05T13:45:52.563 + + 2020-02-05T13:45:52.563 + REISEDOK_ANLEGEN + Reisedokument anlegen + Testperson + + + 109091 + + + + FREMDEROA + + + + + 1867900000000716 + 2021-10-21T13:07:38.065 + + 2021-10-21T13:07:38.065 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + EE + + 7cEYSvKZasdfsafsaf4CDVzNT4E7cjkU4Vq_first + 9999-12-31 + 9999-12-31 + + + + + + + 2020-02-05T13:45:52.563 + + + + 44453900000006913 + 2020-02-05T13:45:52.563 + + 2020-02-05T13:45:52.563 + WSANM + Wohnsitz anmelden + + + 109091 + + + + + + 0088 + Testgemeinde + 09988 + Testort A + + Testgasse + 1a-2b + Stg. 3c-4d + H + false + + T800001 + 001 + T800001 + + + + HSX11XWWX + + T8001 + T80001 + T80000000001 + T80000000002 + + H + Testpostort + + 2020-02-05T13:45:52.563 + WSANM + Wohnsitz anmelden + + + + 44453900000006933 + 2020-02-05T13:45:52.563 + + 2020-02-05T13:45:52.563 + AUSK_SPERRE_SETZ + Auskunftssperre setzen + + + 109091 + + + + 2020-02-05T13:45:52.563 + 9999-12-31T23:59:59.000 + ASMG + Auskunftssperre nach § 18 / 2ff MeldeG + automatische Auskunftssperre + + + + + + + diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/seq_1-4_kitt_get_latest_version_resp.xml b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/seq_1-4_kitt_get_latest_version_resp.xml new file mode 100644 index 00000000..a8b708dd --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/seq_1-4_kitt_get_latest_version_resp.xml @@ -0,0 +1,185 @@ + + + + GP_EIDAS + 366200000000081 + 0 + + + ZMR-Server Version: 5.9.0.0-SNAPSHOT + 2021-11-12T08:24:39.330 + 1877300000000133 + + + + + KITT get-latest-version + + true + false + + + false + + 10 + + + + UgeknNsc26lVuB7U/uYGVmWtnnA= + urn:publicid:gv.at:cdid+ZP + + + XXXClaus - Maria + XXXvon Brandenburg + + 1994-12-31 + + + + 5020 + Person gefunden. + + + 1 + 0 + 0 + 1 + + + + + 2020-02-05T13:07:06.311 + + + + 44453600000000697 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + SONSTIGES + Sonstiges + Testerperson + + + 109091 + + + + 000430320173 + + + UgeknNsc26lVuB7U/uYGVmWtnnA= + urn:publicid:gv.at:cdid+ZP + + + XXXClaus - Maria + XXXvon Brandenburg + + unbekannt + männlich + 1994-12-31 + Wien + Wien + Österreich + + AUT + Österreich + + + 44453600000000727 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + STAATSANGEH_ANLEGEN + Staatsangehörigkeit anlegen + Testerperson + + + 109091 + + + + + + + + + + + 2020-02-05T13:07:06.311 + + + + 44453500000005242 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + WSANM + Wohnsitz anmelden + + + 109091 + + + + + + 0088 + Testgemeinde + 09988 + Testort A + + Testgasse + 1a-2b + Stg. 3c-4d + 5 + H + false + 0001 + + T800001 + 001 + T800001 + + + + HST111WWW + + T8001 + T80001 + T80000000001 + T80000000002 + + H + Testpostort + + 2020-02-05T13:07:06.311 + WSANM + Wohnsitz anmelden + + + + 44453500000005262 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + AUSK_SPERRE_SETZ + Auskunftssperre setzen + + + 109091 + + + + 2020-02-05T13:07:06.311 + 9999-12-31T23:59:59.000 + ASMG + Auskunftssperre nach § 18 / 2ff MeldeG + automatische Auskunftssperre + + + + + + + diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/seq_1-6_kitt_update_resp.xml b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/seq_1-6_kitt_update_resp.xml new file mode 100644 index 00000000..0f8e8dad --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/seq_1-6_kitt_update_resp.xml @@ -0,0 +1,146 @@ + + + + GP_EIDAS + 366200000000082 + 0 + + + ZMR-Server Version: 5.9.0.0-SNAPSHOT + 2021-11-12T08:24:39.695 + 1877200000000131 + + + + 4 + Personenänderung erfolgreich durchgeführt. + + + + 2021-11-12T08:24:39.695 + + + + 44453600000000697 + 2020-02-05T13:07:06.311 + + 2021-11-12T08:24:39.695 + PERS_AENDERN + Person ändern + KITT for eIDAS Matching + + + 109091 + + melch@bmi.gv.at + + + 000430320173 + + + UgeknNsc26lVuB7U/uYGVmWtnnA= + urn:publicid:gv.at:cdid+ZP + + + XXXClaus - Maria + XXXvon Brandenburg + + unbekannt + männlich + 1994-12-31 + Wien + Wien + Österreich + + AUT + Österreich + + + 44453600000000727 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + STAATSANGEH_ANLEGEN + Staatsangehörigkeit anlegen + Testerperson + + + 109091 + + melch@bmi.gv.at + + + + + + + + 1879000000000001 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/BirthName + DE + + XXXvon Heuburg + 9999-12-31 + 9999-12-31 + + + + + 1879000000000003 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PlaceOfBirth + DE + + Hintergigritzpotschn + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + DE + + 7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit + 9999-12-31 + 9999-12-31 + + + + diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/seq_1-8_search_with_personalId_only_resp.xml b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/seq_1-8_search_with_personalId_only_resp.xml new file mode 100644 index 00000000..3fd477ee --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/zmr/seq_1-8_search_with_personalId_only_resp.xml @@ -0,0 +1,267 @@ + + + + GP_EIDAS + 367100000000079 + 0 + + + ZMR-Server Version: 5.9.0.0-SNAPSHOT + 2021-11-12T08:24:40.985 + 1877300000000139 + + + + + Searching PersonIdentifier + + true + false + + + false + + 10 + + + + + 5020 + Person gefunden. + + + 1 + 0 + 0 + 1 + + + + + 2021-11-12T08:24:39.695 + + + + 44453600000000697 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + SONSTIGES + Sonstiges + Testerperson + + + 109091 + + + + 000430320173 + + + UgeknNsc26lVuB7U/uYGVmWtnnA= + urn:publicid:gv.at:cdid+ZP + + + XXXClaus - Maria + XXXvon Brandenburg + + unbekannt + männlich + 1994-12-31 + Wien + Wien + Österreich + + AUT + Österreich + + + 44453600000000727 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + STAATSANGEH_ANLEGEN + Staatsangehörigkeit anlegen + Testerperson + + + 109091 + + + + + + + + + 1879000000000001 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/BirthName + DE + + XXXvon Heuburg + 9999-12-31 + 9999-12-31 + + + + + 1879000000000001 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/BirthName + ES + + XXXvon Heuburg + 9999-12-31 + 9999-12-31 + + + + + 1879000000000003 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PlaceOfBirth + DE + + Hintergigritzpotschn + 9999-12-31 + 9999-12-31 + + + + + 1879000000000005 + 2021-11-12T08:24:39.695 + + 2021-11-12T08:24:39.695 + EIDAS_ANLEGEN + KITT for eIDAS Matching + + + 101179 + + eidtapp@bmi.gv.at + + + http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier + DE + + 7cEYWithDEElementsasdfsafsaf4CDVzNT4E7cjkU4VqForjUnit + 9999-12-31 + 9999-12-31 + + + + + + + 2020-02-05T13:07:06.311 + + + + 44453500000005242 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + WSANM + Wohnsitz anmelden + + + 109091 + + + + + + 0088 + Testgemeinde + 09988 + Testort A + + Testgasse + 1a-2b + Stg. 3c-4d + 5 + H + false + 0001 + + T800001 + 001 + T800001 + + + + HST111WWW + + T8001 + T80001 + T80000000001 + T80000000002 + + H + Testpostort + + 2020-02-05T13:07:06.311 + WSANM + Wohnsitz anmelden + + + + 44453500000005262 + 2020-02-05T13:07:06.311 + + 2020-02-05T13:07:06.311 + AUSK_SPERRE_SETZ + Auskunftssperre setzen + + + 109091 + + + + 2020-02-05T13:07:06.311 + 9999-12-31T23:59:59.000 + ASMG + Auskunftssperre nach § 18 / 2ff MeldeG + automatische Auskunftssperre + + + + + + + -- cgit v1.2.3