diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2018-10-29 12:22:37 +0100 |
---|---|---|
committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2018-10-29 12:22:37 +0100 |
commit | 135663cc3ceed9cf8f9215962e6e31763205149f (patch) | |
tree | 7e258aa15a2042b767ca35eda5cadfb9f5ec4ac0 /eidas_modules | |
parent | 4ab9fc1c98da3dee2c736240f1b41d70433e7b67 (diff) | |
download | National_eIDAS_Gateway-135663cc3ceed9cf8f9215962e6e31763205149f.tar.gz National_eIDAS_Gateway-135663cc3ceed9cf8f9215962e6e31763205149f.tar.bz2 National_eIDAS_Gateway-135663cc3ceed9cf8f9215962e6e31763205149f.zip |
update Logging
Diffstat (limited to 'eidas_modules')
2 files changed, 26 insertions, 2 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java index de6c51c1..096fc8cb 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java @@ -45,6 +45,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import at.asitplus.eidas.specific.connector.MSConnectorEventCodes; +import at.asitplus.eidas.specific.connector.MSeIDASNodeConstants; import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.Constants; import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.DAO.ERnBeIDData; import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.exception.SZRCommunicationException; @@ -107,7 +108,10 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask { //post-process eIDAS attributes ERnBeIDData eIDData = eIDPostProcessor.postProcess(simpleAttrMap); - + + //write MDS into technical log and revision log + writeMDSLogInformation(eIDData); + //connect SZR-Gateway if(basicConfig.getBasicMOAIDConfigurationBoolean( Constants.CONIG_PROPS_EIDAS_SZRCLIENT_DEBUG_USEDUMMY, false)) { @@ -363,5 +367,25 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask { return result; } + private void writeMDSLogInformation(ERnBeIDData eIDData) { + //log MDS and country code into technical log + if (basicConfig.getBasicMOAIDConfigurationBoolean( + MSeIDASNodeConstants.PROP_CONFIG_TECHNICALLOG_WRITE_MDS_INTO_TECH_LOG, false)) + log.info("eIDAS Auth. for user: " + + eIDData.getGivenName() + " " + + eIDData.getFamilyName() + " " + + eIDData.getFormatedDateOfBirth() + " " + + "from " + eIDData.getCitizenCountryCode()); + + //log MDS and country code into revision log + if (basicConfig.getBasicMOAIDConfigurationBoolean( + MSeIDASNodeConstants.PROP_CONFIG_REVISIONLOG_WRITE_MDS_INTO_REVISION_LOG, false)) + revisionsLogger.logEvent(pendingReq, MSConnectorEventCodes.RESPONSE_FROM_EIDAS_MDSDATA, + "{" + eIDData.getGivenName() + "," + + eIDData.getFamilyName() + "," + + eIDData.getFormatedDateOfBirth() + "," + + eIDData.getCitizenCountryCode() + "}"); + + } } diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/GenerateAuthnRequestTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/GenerateAuthnRequestTask.java index 0b98927b..0020a222 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/GenerateAuthnRequestTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/GenerateAuthnRequestTask.java @@ -104,7 +104,7 @@ public class GenerateAuthnRequestTask extends AbstractAuthServletTask { } //TODO: maybe add countryCode validation before request ref. impl. eIDAS node - log.debug("Request eIDAS auth. for citizen of country: " + citizenCountryCode); + log.info("Request eIDAS auth. for citizen of country: " + citizenCountryCode); revisionsLogger.logEvent(pendingReq, MSConnectorEventCodes.COUNTRY_SELECTED, citizenCountryCode); //build eIDAS AuthnRequest |