From e4ccd3df84e7ea509e66f2f832719529fe408839 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Wed, 9 Feb 2022 08:34:26 +0100 Subject: feature(zmr): add MDS attributes as 'eIdAS-Documents' too ZMR does not allow MDS update on regular places. Therefore, we add it as 'eIDAS-Documents' for later usage. --- .../eidas/specific/modules/auth/eidas/v2/Constants.java | 8 +++++++- .../modules/auth/eidas/v2/clients/zmr/ZmrSoapClient.java | 12 ++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus') diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java index e642c5ec..272d79c4 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java @@ -268,7 +268,13 @@ public class Constants { public static final String eIDAS_ATTRURN_PREFIX_NATURAL = eIDAS_ATTRURN_PREFIX + "naturalperson/"; public static final String eIDAS_ATTRURN_PERSONALIDENTIFIER = - eIDAS_ATTRURN_PREFIX_NATURAL + eIDAS_ATTR_PERSONALIDENTIFIER; + eIDAS_ATTRURN_PREFIX_NATURAL + eIDAS_ATTR_PERSONALIDENTIFIER; + public static final String eIDAS_ATTRURN_CURRENTGIVENNAME = + eIDAS_ATTRURN_PREFIX_NATURAL + "CurrentGivenName"; + public static final String eIDAS_ATTRURN_CURRENTFAMILYNAME = + eIDAS_ATTRURN_PREFIX_NATURAL + "CurrentFamilyName"; + public static final String eIDAS_ATTRURN_DATEOFBIRTH = + eIDAS_ATTRURN_PREFIX_NATURAL + eIDAS_ATTR_DATEOFBIRTH; public static final String eIDAS_ATTRURN_PLACEOFBIRTH = eIDAS_ATTRURN_PREFIX_NATURAL + eIDAS_ATTR_PLACEOFBIRTH; public static final String eIDAS_ATTRURN_BIRTHNAME = 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 f24c75eb..8dbd0632 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 @@ -264,6 +264,10 @@ public class ZmrSoapClient extends AbstractSoapClient implements IZmrClient { Collection eidasDocumentToAdd = selectEidasDocumentsToAdd(zmrPersonToKitt, eidData); + /*TODO: Is there a requirement to change 'eIDAS-Documents'? + * We add MDS information as 'eIDAS-Documents' too. Maybe, we should update that in a later version. + */ + if (eidasDocumentToAdd.isEmpty()) { log.info("Find no eIDAS document for update during: {}. Nothing todo on ZMR side", PROCESS_KITT_GENERAL); @@ -766,6 +770,14 @@ public class ZmrSoapClient extends AbstractSoapClient implements IZmrClient { Constants.eIDAS_ATTRURN_PLACEOFBIRTH, eidData.getPlaceOfBirth(), false); addEidasDocumentIfNotAvailable(result, zmrPersonToKitt, eidData.getCitizenCountryCode(), Constants.eIDAS_ATTRURN_BIRTHNAME, eidData.getBirthName(), false); + + // add MDS attributes as 'eIDAS-Documents' too, because ZMR does not allow a MDS update on regular places. + addEidasDocumentIfNotAvailable(result, zmrPersonToKitt, eidData.getCitizenCountryCode(), + Constants.eIDAS_ATTRURN_CURRENTGIVENNAME, eidData.getGivenName(), false); + addEidasDocumentIfNotAvailable(result, zmrPersonToKitt, eidData.getCitizenCountryCode(), + Constants.eIDAS_ATTRURN_CURRENTFAMILYNAME, eidData.getFamilyName(), false); + addEidasDocumentIfNotAvailable(result, zmrPersonToKitt, eidData.getCitizenCountryCode(), + Constants.eIDAS_ATTRURN_DATEOFBIRTH, eidData.getDateOfBirth(), false); return result; -- cgit v1.2.3