aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv
diff options
context:
space:
mode:
authorpdanner <pdanner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-10-19 07:06:49 +0000
committerpdanner <pdanner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-10-19 07:06:49 +0000
commit114acd7687c92e9f2202536c6172b10266d7e949 (patch)
treed8a6a9ff93e39db0c112482f2a5e093267a14f2f /id/server/idserverlib/src/main/java/at/gv
parent2c8075dab2371856fd9f0a3695376932c07189b0 (diff)
downloadmoa-id-spss-114acd7687c92e9f2202536c6172b10266d7e949.tar.gz
moa-id-spss-114acd7687c92e9f2202536c6172b10266d7e949.tar.bz2
moa-id-spss-114acd7687c92e9f2202536c6172b10266d7e949.zip
Enabled more debug information
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1024 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java17
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessValidatorInputServlet.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepInputProcessorImpl.java28
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepValidator.java33
4 files changed, 45 insertions, 35 deletions
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;
}