aboutsummaryrefslogtreecommitdiff
path: root/id
diff options
context:
space:
mode:
Diffstat (limited to 'id')
-rw-r--r--id/ConfigWebTool/ConfigurationInterface.iml7
-rw-r--r--id/server/idserverlib/moa-id-lib.iml2
-rw-r--r--id/server/idserverlib/pom.xml4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AuthenticationRequest.java12
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKAuthnRequestDEL.java9
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKProtocol.java31
7 files changed, 48 insertions, 19 deletions
diff --git a/id/ConfigWebTool/ConfigurationInterface.iml b/id/ConfigWebTool/ConfigurationInterface.iml
index 9c351185e..bb7e047b2 100644
--- a/id/ConfigWebTool/ConfigurationInterface.iml
+++ b/id/ConfigWebTool/ConfigurationInterface.iml
@@ -74,7 +74,7 @@
<orderEntry type="library" name="Maven: xmlunit:xmlunit:1.0" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.0.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.6.1" level="project" />
- <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.5" level="project" />
+ <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.6.1" level="project" />
<orderEntry type="library" name="Maven: org.jvnet.hyperjaxb3:hyperjaxb3-ejb-schemas-persistence:0.5.6" level="project" />
<orderEntry type="library" name="Maven: org.jvnet.hyperjaxb3:hyperjaxb3-ejb-schemas-customizations:0.5.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring:2.0.7" level="project" />
@@ -116,7 +116,7 @@
<orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.xerces:xercesImpl:2.10.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.xerces:serializer:2.10.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: xml-resolver:xml-resolver:1.2" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: xalan:xalan:2.7.1" level="project" />
+ <orderEntry type="library" name="Maven: xalan:xalan:2.7.1" level="project" />
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.velocity:velocity:1.7" level="project" />
<orderEntry type="library" name="Maven: org.owasp.esapi:esapi:2.0.1" level="project" />
@@ -183,6 +183,9 @@
<orderEntry type="library" name="Maven: com.google.collections:google-collections:1.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.0.1" level="project" />
<orderEntry type="library" name="Maven: at.gv.util:egovutils:1.0.4" level="project" />
+ <orderEntry type="library" name="Maven: commons-validator:commons-validator:1.3.1" level="project" />
+ <orderEntry type="library" name="Maven: commons-digester:commons-digester:1.6" level="project" />
+ <orderEntry type="library" name="Maven: bouncycastle:bcprov-jdk16:140" level="project" />
<orderEntry type="library" name="Maven: org.apache.struts:struts2-core:2.3.14.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.struts.xwork:xwork-core:2.3.14.3" level="project" />
<orderEntry type="library" name="Maven: ognl:ognl:3.0.6" level="project" />
diff --git a/id/server/idserverlib/moa-id-lib.iml b/id/server/idserverlib/moa-id-lib.iml
index e79bae817..1c04295d7 100644
--- a/id/server/idserverlib/moa-id-lib.iml
+++ b/id/server/idserverlib/moa-id-lib.iml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
+ <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml
index 9896690f5..c4d5310bf 100644
--- a/id/server/idserverlib/pom.xml
+++ b/id/server/idserverlib/pom.xml
@@ -277,8 +277,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.6</source>
- <target>1.6</target>
+ <source>1.5</source>
+ <target>1.5</target>
</configuration>
</plugin>
<plugin>
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 06d5b01bd..4b3995105 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
@@ -1862,7 +1862,7 @@ public class AuthenticationServer implements MOAIDAuthConstants {
CPEPS cpeps = storkConfig.getCPEPS(moasession.getCcc());
- Logger.debug("Preparing to assemble STORK AuthnRequest witt the following values:");
+ Logger.debug("Preparing to assemble STORK AuthnRequest with the following values:");
String destination = cpeps.getPepsURL().toExternalForm();
Logger.debug("C-PEPS URL: " + destination);
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AuthenticationRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AuthenticationRequest.java
index 297c5f366..7e80273ca 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AuthenticationRequest.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AuthenticationRequest.java
@@ -5,16 +5,11 @@ import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.moduls.IAction;
import at.gv.egovernment.moa.id.moduls.IRequest;
import at.gv.egovernment.moa.logging.Logger;
-import eu.stork.mw.messages.saml.STORKAuthnRequest;
-import eu.stork.vidp.api.messages.StartAuthResponse;
-import eu.stork.vidp.messages.stork.SpInstitution;
-import eu.stork.vidp.messages.util.SAMLUtil;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.runtime.RuntimeConstants;
import org.opensaml.xml.util.Base64;
import org.opensaml.xml.util.XMLHelper;
-
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -49,6 +44,7 @@ public class AuthenticationRequest implements IAction {
httpResp.reset();
//httpResp.addHeader("Location", "http:/www.google.com");
if (req instanceof STORKAuthnRequestDEL) {
+ /*
Logger.debug("STORK QAA 2 :" + ((STORKAuthnRequestDEL) req).getStorkAuthnRequest().getQAALevel());
StartAuthResponse startAuthResponse = getStartAuthResponse(((STORKAuthnRequestDEL) req).getStorkAuthnRequest());
@@ -78,6 +74,8 @@ public class AuthenticationRequest implements IAction {
throw new MOAIDException("error response sending", new Object[]{});
}
//httpSession.setAttribute("CCC", ccc);
+
+ */
}
@@ -93,6 +91,8 @@ public class AuthenticationRequest implements IAction {
}
+ /*
+
public StartAuthResponse getStartAuthResponse(STORKAuthnRequest authnRequest) {
StartAuthResponse authResponse = new StartAuthResponse(500, null, new HashMap<String, String>());
@@ -141,6 +141,8 @@ public class AuthenticationRequest implements IAction {
return authResponse;
}
+ */
+
public String getDefaultActionName() {
return STORKProtocol.AUTHENTICATIONREQUEST;
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKAuthnRequestDEL.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKAuthnRequestDEL.java
index 57dfad73f..c8a5ac84d 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKAuthnRequestDEL.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKAuthnRequestDEL.java
@@ -1,8 +1,7 @@
package at.gv.egovernment.moa.id.protocols.stork2;
import at.gv.egovernment.moa.id.moduls.IRequest;
-import eu.stork.mw.messages.saml.STORKAuthnRequest;
-import eu.stork.vidp.messages.saml.impl.STORKAuthnRequestImpl;
+import eu.stork.peps.auth.commons.STORKAuthnRequest;
import org.opensaml.common.xml.SAMLConstants;
/**
@@ -16,13 +15,13 @@ public class STORKAuthnRequestDEL implements IRequest {
private String target = null;
String module = null;
String action = null;
- private eu.stork.mw.messages.saml.STORKAuthnRequest storkAuthnRequest;
+ private STORKAuthnRequest storkAuthnRequest;
- public void setSTORKAuthnRequest(STORKAuthnRequestImpl request) {
+ public void setSTORKAuthnRequest(STORKAuthnRequest request) {
this.storkAuthnRequest = request;
}
- public eu.stork.mw.messages.saml.STORKAuthnRequest getStorkAuthnRequest() {
+ public STORKAuthnRequest getStorkAuthnRequest() {
return this.storkAuthnRequest;
}
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 e99079191..2c47620e1 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
@@ -8,14 +8,16 @@ import at.gv.egovernment.moa.id.moduls.IModulInfo;
import at.gv.egovernment.moa.id.moduls.IRequest;
import at.gv.egovernment.moa.id.protocols.pvp2x.binding.MOAURICompare;
import at.gv.egovernment.moa.logging.Logger;
-import eu.stork.mw.messages.saml.STORKAuthnRequest;
-import eu.stork.vidp.messages.saml.impl.STORKAuthnRequestImpl;
+import eu.stork.peps.auth.commons.PEPSUtil;
+import eu.stork.peps.auth.commons.STORKAuthnResponse;
+import eu.stork.peps.auth.engine.STORKSAMLEngine;
import org.opensaml.common.binding.BasicSAMLMessageContext;
import org.opensaml.saml2.binding.decoding.HTTPPostDecoder;
import org.opensaml.ws.transport.http.HTTPInTransport;
import org.opensaml.ws.transport.http.HTTPOutTransport;
import org.opensaml.ws.transport.http.HttpServletRequestAdapter;
import org.opensaml.ws.transport.http.HttpServletResponseAdapter;
+import eu.stork.peps.auth.commons.STORKAuthnRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -97,6 +99,7 @@ public class STORKProtocol implements IModulInfo, MOAIDAuthConstants {
} catch (Exception e) {
Logger.error("Error decoding STORKAuthnRequest", e);
}
+ /*
STORKAuthnRequestImpl ST2Req = (STORKAuthnRequestImpl)samlMessageContext.getInboundSAMLMessage();
//STORKAuthnRequestDEL STORK2Request = (STORKAuthnRequestDEL)samlMessageContext.getInboundSAMLMessage();
@@ -107,10 +110,32 @@ public class STORKProtocol implements IModulInfo, MOAIDAuthConstants {
Logger.debug("STORK2 QAA: " + ST2Req.getQAALevel());
Logger.debug("STORK2 ISSUER: " + ST2Req.getIssuer().toString());
-
+ */
STORKAuthnReq storkAuthnReq = new STORKAuthnReq();
+ STORKAuthnRequestDEL STORK2Request = new STORKAuthnRequestDEL();
+
+
+ //extract STORK Response from HTTP Request
+ //Decodes SAML Response
+
+ /*
+ byte[] decSamlToken;
+ try {
+ decSamlToken = PEPSUtil.decodeSAMLToken(request.getParameter("SAMLResponse"));
+ } catch(NullPointerException e) {
+ Logger.error("Unable to retrieve STORK Response", e);
+ throw new MOAIDException("stork.04", null);
+ }
+
+ //Get SAMLEngine instance
+ STORKSAMLEngine engine = STORKSAMLEngine.getInstance("outgoing");
+
+ STORKAuthnResponse authnResponse = null;
+ PEPSUtil.decode
+ engine.validateSTORKAuthnRequest()
+ */
return STORK2Request;
}