diff options
author | Thomas <> | 2024-01-29 18:57:49 +0100 |
---|---|---|
committer | Thomas <> | 2024-01-29 18:57:49 +0100 |
commit | 27d230956d0b2ef42a0a94d1930b8523a2ef9acf (patch) | |
tree | f3f0d5e24d1a9b8732e6584fed92477900fc3e00 /modules/eidas_proxy-sevice/src/main/java | |
parent | 95926bd7a8b3c70b699bd0b1b035eaebdb47b7ac (diff) | |
download | National_eIDAS_Gateway-27d230956d0b2ef42a0a94d1930b8523a2ef9acf.tar.gz National_eIDAS_Gateway-27d230956d0b2ef42a0a94d1930b8523a2ef9acf.tar.bz2 National_eIDAS_Gateway-27d230956d0b2ef42a0a94d1930b8523a2ef9acf.zip |
feat(proxy): add revision logging for eIDAS outgoing
Diffstat (limited to 'modules/eidas_proxy-sevice/src/main/java')
2 files changed, 9 insertions, 0 deletions
diff --git a/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/EidasProxyServiceController.java b/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/EidasProxyServiceController.java index 5742b920..886c7025 100644 --- a/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/EidasProxyServiceController.java +++ b/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/EidasProxyServiceController.java @@ -31,6 +31,7 @@ import com.google.common.collect.ImmutableSortedSet; import com.google.common.collect.Streams; import at.asitplus.eidas.specific.core.MsEidasNodeConstants; +import at.asitplus.eidas.specific.core.MsEventCodes; import at.asitplus.eidas.specific.core.config.ServiceProviderConfiguration; import at.asitplus.eidas.specific.modules.core.eidas.EidasConstants; import at.asitplus.eidas.specific.modules.msproxyservice.MsProxyServiceConstants; @@ -131,6 +132,7 @@ public class EidasProxyServiceController extends AbstractController implements I } + log.debug("Received eIDAS auth. request from: {}, Initializing authentication environment ... ", eidasRequest.getSpCountryCode() != null ? eidasRequest.getSpCountryCode() : "'missing SP-country'"); log.trace("Received eIDAS requst: {}", eidasRequest); @@ -146,6 +148,7 @@ public class EidasProxyServiceController extends AbstractController implements I revisionsLogger.logEvent(pendingReq.getUniqueSessionIdentifier(), pendingReq.getUniqueTransactionIdentifier(), EventConstants.TRANSACTION_IP, httpReq.getRemoteAddr()); + revisionsLogger.logEvent(pendingReq, MsEventCodes.EIDAS_OUTGOING_RECEIVED, eidasRequest.getId()); // validate eIDAS Authn. request and set into pending-request validateEidasAuthnRequest(eidasRequest); diff --git a/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/ProxyServiceAuthenticationAction.java b/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/ProxyServiceAuthenticationAction.java index bb91e919..df8da81c 100644 --- a/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/ProxyServiceAuthenticationAction.java +++ b/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/ProxyServiceAuthenticationAction.java @@ -20,6 +20,7 @@ import org.springframework.context.ApplicationContext; import org.springframework.core.io.ResourceLoader; import org.springframework.web.util.UriComponentsBuilder; +import at.asitplus.eidas.specific.core.MsEventCodes; import at.asitplus.eidas.specific.core.gui.StaticGuiBuilderConfiguration; import at.asitplus.eidas.specific.modules.core.eidas.EidasConstants; import at.asitplus.eidas.specific.modules.msproxyservice.MsProxyServiceConstants; @@ -35,6 +36,7 @@ import at.gv.egiz.eaaf.core.api.idp.IAuthData; import at.gv.egiz.eaaf.core.api.idp.IConfiguration; import at.gv.egiz.eaaf.core.api.idp.IEidAuthData; import at.gv.egiz.eaaf.core.api.idp.slo.SloInformationInterface; +import at.gv.egiz.eaaf.core.api.logging.IRevisionLogger; import at.gv.egiz.eaaf.core.exceptions.EaafConfigurationException; import at.gv.egiz.eaaf.core.exceptions.EaafException; import at.gv.egiz.eaaf.core.exceptions.GuiBuildException; @@ -74,6 +76,8 @@ public class ProxyServiceAuthenticationAction implements IAction { ISpringMvcGuiFormBuilder guiBuilder; @Autowired ProxyEidasAttributeRegistry attrRegistry; + @Autowired + IRevisionLogger revisionsLogger; @Override public SloInformationInterface processRequest(IRequest pendingReq, HttpServletRequest httpReq, @@ -115,6 +119,8 @@ public class ProxyServiceAuthenticationAction implements IAction { logProvidedAttributes(eidasResp); forwardToEidasProxy(pendingReq, httpReq, httpResp, eidasResp); + revisionsLogger.logEvent(pendingReq, MsEventCodes.EIDAS_OUTGOING_RESPOND); + return sloInformation; } catch (ServletException | IOException | GuiBuildException e) { |