From 135663cc3ceed9cf8f9215962e6e31763205149f Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 29 Oct 2018 12:22:37 +0100 Subject: update Logging --- .../tasks/CreateIdentityLinkTask.java | 26 +++++++++++++++++++++- .../tasks/GenerateAuthnRequestTask.java | 2 +- pom.xml | 2 +- 3 files changed, 27 insertions(+), 3 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 diff --git a/pom.xml b/pom.xml index c3afb1a4..36d427ed 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 0.1 0.4 - 1.0.2 + 1.0.4 4.3.19.RELEASE -- cgit v1.2.3