From 114acd7687c92e9f2202536c6172b10266d7e949 Mon Sep 17 00:00:00 2001 From: pdanner Date: Fri, 19 Oct 2007 07:06:49 +0000 Subject: Enabled more debug information git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1024 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../schemas/MOA-ID-Configuration-1.4.2.xsd | 2 ++ id/server/doc/MOA-ID-Configuration-1.4.2.xsd | 2 ++ .../moa/id/auth/AuthenticationServer.java | 17 ++++++--- .../auth/servlet/ProcessValidatorInputServlet.java | 2 ++ .../validator/parep/ParepInputProcessorImpl.java | 28 +++++++-------- .../id/auth/validator/parep/ParepValidator.java | 33 +++++++++-------- .../resources/templates/ParepMinTemplate.html | 42 +++++++++++----------- .../resources/templates/ParepTemplate.html | 42 +++++++++++----------- 8 files changed, 91 insertions(+), 77 deletions(-) diff --git a/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.2.xsd b/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.2.xsd index 5a87e3fde..43ab377d0 100644 --- a/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.2.xsd +++ b/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.2.xsd @@ -185,6 +185,8 @@ + + diff --git a/id/server/doc/MOA-ID-Configuration-1.4.2.xsd b/id/server/doc/MOA-ID-Configuration-1.4.2.xsd index 5a87e3fde..43ab377d0 100644 --- a/id/server/doc/MOA-ID-Configuration-1.4.2.xsd +++ b/id/server/doc/MOA-ID-Configuration-1.4.2.xsd @@ -185,6 +185,8 @@ + + diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index 75197943f..e23e2bb78 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -1061,9 +1061,9 @@ public class AuthenticationServer implements MOAIDAuthConstants { session.getExtendedSAMLAttributesOA()); authData.setSamlAssertion(samlAssertion); - - //ParepUtils.saveStringToFile(samlAssertion, new File("c:/saml_assertion.xml")); - + String assertionFile = AuthConfigurationProvider.getInstance().getGenericConfigurationParameter("AuthenticationServer.WritAssertionToFile"); + if (!ParepUtils.isEmpty(assertionFile)) ParepUtils.saveStringToFile(samlAssertion, new File(assertionFile)); //Ex: "c:/saml_assertion.xml" + return authData; } catch (Throwable ex) { throw new BuildException( @@ -1093,7 +1093,16 @@ public class AuthenticationServer implements MOAIDAuthConstants { Logger.error("Assertion not found for SAML Artifact: " + samlArtifact); throw new AuthenticationException("1206", new Object[] { samlArtifact }); } - authenticationDataStore.remove(assertionHandle); + boolean keepAssertion = false; + try { + String boolStr = AuthConfigurationProvider.getInstance().getGenericConfigurationParameter("AuthenticationServer.KeepAssertion"); + if ((null!=boolStr && boolStr.equalsIgnoreCase("true"))) keepAssertion = true;//Only allowed for debug purposes!!! + } catch (ConfigurationException ex) { + throw new AuthenticationException("1205", new Object[] { samlArtifact, ex.toString()}); + } + if (!keepAssertion) { + authenticationDataStore.remove(assertionHandle); + } } long now = new Date().getTime(); if (now - authData.getTimestamp().getTime() > authDataTimeOut) diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessValidatorInputServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessValidatorInputServlet.java index df480b624..c41e39466 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessValidatorInputServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessValidatorInputServlet.java @@ -62,6 +62,7 @@ public class ProcessValidatorInputServlet extends AuthServlet { String sessionID = req.getParameter(PARAM_SESSIONID); if (sessionID==null) sessionID = (String) req.getAttribute(PARAM_SESSIONID); if (sessionID==null) sessionID = (String) parameters.get(PARAM_SESSIONID); + if (sessionID==null) sessionID = (String) parameters.get(PARAM_SESSIONID+"_"); try { AuthenticationSession session = AuthenticationServer.getSession(sessionID); @@ -112,6 +113,7 @@ public class ProcessValidatorInputServlet extends AuthServlet { String sessionID = req.getParameter(PARAM_SESSIONID); if (sessionID==null) sessionID = (String) req.getAttribute(PARAM_SESSIONID); if (sessionID==null) sessionID = (String) parameters.get(PARAM_SESSIONID); + if (sessionID==null) sessionID = (String) parameters.get(PARAM_SESSIONID+"_"); try { AuthenticationSession session = AuthenticationServer.getSession(sessionID); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepInputProcessorImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepInputProcessorImpl.java index aff5d8a7a..80ef7c304 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepInputProcessorImpl.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepInputProcessorImpl.java @@ -101,37 +101,37 @@ public class ParepInputProcessorImpl implements ParepInputProcessor{ if (!ParepUtils.isEmpty(extErrortext)) formNecessary = true; String locErrortext = "Folgende Parameter fehlen: "; - String familyName = (String) parameters.get("familyname"); + String familyName = (String) parameters.get("familyname_"); if (null == familyName) familyName =""; - String givenName = (String) parameters.get("givenname"); + String givenName = (String) parameters.get("givenname_"); if (null == givenName) givenName =""; - boolean physical = "true".equals(parameters.get("physical")); - String dobday = (String) parameters.get("dobday"); + boolean physical = "true".equals(parameters.get("physical_")); + String dobday = (String) parameters.get("dobday_"); if (null!=dobday && dobday.equalsIgnoreCase("TT")) dobday=""; - String dobmonth = (String) parameters.get("dobmonth"); + String dobmonth = (String) parameters.get("dobmonth_"); if (null!=dobmonth && dobmonth.equalsIgnoreCase("MM")) dobmonth=""; - String dobyear = (String) parameters.get("dobyear"); + String dobyear = (String) parameters.get("dobyear_"); if (null!=dobyear && dobyear.equalsIgnoreCase("JJJJ")) dobyear=""; String dateOfBirth = ""; dobyear = (" ".substring(0, 4-dobyear.length()) + dobyear); dobmonth = (" ".substring(0, 2-dobmonth.length()) + dobmonth); dobday = (" ".substring(0, 2-dobday.length()) + dobday); dateOfBirth = dobyear + "-" + dobmonth + "-" + dobday; - String cbFullName = (String) parameters.get("fullname"); + String cbFullName = (String) parameters.get("fullname_"); if (null == cbFullName) cbFullName =""; - String cbIdentificationType = (String) parameters.get("cbidentificationtype"); + String cbIdentificationType = (String) parameters.get("cbidentificationtype_"); if (null == cbIdentificationType) cbIdentificationType =""; - String cbIdentificationValue = (String) parameters.get("cbidentificationvalue"); + String cbIdentificationValue = (String) parameters.get("cbidentificationvalue_"); if (null == cbIdentificationValue) cbIdentificationValue =""; - String postalCode = (String) parameters.get("postalcode"); + String postalCode = (String) parameters.get("postalcode_"); if (null == postalCode) postalCode =""; - String municipality = (String) parameters.get("municipality"); + String municipality = (String) parameters.get("municipality_"); if (null == municipality) municipality =""; - String streetName = (String) parameters.get("streetname"); + String streetName = (String) parameters.get("streetname_"); if (null == streetName) streetName =""; - String buildingNumber = (String) parameters.get("buildingnumber"); + String buildingNumber = (String) parameters.get("buildingnumber_"); if (null == buildingNumber) buildingNumber =""; - String unit = (String) parameters.get("unit"); + String unit = (String) parameters.get("unit_"); if (null == unit) unit =""; if (physical) { diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepValidator.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepValidator.java index 79eaf782a..cfe84dbc2 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepValidator.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepValidator.java @@ -344,12 +344,11 @@ public class ParepValidator implements InfoboxValidator { response = client.createMandateResponse(requ); } catch (SZRGWClientException e) { // give him a second try - Nach dem Starten des Tomcat wird beim ersten Mal das Client-Zertifikat offenbar vom HTTPClient nicht mitgeschickt. - Logger.debug("2. Versuch - Kommunikation mit dem Stammzahlenregister Gateway..."); client = new SZRGWClient(connectionParameters.getUrl()); if (connectionParameters.getUrl().toLowerCase().startsWith("https:")) client.setSSLSocketFactory(SSLUtils.getSSLSocketFactory(AuthConfigurationProvider.getInstance(), connectionParameters)); response = client.createMandateResponse(requ); } - Logger.debug("SZR-Gateway Response Code: " + response.getResultCode()+ " " + response.getInfo()); + Logger.debug("SZR-Gateway Response Code: " + response.getResultCode()+ " " + response.getInfo()!=null ? response.getInfo():""); if (response.getResultCode()==2000) { if(response.getMandate()==null) { Logger.error("Keine Vollmacht vom SZR-Gateway erhalten"); @@ -525,21 +524,21 @@ public class ParepValidator implements InfoboxValidator { } catch (Exception e) { Logger.error("Could not extract Mandator form SZR-gateway request"); } - parameters.put("familyname", familyName); - parameters.put("givenname", givenName); - parameters.put("dateofbirth", dateOfBirth); - parameters.put("dobyear", dateOfBirth.substring(0,4)); - parameters.put("dobmonth", dateOfBirth.substring(5,7)); - parameters.put("dobday", dateOfBirth.substring(8,10)); - parameters.put("physical", physical ? "true" : "false"); - parameters.put("fullname", cbFullName); - parameters.put("cbidentificationtype", cbIdentificationType); - parameters.put("cbidentificationvalue", cbIdentificationValue); - parameters.put("postalcode", postalCode); - parameters.put("municipality", municipality); - parameters.put("streetname", streetName); - parameters.put("buildingnumber", buildingNumber); - parameters.put("unit", unit); + parameters.put("familyname_", familyName); + parameters.put("givenname_", givenName); + parameters.put("dateofbirth_", dateOfBirth); + parameters.put("dobyear_", dateOfBirth.substring(0,4)); + parameters.put("dobmonth_", dateOfBirth.substring(5,7)); + parameters.put("dobday_", dateOfBirth.substring(8,10)); + parameters.put("physical_", physical ? "true" : "false"); + parameters.put("fullname_", cbFullName); + parameters.put("cbidentificationtype_", cbIdentificationType); + parameters.put("cbidentificationvalue_", cbIdentificationValue); + parameters.put("postalcode_", postalCode); + parameters.put("municipality_", municipality); + parameters.put("streetname_", streetName); + parameters.put("buildingnumber_", buildingNumber); + parameters.put("unit_", unit); return parameters; } diff --git a/id/server/idserverlib/src/main/resources/resources/templates/ParepMinTemplate.html b/id/server/idserverlib/src/main/resources/resources/templates/ParepMinTemplate.html index a7608b9b4..40421d7d5 100644 --- a/id/server/idserverlib/src/main/resources/resources/templates/ParepMinTemplate.html +++ b/id/server/idserverlib/src/main/resources/resources/templates/ParepMinTemplate.html @@ -17,21 +17,21 @@ Berufliche Parteienvertretung einer natürlichen/juristischen Person Vorname  Dieses Feld muss ausgefüllt sein! - + Name  Dieses Feld muss ausgefüllt sein! - + Geburtsdatum  Dieses Feld muss ausgefüllt sein! - - - - - + + - + - @@ -45,25 +45,25 @@ Berufliche Parteienvertretung einer natürlichen/juristischen Person Vetretene Person: -  natürliche Person:  +  natürliche Person:  Vorname  Dieses Feld muss ausgefüllt sein! -  Vorname laut ZMR Schreibweise +  Vorname laut ZMR Schreibweise Name  Dieses Feld muss ausgefüllt sein! -  Familienname laut ZMR Schreibweise +  Familienname laut ZMR Schreibweise Geburtsdatum  Dieses Feld muss ausgefüllt sein! - - - - -  Format: JJJJ-MM-TT + + - + -  Format: JJJJ-MM-TT @@ -74,31 +74,31 @@ Berufliche Parteienvertretung einer natürlichen/juristischen Person Straße  -  Straüe laut ZMR Schreibweise +  Straüe laut ZMR Schreibweise Hausnmummer  -  Hausnummer laut ZMR Schreibweise +  Hausnummer laut ZMR Schreibweise Einh. Nr.  -  Nutzungseinheitsnummer laut ZMR Schreibweise +  Nutzungseinheitsnummer laut ZMR Schreibweise Postleitzahl  -  Postleitzahl laut ZMR Schreibweise +  Postleitzahl laut ZMR Schreibweise Gemeinde  -  Gemeinde laut ZMR Schreibweise +  Gemeinde laut ZMR Schreibweise @@ -106,28 +106,28 @@ Berufliche Parteienvertretung einer natürlichen/juristischen Person   -  juristische Person:  +  juristische Person:  Name  Dieses Feld muss ausgefüllt sein! -  Name der Organisation laut ZMR Schreibweise +  Name der Organisation laut ZMR Schreibweise -   Dieses Feld muss ausgefüllt sein! -  Ordnungsbegriff laut ZMR Schreibweise +  Ordnungsbegriff laut ZMR Schreibweise

