aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-01-29 16:39:18 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-01-29 16:39:18 +0100
commitaa8ef6ac6e9f27cde7d009006de639893e0851f3 (patch)
tree9aa2d9b209738d42fc5560e10a1c8b11892df42c /id/server/idserverlib/src/main/java
parent648510a0769be3ebc4dc3d2e454172d230d3f217 (diff)
parent5ab7e548582a26dd37144df55efb63b7fca4483d (diff)
downloadmoa-id-spss-aa8ef6ac6e9f27cde7d009006de639893e0851f3.tar.gz
moa-id-spss-aa8ef6ac6e9f27cde7d009006de639893e0851f3.tar.bz2
moa-id-spss-aa8ef6ac6e9f27cde7d009006de639893e0851f3.zip
Merge remote-tracking branch 'remotes/origin/moa2_0_kstranacher' into moa2_0_tlenz
Conflicts: common/pom.xml id/server/auth/.settings/org.eclipse.wst.common.component id/server/auth/src/main/webapp/index.html id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.x.wsdl pom.xml spss/handbook/clients/api/pom.xml spss/handbook/clients/pom.xml spss/handbook/clients/referencedData/pom.xml spss/handbook/clients/webservice/pom.xml spss/handbook/pom.xml spss/pom.xml spss/server/pom.xml spss/server/serverlib/pom.xml spss/server/serverws/.settings/org.eclipse.wst.common.component spss/server/serverws/pom.xml spss/server/tools/pom.xml
Diffstat (limited to 'id/server/idserverlib/src/main/java')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java12
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java12
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java2
4 files changed, 19 insertions, 9 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java
index c3d983868..67433dde7 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java
@@ -67,7 +67,7 @@ public class StartAuthentificationParameterParser implements MOAIDAuthConstants{
// escape parameter strings
target = StringEscapeUtils.escapeHtml(target);
- oaURL = StringEscapeUtils.escapeHtml(oaURL);
+ //oaURL = StringEscapeUtils.escapeHtml(oaURL);
bkuURL = StringEscapeUtils.escapeHtml(bkuURL);
templateURL = StringEscapeUtils.escapeHtml(templateURL);
useMandate = StringEscapeUtils.escapeHtml(useMandate);
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java
index ba71d0f5c..80b1547c9 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java
@@ -71,6 +71,7 @@ import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage;
import at.gv.egovernment.moa.id.util.ParamValidatorUtils;
import at.gv.egovernment.moa.id.util.ServletUtils;
import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.spss.util.CertificateUtils;
/**
* Servlet requested for getting the foreign eID
@@ -180,8 +181,17 @@ public class VerifyCertificateServlet extends AuthServlet {
ServletUtils.writeCreateXMLSignatureRequestOrRedirect(resp, session, createXMLSignatureRequestOrRedirect, AuthenticationServer.REQ_PROCESS_VALIDATOR_INPUT, "VerifyCertificate");
}
else {
+
+
+ String countrycode = CertificateUtils.getIssuerCountry(cert);
+ if (countrycode != null) {
+ if (countrycode.compareToIgnoreCase("AT") == 0) {
+ Logger.error("Certificate issuer country code is \"AT\". Login not support in foreign identities mode.");
+ throw new AuthenticationException("auth.22", null);
+ }
+ }
+
// Foreign Identities Modus
-
String createXMLSignatureRequest = AuthenticationServer.getInstance().createXMLSignatureRequestForeignID(session, cert);
// build dataurl (to the GetForeignIDSerlvet)
String dataurl =
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java
index 57b867868..7c91026bf 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java
@@ -54,7 +54,7 @@ import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
import at.gv.egovernment.moa.id.data.AuthenticationData;
import at.gv.egovernment.moa.id.moduls.IRequest;
import at.gv.egovernment.moa.id.storage.AssertionStorage;
-import at.gv.egovernment.moa.id.util.IdentityLinkReSigner;
+//import at.gv.egovernment.moa.id.util.IdentityLinkReSigner;
import at.gv.egovernment.moa.id.util.Random;
import at.gv.egovernment.moa.logging.Logger;
import at.gv.egovernment.moa.util.Base64Utils;
@@ -202,12 +202,12 @@ public class SAML1AuthenticationServer extends AuthenticationServer {
String ilAssertion = "";
if (saml1parameter.isProvideIdentityLink()) {
if (oaParam.getBusinessService()) {
- IdentityLinkReSigner identitylinkresigner = IdentityLinkReSigner.getInstance();
+ //IdentityLinkReSigner identitylinkresigner = IdentityLinkReSigner.getInstance();
- Element resignedilAssertion = identitylinkresigner.resignIdentityLink(authData.getIdentityLink()
- .getSamlAssertion());
-
- ilAssertion = DOMUtils.serializeNode(resignedilAssertion);
+// Element resignedilAssertion = identitylinkresigner.resignIdentityLink(authData.getIdentityLink()
+// .getSamlAssertion());
+//
+// ilAssertion = DOMUtils.serializeNode(resignedilAssertion);
} else {
ilAssertion = authData.getIdentityLink().getSerializedSamlAssertion();
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 1019a16c2..1c57c841e 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
@@ -82,7 +82,7 @@ public class SAML1Protocol implements IModulInfo, MOAIDAuthConstants {
HttpServletResponse response, String action) throws MOAIDException {
RequestImpl config = new RequestImpl();
String oaURL = (String) request.getParameter(PARAM_OA);
- oaURL = StringEscapeUtils.escapeHtml(oaURL);
+ //oaURL = StringEscapeUtils.escapeHtml(oaURL);
String target = (String) request.getParameter(PARAM_TARGET);
target = StringEscapeUtils.escapeHtml(target);