diff options
Diffstat (limited to 'id/server/idserverlib')
16 files changed, 96 insertions, 51 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAIDEventConstants.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAIDEventConstants.java index aae4dd8c4..9e9fd2bff 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAIDEventConstants.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAIDEventConstants.java @@ -34,11 +34,6 @@ import at.gv.egiz.components.eventlog.api.EventConstants; */ public interface MOAIDEventConstants extends EventConstants { - //move to EventConstants - public static final int TRANSACTION_ERROR = 1103; - public static final int SESSION_ERROR = 1003; - - //auth protocol specific information public static final int AUTHPROTOCOL_TYPE = 3000; @@ -51,6 +46,7 @@ public interface MOAIDEventConstants extends EventConstants { public static final int AUTHPROTOCOL_OPENIDCONNECT_AUTHREQUEST = 3200; public static final int AUTHPROTOCOL_OPENIDCONNECT_TOKENREQUEST = 3201; + public static final int AUTHPROTOCOL_SAML1_AUTHNREQUEST = 3300; //authentication process information public static final int AUTHPROCESS_START = 4000; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAReversionLogger.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAReversionLogger.java index 1228a95a4..e73aa8df1 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAReversionLogger.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAReversionLogger.java @@ -29,7 +29,6 @@ import java.util.List; import com.google.common.primitives.Ints; import at.gv.e_government.reference.namespace.mandates._20040701_.Mandate; -import at.gv.egiz.components.eventlog.api.EventLoggingException; import at.gv.egovernment.moa.id.auth.data.IdentityLink; import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; import at.gv.egovernment.moa.id.moduls.IRequest; @@ -78,29 +77,16 @@ public class MOAReversionLogger { return instance; } - - + public void logEvent(IOAAuthParameters oaConfig, int eventCode, String message) { - List<Integer> OASpecificEventCodes = null; - if (oaConfig == null) - OASpecificEventCodes = getDefaulttReversionsLoggingEventCodes(); - else - OASpecificEventCodes = oaConfig.getReversionsLoggingEventCodes(); - - if (OASpecificEventCodes.contains(eventCode)) + if (selectOASpecificEventCodes(oaConfig).contains(eventCode)) MOAIDEventLog.logEvent(MOAIDEventLog.createNewEvent(new Date().getTime(), eventCode, message)); } public void logEvent(IOAAuthParameters oaConfig, IRequest pendingRequest, int eventCode) { - List<Integer> OASpecificEventCodes = null; - if (oaConfig == null) - OASpecificEventCodes = getDefaulttReversionsLoggingEventCodes(); - else - OASpecificEventCodes = oaConfig.getReversionsLoggingEventCodes(); - - if (OASpecificEventCodes.contains(eventCode)) + if (selectOASpecificEventCodes(oaConfig).contains(eventCode)) MOAIDEventLog.logEvent(MOAIDEventLog.createNewEvent(new Date().getTime(), eventCode, pendingRequest.getSessionIdentifier(), pendingRequest.getRequestID())); @@ -109,13 +95,7 @@ public class MOAReversionLogger { public void logEvent(IOAAuthParameters oaConfig, IRequest pendingRequest, int eventCode, String message) { - List<Integer> OASpecificEventCodes = null; - if (oaConfig == null) - OASpecificEventCodes = getDefaulttReversionsLoggingEventCodes(); - else - OASpecificEventCodes = oaConfig.getReversionsLoggingEventCodes(); - - if (OASpecificEventCodes.contains(eventCode)) + if (selectOASpecificEventCodes(oaConfig).contains(eventCode)) MOAIDEventLog.logEvent(MOAIDEventLog.createNewEvent(new Date().getTime(), eventCode, message, pendingRequest.getSessionIdentifier(), @@ -143,6 +123,15 @@ public class MOAReversionLogger { } /** + * @param sessionCreated + * @param uniqueSessionIdentifier + */ + public void logEvent(String sessionID, String transactionID, int eventCode) { + MOAIDEventLog.logEvent(MOAIDEventLog.createNewEvent(new Date().getTime(), eventCode, sessionID, transactionID)); + + } + + /** * @param errorRequest * @param transactionError */ @@ -214,6 +203,17 @@ public class MOAReversionLogger { } + private List<Integer> selectOASpecificEventCodes(IOAAuthParameters oaConfig) { + List<Integer> OASpecificEventCodes = null; + if (oaConfig != null && oaConfig.getReversionsLoggingEventCodes() != null) + OASpecificEventCodes = oaConfig.getReversionsLoggingEventCodes(); + + else + OASpecificEventCodes = getDefaulttReversionsLoggingEventCodes(); + + return OASpecificEventCodes; + } + private String buildPersonInformationHash(String givenName, String familyName, String dateofBirth) { // {"hash":"hashvalue","salt":"testSalt"} diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareGetMISMandateTask.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareGetMISMandateTask.java index 132fa927f..099bc085c 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareGetMISMandateTask.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareGetMISMandateTask.java @@ -46,6 +46,7 @@ import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.config.ConnectionParameter; import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; +import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.moduls.IRequest; import at.gv.egovernment.moa.id.moduls.RequestStorage; @@ -127,7 +128,13 @@ public class PrepareGetMISMandateTask extends AbstractAuthServletTask { newMOASessionID); String oaURL = session.getOAURLRequested(); - OAAuthParameter oaParam = authConf.getOnlineApplicationParameter(oaURL); + IOAAuthParameters oaParam = pendingReq.getOnlineApplicationConfiguration(); + if (oaParam == null) { + oaParam = authConf.getOnlineApplicationParameter(oaURL); + Logger.info("No Service info in PendingRequest --> load service info from configuration"); + + } + List<String> profiles = oaParam.getMandateProfiles(); if (profiles == null) { diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyAuthenticationBlockTask.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyAuthenticationBlockTask.java index 6a30e40c1..da464ba68 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyAuthenticationBlockTask.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyAuthenticationBlockTask.java @@ -129,6 +129,9 @@ public class VerifyAuthenticationBlockTask extends AbstractAuthServletTask { AuthenticationServer.getInstance().verifyAuthenticationBlock(pendingReq, session, createXMLSignatureResponse);
+ //store all changes in session DAO
+ AuthenticationSessionStoreage.storeSession(session);
+
//put session to context
executionContext.put(PARAM_SESSIONID, session.getSessionID());
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GenerateIFrameTemplateServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GenerateIFrameTemplateServlet.java index a840b34e2..b7b2ea95f 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GenerateIFrameTemplateServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GenerateIFrameTemplateServlet.java @@ -110,7 +110,12 @@ public class GenerateIFrameTemplateServlet extends AuthServlet { //get Target from config or from request in case of SAML 1 String target = null; - IRequest pendingReq = RequestStorage.getPendingRequest(pendingRequestID); + IRequest pendingReq = RequestStorage.getPendingRequest(pendingRequestID); + if (pendingReq == null) { + Logger.info("No PendingRequest with Id: " + pendingRequestID + " Maybe, a transaction timeout occure."); + throw new MOAIDException("auth.28", new Object[]{pendingRequestID}); + + } MOAReversionLogger.getInstance().logEvent(pendingReq.getOnlineApplicationConfiguration(), pendingReq, MOAIDEventConstants.AUTHPROCESS_BKUTYPE_SELECTED, bkuid); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessEngineSignalServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessEngineSignalServlet.java index 83caaf75a..0f9eed8ec 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessEngineSignalServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessEngineSignalServlet.java @@ -14,10 +14,14 @@ import at.gv.egovernment.moa.id.auth.AuthenticationServer; import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
import at.gv.egovernment.moa.id.auth.data.AuthenticationSessionExtensions;
+import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.auth.exception.WrongParametersException;
import at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils;
+import at.gv.egovernment.moa.id.moduls.IRequest;
+import at.gv.egovernment.moa.id.moduls.RequestStorage;
import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage;
import at.gv.egovernment.moa.id.util.ParamValidatorUtils;
+import at.gv.egovernment.moa.logging.Logger;
/**
* Servlet that resumes a suspended process (in case of asynchronous tasks).
@@ -68,6 +72,14 @@ public class ProcessEngineSignalServlet extends AuthServlet { // retrieve moa session
pendingRequestID = AuthenticationSessionStoreage.getPendingRequestID(sessionID);
+
+ IRequest pendingReq = RequestStorage.getPendingRequest(pendingRequestID);
+ if (pendingReq == null) {
+ Logger.info("No PendingRequest with Id: " + pendingRequestID + " Maybe, a transaction timeout occure.");
+ throw new MOAIDException("auth.28", new Object[]{pendingRequestID});
+
+ }
+
AuthenticationSessionExtensions extendedSessionInformation = AuthenticationSessionStoreage.getAuthenticationSessionExtensions(sessionID);
AuthenticationSession session = AuthenticationServer.getSession(sessionID);
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java index 59b3a632a..5584e8ca6 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java @@ -288,7 +288,7 @@ public class DispatcherServlet extends AuthServlet{ MOAReversionLogger.getInstance().logEvent(MOAIDEventConstants.TRANSACTION_CREATED, protocolRequestID); MOAReversionLogger.getInstance().logEvent(uniqueSessionIdentifier, protocolRequestID, MOAIDEventConstants.SESSION_IP, req.getRemoteAddr()); - protocolRequest = info.preProcess(req, resp, action); + protocolRequest = info.preProcess(req, resp, action, uniqueSessionIdentifier, protocolRequestID); //request is a valid interfederation response if (protocolRequest != null && @@ -341,8 +341,8 @@ public class DispatcherServlet extends AuthServlet{ else moduleAction = info.getAction(protocolRequest.requestedAction()); - protocolRequestID = Random.nextRandom(); - protocolRequest.setRequestID(protocolRequestID); + protocolRequest.setRequestID(protocolRequestID); + protocolRequest.setSessionIdentifier(uniqueSessionIdentifier); RequestStorage.setPendingRequest(protocolRequest); Logger.debug(DispatcherServlet.class.getName()+": Create PendingRequest with ID " + protocolRequestID + "."); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/IModulInfo.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/IModulInfo.java index 05b6ec1f3..bdbb1b458 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/IModulInfo.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/IModulInfo.java @@ -35,7 +35,7 @@ public interface IModulInfo { public IAction getAction(String action); public IRequest preProcess(HttpServletRequest request, - HttpServletResponse response, String action) + HttpServletResponse response, String action, String sessionID, String transactionID) throws MOAIDException; public IAction canHandleRequest(HttpServletRequest request, diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/IRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/IRequest.java index 8f3ed9fdd..6f43b3ee7 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/IRequest.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/IRequest.java @@ -43,6 +43,7 @@ public interface IRequest { public void setRequestID(String id); public String getRequestID(); public String getSessionIdentifier(); + public void setSessionIdentifier(String sessionIdentifier); public String getRequestedIDP(); public MOAResponse getInterfederationResponse(); public List<Attribute> getRequestedAttributes(); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20BaseRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20BaseRequest.java index 844cfa815..dd6eba330 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20BaseRequest.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20BaseRequest.java @@ -31,6 +31,8 @@ import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringUtils; +import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; +import at.gv.egovernment.moa.id.advancedlogging.MOAReversionLogger; import at.gv.egovernment.moa.id.commons.config.MOAIDConfigurationConstants; import at.gv.egovernment.moa.id.config.ConfigurationException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; @@ -120,13 +122,17 @@ abstract class OAuth20BaseRequest extends RequestImpl { protected abstract void populateSpecialParameters(final HttpServletRequest request) throws OAuth20Exception; - public static OAuth20BaseRequest newInstance(final String action, final HttpServletRequest request) throws OAuth20Exception { + public static OAuth20BaseRequest newInstance(final String action, final HttpServletRequest request, String sessionId, String transactionId) throws OAuth20Exception { OAuth20BaseRequest res; if (action.equals(OAuth20Protocol.AUTH_ACTION)) { res = new OAuth20AuthRequest(); + MOAReversionLogger.getInstance().logEvent(sessionId, transactionId, MOAIDEventConstants.AUTHPROTOCOL_OPENIDCONNECT_AUTHREQUEST); + } else if (action.equals(OAuth20Protocol.TOKEN_ACTION)) { res = new OAuth20TokenRequest(); + MOAReversionLogger.getInstance().logEvent(sessionId, transactionId, MOAIDEventConstants.AUTHPROTOCOL_OPENIDCONNECT_TOKENREQUEST); + } else { throw new OAuth20InvalidRequestException(); } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java index 98d46d424..56d86df72 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java @@ -66,9 +66,10 @@ public class OAuth20Protocol implements IModulInfo { * at.gv.egovernment.moa.id.moduls.IModulInfo#preProcess(javax.servlet.http.HttpServletRequest, * javax.servlet.http.HttpServletResponse, java.lang.String) */ - public IRequest preProcess(HttpServletRequest request, HttpServletResponse resp, String action) throws MOAIDException { + public IRequest preProcess(HttpServletRequest request, HttpServletResponse resp, String action, + String sessionId, String transactionId) throws MOAIDException { // validation is done inside creation - OAuth20BaseRequest res = OAuth20BaseRequest.newInstance(action, request); + OAuth20BaseRequest res = OAuth20BaseRequest.newInstance(action, request, sessionId, transactionId); Logger.debug("Created: " + res); return res; } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java index 5440e7138..075494f68 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java @@ -197,7 +197,8 @@ public class PVP2XProtocol extends MOAIDAuthConstants implements IModulInfo { } public IRequest preProcess(HttpServletRequest request, - HttpServletResponse response, String action) throws MOAIDException { + HttpServletResponse response, String action, + String sessionId, String transactionId) throws MOAIDException { if (!AuthConfigurationProviderFactory.getInstance().getAllowedProtocols().isPVP21Active()) { @@ -234,19 +235,19 @@ public class PVP2XProtocol extends MOAIDAuthConstants implements IModulInfo { if (msg instanceof MOARequest && ((MOARequest)msg).getSamlRequest() instanceof AuthnRequest) - return preProcessAuthRequest(request, response, (MOARequest) msg); + return preProcessAuthRequest(request, response, (MOARequest) msg, sessionId, transactionId); else if (msg instanceof MOARequest && ((MOARequest)msg).getSamlRequest() instanceof AttributeQuery) - return preProcessAttributQueryRequest(request, response, (MOARequest) msg); + return preProcessAttributQueryRequest(request, response, (MOARequest) msg, sessionId, transactionId); else if (msg instanceof MOARequest && ((MOARequest)msg).getSamlRequest() instanceof LogoutRequest) - return preProcessLogOut(request, response, msg); + return preProcessLogOut(request, response, msg, sessionId, transactionId); else if (msg instanceof MOAResponse && ((MOAResponse)msg).getResponse() instanceof LogoutResponse) - return preProcessLogOut(request, response, msg); + return preProcessLogOut(request, response, msg, sessionId, transactionId); else if (msg instanceof MOAResponse && ((MOAResponse)msg).getResponse() instanceof Response) { @@ -455,7 +456,8 @@ public class PVP2XProtocol extends MOAIDAuthConstants implements IModulInfo { * @throws MOAIDException */ private IRequest preProcessLogOut(HttpServletRequest request, - HttpServletResponse response, InboundMessage inMsg) throws MOAIDException { + HttpServletResponse response, InboundMessage inMsg, + String sessionId, String transactionId) throws MOAIDException { PVPTargetConfiguration config = new PVPTargetConfiguration(); @@ -481,7 +483,8 @@ public class PVP2XProtocol extends MOAIDAuthConstants implements IModulInfo { config.setOnlineApplicationConfiguration(oa); config.setBinding(msg.getRequestBinding()); - MOAReversionLogger.getInstance().logEvent(config, MOAIDEventConstants.AUTHPROTOCOL_PVP_REQUEST_SLO); + MOAReversionLogger.getInstance().logEvent(sessionId, transactionId, MOAIDEventConstants.AUTHPROTOCOL_PVP_REQUEST_SLO); + } else if (inMsg instanceof MOAResponse && @@ -521,7 +524,8 @@ public class PVP2XProtocol extends MOAIDAuthConstants implements IModulInfo { * @throws Throwable */ private IRequest preProcessAttributQueryRequest(HttpServletRequest request, - HttpServletResponse response, MOARequest moaRequest) throws Throwable { + HttpServletResponse response, MOARequest moaRequest, + String sessionId, String transactionId) throws Throwable { AttributeQuery attrQuery = (AttributeQuery) moaRequest.getSamlRequest(); moaRequest.setEntityID(attrQuery.getIssuer().getValue()); @@ -559,7 +563,7 @@ public class PVP2XProtocol extends MOAIDAuthConstants implements IModulInfo { config.setOnlineApplicationConfiguration(oa); config.setBinding(SAMLConstants.SAML2_SOAP11_BINDING_URI); - MOAReversionLogger.getInstance().logEvent(config, MOAIDEventConstants.AUTHPROTOCOL_PVP_REQUEST_ATTRIBUTQUERY); + MOAReversionLogger.getInstance().logEvent(sessionId, transactionId, MOAIDEventConstants.AUTHPROTOCOL_PVP_REQUEST_ATTRIBUTQUERY); return config; } @@ -573,7 +577,8 @@ public class PVP2XProtocol extends MOAIDAuthConstants implements IModulInfo { * @throws Throwable */ private IRequest preProcessAuthRequest(HttpServletRequest request, - HttpServletResponse response, MOARequest moaRequest) throws Throwable { + HttpServletResponse response, MOARequest moaRequest, + String sessionId, String transactionId) throws Throwable { SignableXMLObject samlReq = moaRequest.getSamlRequest(); @@ -661,8 +666,9 @@ public class PVP2XProtocol extends MOAIDAuthConstants implements IModulInfo { //parse AuthRequest config.setPassiv(authReq.isPassive()); config.setForce(authReq.isForceAuthn()); + - MOAReversionLogger.getInstance().logEvent(config, MOAIDEventConstants.AUTHPROTOCOL_PVP_REQUEST_AUTHREQUEST); + MOAReversionLogger.getInstance().logEvent(sessionId, transactionId, MOAIDEventConstants.AUTHPROTOCOL_PVP_REQUEST_AUTHREQUEST); return config; } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java index f75293ef0..7416dfb00 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java @@ -31,6 +31,8 @@ import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringEscapeUtils; +import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; +import at.gv.egovernment.moa.id.advancedlogging.MOAReversionLogger; import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; import at.gv.egovernment.moa.id.auth.exception.InvalidProtocolRequestException; import at.gv.egovernment.moa.id.auth.exception.MOAIDException; @@ -97,7 +99,8 @@ public class SAML1Protocol extends MOAIDAuthConstants implements IModulInfo { } public IRequest preProcess(HttpServletRequest request, - HttpServletResponse response, String action) throws MOAIDException { + HttpServletResponse response, String action, + String sessionId, String transactionId) throws MOAIDException { SAML1RequestImpl config = new SAML1RequestImpl(); if (!AuthConfigurationProviderFactory.getInstance().getAllowedProtocols().isSAML1Active()) { @@ -157,6 +160,8 @@ public class SAML1Protocol extends MOAIDAuthConstants implements IModulInfo { config.setOnlineApplicationConfiguration(oaParam); config.setSourceID(sourceID); + MOAReversionLogger.getInstance().logEvent(sessionId, transactionId, MOAIDEventConstants.AUTHPROTOCOL_SAML1_AUTHNREQUEST); + if (MiscUtil.isNotEmpty(target)) config.setTarget(target); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKProtocol.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKProtocol.java index 843b519a6..071b5ae8a 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKProtocol.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKProtocol.java @@ -84,7 +84,8 @@ public class STORKProtocol extends MOAIDAuthConstants implements IModulInfo { First request step - send it to BKU selection for user authentication. After the user credentials and other info are obtained, in the second step the request will be processed and the user redirected */ - public IRequest preProcess(HttpServletRequest request, HttpServletResponse response, String action) throws MOAIDException { + public IRequest preProcess(HttpServletRequest request, HttpServletResponse response, String action, + String sessionId, String transactionId) throws MOAIDException { Logger.info("Starting preprocessing for Stork2 protocol"); Logger.debug("Request method: " + request.getMethod()); Logger.debug("Request content length: " + request.getContentLength()); diff --git a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties index 23a689305..f5f9f5979 100644 --- a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties +++ b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties @@ -45,6 +45,7 @@ auth.24=Das Send-Assertion Template entspricht nicht der Spezifikation von MOA-I auth.25=Fehler beim validieren der SZR-Gateway Response.
auth.26=SessionID unbekannt.
auth.27=Federated authentication FAILED.
+auth.28=Transaktion {0} kann nicht weitergef\u00FChrt werden. Wahrscheinlich wurde ein TimeOut erreicht.
init.00=MOA ID Authentisierung wurde erfolgreich gestartet
init.01=Fehler beim Aktivieren des IAIK-JCE/JSSE/JDK1.3 Workaround\: SSL ist m\u00F6glicherweise nicht verf\u00FCgbar
diff --git a/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties index 59a29d9bd..79d6d5eef 100644 --- a/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties +++ b/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties @@ -25,6 +25,7 @@ auth.24=9001 auth.25=1109 auth.26=1100 auth.27=4401 +auth.28=1100 init.00=9199 init.01=9199 |