Bitte halten Sie Ihre Bürgerkartenumgebung bereit.

- +

diff --git a/id/server/idserverlib/src/main/resources/resources/templates/ParepTemplate.html b/id/server/idserverlib/src/main/resources/resources/templates/ParepTemplate.html index acfd9ead6..eabbea348 100644 --- a/id/server/idserverlib/src/main/resources/resources/templates/ParepTemplate.html +++ b/id/server/idserverlib/src/main/resources/resources/templates/ParepTemplate.html @@ -52,21 +52,21 @@ Bitte beachten Sie Vorname  Dieses Feld muss ausgefüllt sein! - + Name  Dieses Feld muss ausgefüllt sein! - + Geburtsdatum  Dieses Feld muss ausgefüllt sein! - - - - - + + - + - @@ -80,25 +80,25 @@ Bitte beachten Sie Vetretene Person: -  natürliche Person:  +  natürliche Person:  Vorname  Dieses Feld muss ausgefüllt sein! -  Vorname laut ZMR Schreibweise +  Vorname laut ZMR Schreibweise Name  Dieses Feld muss ausgefüllt sein! -  Familienname laut ZMR Schreibweise +  Familienname laut ZMR Schreibweise Geburtsdatum  Dieses Feld muss ausgefüllt sein! - - - - -  Format: JJJJ-MM-TT + + - + -  Format: JJJJ-MM-TT @@ -109,31 +109,31 @@ Bitte beachten Sie Straße  -  Straüe laut ZMR Schreibweise +  Straüe laut ZMR Schreibweise Hausnmummer  -  Hausnummer laut ZMR Schreibweise +  Hausnummer laut ZMR Schreibweise Einh. Nr.  -  Nutzungseinheitsnummer laut ZMR Schreibweise +  Nutzungseinheitsnummer laut ZMR Schreibweise Postleitzahl  -  Postleitzahl laut ZMR Schreibweise +  Postleitzahl laut ZMR Schreibweise Gemeinde  -  Gemeinde laut ZMR Schreibweise +  Gemeinde laut ZMR Schreibweise @@ -141,28 +141,28 @@ Bitte beachten Sie   -  juristische Person:  +  juristische Person:  Name  Dieses Feld muss ausgefüllt sein! -  Name der Organisation laut ZMR Schreibweise +  Name der Organisation laut ZMR Schreibweise -   Dieses Feld muss ausgefüllt sein! -  Ordnungsbegriff laut ZMR Schreibweise +  Ordnungsbegriff laut ZMR Schreibweise

Bitte halten Sie Ihre Bürgerkartenumgebung bereit.

- +

-- cgit v1.2.3