aboutsummaryrefslogtreecommitdiff
path: root/id/server
diff options
context:
space:
mode:
authorBojan Suzic <bojan.suzic@iaik.tugraz.at>2014-02-05 12:38:45 +0100
committerBojan Suzic <bojan.suzic@iaik.tugraz.at>2014-02-05 12:38:45 +0100
commitc3745720650268de1f1b06e2b3dc891122ace9bb (patch)
treed092a52508a1746150d03c75364b7f9fa8b51677 /id/server
parenta0d75604747c0dcb314ef5de37d2c47c51312006 (diff)
downloadmoa-id-spss-c3745720650268de1f1b06e2b3dc891122ace9bb.tar.gz
moa-id-spss-c3745720650268de1f1b06e2b3dc891122ace9bb.tar.bz2
moa-id-spss-c3745720650268de1f1b06e2b3dc891122ace9bb.zip
changing some stork parameters; adjusting spss maven config
Diffstat (limited to 'id/server')
-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
6 files changed, 43 insertions, 17 deletions
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;
}