diff options
7 files changed, 66 insertions, 30 deletions
diff --git a/connector/src/main/java/at/gv/egiz/eidas/specific/connector/processes/tasks/GenerateCountrySelectionFrameTask.java b/connector/src/main/java/at/gv/egiz/eidas/specific/connector/processes/tasks/GenerateCountrySelectionFrameTask.java index 6616de88..9218a9b5 100644 --- a/connector/src/main/java/at/gv/egiz/eidas/specific/connector/processes/tasks/GenerateCountrySelectionFrameTask.java +++ b/connector/src/main/java/at/gv/egiz/eidas/specific/connector/processes/tasks/GenerateCountrySelectionFrameTask.java @@ -16,6 +16,7 @@ import at.gv.egiz.eaaf.core.exceptions.EAAFException; import at.gv.egiz.eaaf.core.exceptions.GUIBuildException; import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException; import at.gv.egiz.eaaf.core.impl.idp.auth.modules.AbstractAuthServletTask; +import at.gv.egiz.eidas.specific.connector.MSConnectorEventCodes; import at.gv.egiz.eidas.specific.connector.MSeIDASNodeConstants; import at.gv.egiz.eidas.specific.connector.gui.StaticGuiBuilderConfiguration; @@ -34,7 +35,7 @@ public class GenerateCountrySelectionFrameTask extends AbstractAuthServletTask { public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) throws TaskExecutionException { try { - revisionsLogger.logEvent(pendingReq, -1); + revisionsLogger.logEvent(pendingReq, MSConnectorEventCodes.STARTING_COUNTRY_SELECTION); IGUIBuilderConfiguration config = new StaticGuiBuilderConfiguration( basicConfig, diff --git a/connector_lib/src/main/java/at/gv/egiz/eidas/specific/connector/MSConnectorEventCodes.java b/connector_lib/src/main/java/at/gv/egiz/eidas/specific/connector/MSConnectorEventCodes.java new file mode 100644 index 00000000..a0d0910f --- /dev/null +++ b/connector_lib/src/main/java/at/gv/egiz/eidas/specific/connector/MSConnectorEventCodes.java @@ -0,0 +1,16 @@ +package at.gv.egiz.eidas.specific.connector; + +public class MSConnectorEventCodes { + + public static final int STARTING_COUNTRY_SELECTION = 4100; + public static final int COUNTRY_SELECTED = 4101; + + public static final int EIDAS_NODE_CONNECTED = 6101; + public static final int RESPONSE_FROM_EIDAS_NODE = 6102; + public static final int RESPONSE_FROM_EIDAS_NODE_VALID = 6103; + public static final int RESPONSE_FROM_EIDAS_NODE_NOT_VALID = 6104; + + public static final int SZR_IDL_RECEIVED = 6200; + public static final int SZR_BPK_RECEIVED = 6201; + +} diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/gv/egiz/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/gv/egiz/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java index b31b6a21..8766783f 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/gv/egiz/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/gv/egiz/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java @@ -51,6 +51,7 @@ import at.gv.egiz.eaaf.core.impl.idp.auth.data.SimpleIdentityLinkAssertionParser import at.gv.egiz.eaaf.core.impl.idp.auth.modules.AbstractAuthServletTask; import at.gv.egiz.eaaf.core.impl.utils.DOMUtils; import at.gv.egiz.eaaf.core.impl.utils.XPathUtils; +import at.gv.egiz.eidas.specific.connector.MSConnectorEventCodes; import at.gv.egiz.eidas.specific.modules.authmodule_eIDASv2.Constants; import at.gv.egiz.eidas.specific.modules.authmodule_eIDASv2.exception.SZRCommunicationException; import at.gv.egiz.eidas.specific.modules.authmodule_eIDASv2.exception.eIDASAttributeException; @@ -230,16 +231,18 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask { throw new SZRCommunicationException("ernb.00", null); } + revisionsLogger.logEvent(pendingReq, MSConnectorEventCodes.SZR_IDL_RECEIVED); + if (bPK == null) { log.error("ERnB did not return a bPK for target: " + pendingReq.getServiceProviderConfiguration().getAreaSpecificTargetIdentifier()); throw new SZRCommunicationException("ernb.01", null); } + revisionsLogger.logEvent(pendingReq, MSConnectorEventCodes.SZR_BPK_RECEIVED); log.debug("ERnB communication was successfull"); - - revisionsLogger.logEvent(pendingReq, -1); + authProcessData.setForeigner(true); authProcessData.setIdentityLink(identityLink); authProcessData.setGenericDataToSession( diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/gv/egiz/eidas/specific/modules/authmodule_eIDASv2/tasks/GenerateAuthnRequestTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/gv/egiz/eidas/specific/modules/authmodule_eIDASv2/tasks/GenerateAuthnRequestTask.java index ee126d0c..d65ce72f 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/gv/egiz/eidas/specific/modules/authmodule_eIDASv2/tasks/GenerateAuthnRequestTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/gv/egiz/eidas/specific/modules/authmodule_eIDASv2/tasks/GenerateAuthnRequestTask.java @@ -30,6 +30,7 @@ import at.gv.egiz.eaaf.core.api.storage.ITransactionStorage; import at.gv.egiz.eaaf.core.exceptions.EAAFConfigurationException; import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException; import at.gv.egiz.eaaf.core.impl.idp.auth.modules.AbstractAuthServletTask; +import at.gv.egiz.eidas.specific.connector.MSConnectorEventCodes; import at.gv.egiz.eidas.specific.connector.gui.StaticGuiBuilderConfiguration; import at.gv.egiz.eidas.specific.modules.authmodule_eIDASv2.Constants; import at.gv.egiz.eidas.specific.modules.authmodule_eIDASv2.exception.eIDASAuthenticationException; @@ -80,12 +81,8 @@ 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); - - - //TODO: switch to entityID and set new status codes - //revisionsLogger.logEvent(oaConfig, pendingReq, MOAIDEventConstants.AUTHPROCESS_PEPS_SELECTED, metadataUrl); - - + revisionsLogger.logEvent(pendingReq, MSConnectorEventCodes.COUNTRY_SELECTED, citizenCountryCode); + //build eIDAS AuthnRequest LightRequest.Builder authnRequestBuilder = LightRequest.builder(); authnRequestBuilder.id(UUID.randomUUID().toString()); @@ -211,7 +208,8 @@ public class GenerateAuthnRequestTask extends AbstractAuthServletTask { guiBuilder.build(response, config, "BKU-Selection form"); } - + + revisionsLogger.logEvent(pendingReq, MSConnectorEventCodes.EIDAS_NODE_CONNECTED, lightAuthnReq.getId()); } catch (eIDASAuthenticationException e) { diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/gv/egiz/eidas/specific/modules/authmodule_eIDASv2/tasks/ReceiveAuthnResponseTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/gv/egiz/eidas/specific/modules/authmodule_eIDASv2/tasks/ReceiveAuthnResponseTask.java index f0b37ede..16030c52 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/gv/egiz/eidas/specific/modules/authmodule_eIDASv2/tasks/ReceiveAuthnResponseTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/gv/egiz/eidas/specific/modules/authmodule_eIDASv2/tasks/ReceiveAuthnResponseTask.java @@ -17,6 +17,7 @@ import at.gv.egiz.eaaf.core.exceptions.EAAFException; import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException; import at.gv.egiz.eaaf.core.impl.idp.auth.data.AuthProcessDataWrapper; import at.gv.egiz.eaaf.core.impl.idp.auth.modules.AbstractAuthServletTask; +import at.gv.egiz.eidas.specific.connector.MSConnectorEventCodes; import at.gv.egiz.eidas.specific.modules.authmodule_eIDASv2.Constants; import at.gv.egiz.eidas.specific.modules.authmodule_eIDASv2.exception.eIDASAuthenticationException; import at.gv.egiz.eidas.specific.modules.authmodule_eIDASv2.service.eIDASAttributeRegistry; @@ -33,23 +34,7 @@ public class ReceiveAuthnResponseTask extends AbstractAuthServletTask { @Override public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) throws TaskExecutionException { - try{ - -// //get token from Request -// final String tokenBase64 = request.getParameter(EidasParameterKeys.TOKEN.toString()); -// if (StringUtils.isEmpty(tokenBase64)) { -// log.warn("NO eIDAS message token found."); -// throw new eIDASAuthenticationException("TODO", null, -// "NO eIDAS message token found."); -// -// } -// -// //get eIDAS response from cache -// final SpecificConnectorCommunicationServiceImpl specificConnectorCommunicationService = -// (SpecificConnectorCommunicationServiceImpl) context.getBean(SpecificCommunicationDefinitionBeanNames.SPECIFIC_CONNECTOR_COMMUNICATION_SERVICE.toString()); -// ILightResponse eIDASResponse = specificConnectorCommunicationService.getAndRemoveResponse(tokenBase64, -// ImmutableSortedSet.copyOf(attrRegistry.getCoreAttributeRegistry().getAttributes())); - + try{ ILightResponse eIDASResponse = (ILightResponse) request.getAttribute(Constants.DATA_FULL_EIDAS_RESPONSE); if (eIDASResponse == null) { log.warn("NO eIDAS response-message found."); @@ -58,7 +43,8 @@ public class ReceiveAuthnResponseTask extends AbstractAuthServletTask { } log.debug("Receive eIDAS response with RespId:" + eIDASResponse.getId() + " for ReqId:" + eIDASResponse.getInResponseToId()); - + revisionsLogger.logEvent(pendingReq, MSConnectorEventCodes.RESPONSE_FROM_EIDAS_NODE, eIDASResponse.getId()); + //check response StatusCode if (!eIDASResponse.getStatus().getStatusCode().equals(Constants.SUCCESS_URI)) { @@ -92,14 +78,15 @@ public class ReceiveAuthnResponseTask extends AbstractAuthServletTask { //store MOA-session to database requestStoreage.storePendingRequest(pendingReq); - revisionsLogger.logEvent(pendingReq, -1, eIDASResponse.getId()); + revisionsLogger.logEvent(pendingReq, MSConnectorEventCodes.RESPONSE_FROM_EIDAS_NODE_VALID); } catch (EAAFException e) { + revisionsLogger.logEvent(pendingReq, MSConnectorEventCodes.RESPONSE_FROM_EIDAS_NODE_NOT_VALID); throw new TaskExecutionException(pendingReq, "eIDAS Response processing FAILED.", e); } catch (Exception e) { log.warn("eIDAS Response processing FAILED.", e); - revisionsLogger.logEvent(pendingReq, -1); + revisionsLogger.logEvent(pendingReq, MSConnectorEventCodes.RESPONSE_FROM_EIDAS_NODE_NOT_VALID); throw new TaskExecutionException(pendingReq, e.getMessage(), new eIDASAuthenticationException("eidas.05", new Object[]{e.getMessage()}, e)); diff --git a/event_code_descr.txt b/event_code_descr.txt new file mode 100644 index 00000000..db9f026e --- /dev/null +++ b/event_code_descr.txt @@ -0,0 +1,27 @@ +Code ... Wert ... Beschreibung + +1000 ... SessionID ... Eine neue Session wurde mit der angegebenen ID gestartet +1001 ... SessionID ... Die Session mit der angegebenen ID wurde beendet +1002 ... IP Adresse ... IP Addresse des Hosts der die Session geöffnet hat +1003 ... SessionID ... Die Session mit der angebenden ID wurde wegen eines Fehler beendet + +1100 ... TransaktionsID ... Eine neue Transaction wurde mit der angegebenen ID gestartet. Eine Transaktion ist immer eine Session zugeordnet +1101 ... TransaktionsID ... Die Transkation mit der angegebenen ID wurde beendet +1102 ... IP Adresse ... IP Addresse des Hosts der die Transaction geöffnet hat +1103 ... TransaktionsID ... Die Transkation mit der angebenden ID wurde wegen eines Fehler beendet + +4000 ... Authentifizierungsvorgang gestartet +4001 ... Authentifizierungsvorhang beendet +4002 ... Authentifizierungsvorgang wegen eines Fehler abgebrochen +4003 ... Authentifizierungsvorgang für SP + +4100 ... Länderauswahl gestartet +4101 ... CC ... Land gewählt + +6101 ... requestId ... eIDAS Node kontaktiert +6102 ... responseId ... Response von eIDAS Node erhalten +6103 ... eIDAS Node response validation successfull +6104 ... eIDAS Node response validation failed + +6200 ... Personenbindung vom SZR erhalten +6201 ... bPK vom SZR erhalten
\ No newline at end of file diff --git a/external_error_code_descr.txt b/external_error_code_descr.txt index 8334d59e..a729e801 100644 --- a/external_error_code_descr.txt +++ b/external_error_code_descr.txt @@ -3,6 +3,7 @@ 1099 ... generic error during authentication process 1100 ... Transaction Id not found or invalid +1101 ... Fehler beim Verarbeiten eines Parameters 1300 ... Fehler beim Erstellen des eIDAS Authn. Requests 1301 ... eIDAS Response enthält einen Fehler @@ -19,6 +20,9 @@ 6105 ... Der Request konnte nicht gültig validiert werden. 6199 ... Allgemeiner Fehler beim Verarbeiten der PVP 2.1 Anfrage +9008 ... Fehler beim Verarbeiten eines Konfigurationsparameters. +9099 ... Allgemeiner Konfigurationsfehler + 9100 ... Fehler beim Einlesen einer externen Ressource. 9101 ... Fehler bei Zugriff auf den Datastore 9102 ... Fehler beim Erzeugen einer internen Datenstruktur |