aboutsummaryrefslogtreecommitdiff
path: root/id/server/stork2-saml-engine/src/test
diff options
context:
space:
mode:
authorFlorian Reimair <florian.reimair@iaik.tugraz.at>2015-08-10 16:35:14 +0200
committerFlorian Reimair <florian.reimair@iaik.tugraz.at>2015-08-10 16:45:26 +0200
commit496ba9bb6e150ad67c5c628c1c97f30d6da81dfb (patch)
tree1dbe494358ab717b2bf94bae9fd3c3f90f4dbd58 /id/server/stork2-saml-engine/src/test
parentf71531346c6be197957311712ba093e024545e37 (diff)
downloadmoa-id-spss-496ba9bb6e150ad67c5c628c1c97f30d6da81dfb.tar.gz
moa-id-spss-496ba9bb6e150ad67c5c628c1c97f30d6da81dfb.tar.bz2
moa-id-spss-496ba9bb6e150ad67c5c628c1c97f30d6da81dfb.zip
approved changes
Diffstat (limited to 'id/server/stork2-saml-engine/src/test')
-rw-r--r--id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAttrQueryRequestTest.java12
-rw-r--r--id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAuthRequestTest.java12
-rw-r--r--id/server/stork2-saml-engine/src/test/resources/SamlEngine.xml124
-rw-r--r--id/server/stork2-saml-engine/src/test/resources/SignModule_Conf0.xml28
-rw-r--r--id/server/stork2-saml-engine/src/test/resources/SignModule_Conf1.xml14
-rw-r--r--id/server/stork2-saml-engine/src/test/resources/SignModule_Conf2.xml14
-rw-r--r--id/server/stork2-saml-engine/src/test/resources/SignModule_Conf3.xml14
-rw-r--r--id/server/stork2-saml-engine/src/test/resources/SignModule_P11.xml13
8 files changed, 134 insertions, 97 deletions
diff --git a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAttrQueryRequestTest.java b/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAttrQueryRequestTest.java
index 502e0e461..4f22df7fb 100644
--- a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAttrQueryRequestTest.java
+++ b/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAttrQueryRequestTest.java
@@ -59,6 +59,18 @@ public class StorkAttrQueryRequestTest {
givenName.setValue(Arrays.asList("Sveinbjorn"));
pal.add(givenName);
+ final PersonalAttribute fiscalNumber = new PersonalAttribute();
+ fiscalNumber.setName("fiscalNumber");
+ fiscalNumber.setIsRequired(true);
+ fiscalNumber.setValue(Arrays.asList("fiscalNumber"));
+ pal.add(fiscalNumber);
+
+ final PersonalAttribute LPFiscalNumber = new PersonalAttribute();
+ LPFiscalNumber.setName("LPFiscalNumber");
+ LPFiscalNumber.setIsRequired(true);
+ LPFiscalNumber.setValue(Arrays.asList("LPFiscalNumber"));
+ pal.add(LPFiscalNumber);
+
destination = "http://A-PEPS.gov.xx/PEPS/AttributeColleagueRequest";
assertConsumerUrl = "http://S-PEPS.gov.xx/PEPS/ColleagueResponse";
// spName = "University of Oxford";
diff --git a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAuthRequestTest.java b/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAuthRequestTest.java
index beca213ac..d476ad26e 100644
--- a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAuthRequestTest.java
+++ b/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAuthRequestTest.java
@@ -21,15 +21,12 @@ import java.util.ArrayList;
import org.junit.Ignore;
import org.junit.Test;
-
import org.opensaml.xml.parse.BasicParserPool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import eu.stork.peps.auth.commons.IPersonalAttributeList;
-import eu.stork.peps.auth.commons.PersonalAttribute;
-import eu.stork.peps.auth.commons.PersonalAttributeList;
-import eu.stork.peps.auth.commons.STORKAuthnRequest;
+import eu.stork.peps.*;
+import eu.stork.peps.auth.commons.*;
import eu.stork.peps.auth.engine.STORKSAMLEngine;
import eu.stork.peps.exceptions.STORKSAMLEngineException;
@@ -68,6 +65,11 @@ public class StorkAuthRequestTest {
eIDNumber.setIsRequired(true);
pal.add(eIDNumber);
+ final PersonalAttribute LPFiscalNumber = new PersonalAttribute();
+ LPFiscalNumber.setName("LPFiscalNumber");
+ LPFiscalNumber.setIsRequired(true);
+ pal.add(LPFiscalNumber);
+
destination = "http://C-PEPS.gov.xx/PEPS/ColleagueRequest";
assertConsumerUrl = "http://S-PEPS.gov.xx/PEPS/ColleagueResponse";
diff --git a/id/server/stork2-saml-engine/src/test/resources/SamlEngine.xml b/id/server/stork2-saml-engine/src/test/resources/SamlEngine.xml
index 171e05f12..fadef82b2 100644
--- a/id/server/stork2-saml-engine/src/test/resources/SamlEngine.xml
+++ b/id/server/stork2-saml-engine/src/test/resources/SamlEngine.xml
@@ -1,67 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<instances>
- <!-- Configuration name -->
- <instance name="CONF0">
- <!-- Configurations parameters StorkSamlEngine -->
- <configuration name="SamlEngineConf">
- <parameter name="fileConfiguration" value="StorkSamlEngine_Conf0.xml" />
- </configuration>
+ <!-- Configuration name -->
+ <instance name="CONF0">
+ <!-- Configurations parameters StorkSamlEngine -->
+ <configuration name="SamlEngineConf">
+ <parameter name="fileConfiguration" value="StorkSamlEngine_Conf0.xml" />
+ </configuration>
- <!-- Settings module signature -->
- <configuration name="SignatureConf">
- <!-- Specific signature module -->
- <parameter name="class"
- value="eu.stork.peps.auth.engine.core.impl.SignSW" />
- <!-- Settings specific module -->
- <parameter name="fileConfiguration" value="SignModule_Conf0.xml" />
- </configuration>
- </instance>
+ <!-- Settings module signature -->
+ <configuration name="SignatureConf">
+ <!-- Specific signature module -->
+ <parameter name="class"
+ value="eu.stork.peps.auth.engine.core.impl.SignSW" />
+ <!-- Settings specific module -->
+ <parameter name="fileConfiguration" value="SignModule_Conf0.xml" />
+ <parameter name="softTrustStoreConfig" value="SignModule_Conf0.xml" />
+ </configuration>
+ </instance>
- <!-- ******************** CONF1 ******************** -->
- <!-- Configuration name -->
- <instance name="CONF1">
- <!-- Configurations parameters StorkSamlEngine -->
- <configuration name="SamlEngineConf">
- <parameter name="fileConfiguration" value="StorkSamlEngine_Conf1.xml" />
- </configuration>
+ <!-- ******************** CONF1 ******************** -->
+ <!-- Configuration name -->
+ <instance name="CONF1">
+ <!-- Configurations parameters StorkSamlEngine -->
+ <configuration name="SamlEngineConf">
+ <parameter name="fileConfiguration" value="StorkSamlEngine_Conf1.xml" />
+ </configuration>
- <!-- Settings module signature -->
- <configuration name="SignatureConf">
- <!-- Specific signature module -->
- <parameter name="class"
- value="eu.stork.peps.auth.engine.core.impl.SignSW" />
- <!-- Settings specific module -->
- <parameter name="fileConfiguration" value="SignModule_Conf1.xml" />
- </configuration>
- </instance>
+ <!-- Settings module signature -->
+ <configuration name="SignatureConf">
+ <!-- Specific signature module -->
+ <parameter name="class"
+ value="eu.stork.peps.auth.engine.core.impl.SignSW" />
+ <!-- Settings specific module -->
+ <parameter name="fileConfiguration" value="SignModule_Conf1.xml" />
+ </configuration>
+ </instance>
- <!-- ******************** CONF2 ******************** -->
+ <!-- ******************** CONF2 ******************** -->
- <instance name="CONF2">
- <configuration name="SamlEngineConf">
- <parameter name="fileConfiguration" value="StorkSamlEngine_Conf2.xml" />
- </configuration>
+ <instance name="CONF2">
+ <configuration name="SamlEngineConf">
+ <parameter name="fileConfiguration" value="StorkSamlEngine_Conf2.xml" />
+ </configuration>
- <configuration name="SignatureConf">
- <parameter name="class"
- value="eu.stork.peps.auth.engine.core.impl.SignSW" />
- <parameter name="fileConfiguration" value="SignModule_Conf2.xml" />
- </configuration>
- </instance>
+ <configuration name="SignatureConf">
+ <parameter name="class"
+ value="eu.stork.peps.auth.engine.core.impl.SignSW" />
+ <parameter name="fileConfiguration" value="SignModule_Conf2.xml" />
+ </configuration>
+ </instance>
- <!-- ******************** CONF3 ******************** -->
+ <!-- ******************** CONF3 ******************** -->
- <instance name="CONF3">
- <configuration name="SamlEngineConf">
- <parameter name="fileConfiguration" value="StorkSamlEngine_Conf3.xml" />
- </configuration>
+ <instance name="CONF3">
+ <configuration name="SamlEngineConf">
+ <parameter name="fileConfiguration" value="StorkSamlEngine_Conf3.xml" />
+ </configuration>
- <configuration name="SignatureConf">
- <parameter name="class"
- value="eu.stork.peps.auth.engine.core.impl.SignSW" />
- <parameter name="fileConfiguration" value="SignModule_Conf3.xml" />
- </configuration>
- </instance>
+ <configuration name="SignatureConf">
+ <parameter name="class"
+ value="eu.stork.peps.auth.engine.core.impl.SignSW" />
+ <parameter name="fileConfiguration" value="SignModule_Conf3.xml" />
+ </configuration>
+ </instance>
+
+ <!-- ******************** CONF4 ******************** -->
+ <instance name="CONF4">
+ <!-- Configurations parameters StorkSamlEngine -->
+ <configuration name="SamlEngineConf">
+ <parameter name="fileConfiguration" value="StorkSamlEngine_Conf0.xml" />
+ </configuration>
+
+ <!-- Settings module signature -->
+ <configuration name="SignatureConf">
+ <!-- Specific signature module -->
+ <parameter name="class" value="eu.stork.peps.auth.engine.core.impl.SignHW" />
+ <!-- Settings specific module -->
+ <parameter name="fileConfiguration" value="SignModule_P11.xml" />
+ <parameter name="softTrustStoreConfig" value="SignModule_Conf0.xml" />
+ </configuration>
+ </instance>
</instances> \ No newline at end of file
diff --git a/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf0.xml b/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf0.xml
index abb071044..295258bb2 100644
--- a/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf0.xml
+++ b/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf0.xml
@@ -1,17 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
-<!-- properties> <comment>SWModule sign with JKS.</comment> <entry key="keystorePath">C:\opt\keystores\keyStoreCountry0.jks</entry>
- <entry key="keyStorePassword">local-demo</entry> <entry key="keyPassword">local-demo</entry>
- <entry key="issuer">CN=saml-demo-cert,OU=STORK2,O=Advania,L=Reykjavik,ST=Reykjavik,C=IS</entry>
- <entry key="serialNumber">524D4C6C</entry> <entry key="keystoreType">JKS</entry>
- </properties -->
+<!-- properties>
+ <comment>SWModule sign with JKS.</comment>
+ <entry key="keystorePath">C:\opt\keystores\keyStoreCountry0.jks</entry>
+ <entry key="keyStorePassword">local-demo</entry>
+ <entry key="keyPassword">local-demo</entry>
+ <entry key="issuer">CN=saml-demo-cert,OU=STORK2,O=Advania,L=Reykjavik,ST=Reykjavik,C=IS</entry>
+ <entry key="serialNumber">524D4C6C</entry>
+ <entry key="keystoreType">JKS</entry>
+</properties-->
<properties>
- <comment>SWModule sign with JKS.</comment>
- <entry key="keystorePath">C:\opt\keystores\storkDemoKeysTest.jks</entry>
- <entry key="keyStorePassword">local-demo</entry>
- <entry key="keyPassword">local-demo</entry>
- <entry key="issuer">CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES</entry>
- <entry key="serialNumber">4BA89DB2</entry>
- <entry key="keystoreType">JKS</entry>
+ <comment>SWModule sign with JKS.</comment>
+ <entry key="keystorePath">C:\opt\keystores\storkDemoKeysTest.jks</entry>
+ <entry key="keyStorePassword">local-demo</entry>
+ <entry key="keyPassword">local-demo</entry>
+ <entry key="issuer">CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES</entry>
+ <entry key="serialNumber">4BA89DB2</entry>
+ <entry key="keystoreType">JKS</entry>
</properties> \ No newline at end of file
diff --git a/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf1.xml b/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf1.xml
index e556a7331..ffd41cb61 100644
--- a/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf1.xml
+++ b/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf1.xml
@@ -2,11 +2,11 @@
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
- <comment>SWModule sign with JKS.</comment>
- <entry key="keystorePath">C:\opt\keystores\storkDemoKeysTest.jks</entry>
- <entry key="keyStorePassword">local-demo</entry>
- <entry key="keyPassword">local-demo</entry>
- <entry key="issuer">CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES</entry>
- <entry key="serialNumber">4BA89DB2</entry>
- <entry key="keystoreType">JKS</entry>
+ <comment>SWModule sign with JKS.</comment>
+ <entry key="keystorePath">C:\opt\keystores\storkDemoKeysTest.jks</entry>
+ <entry key="keyStorePassword">local-demo</entry>
+ <entry key="keyPassword">local-demo</entry>
+ <entry key="issuer">CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES</entry>
+ <entry key="serialNumber">4BA89DB2</entry>
+ <entry key="keystoreType">JKS</entry>
</properties> \ No newline at end of file
diff --git a/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf2.xml b/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf2.xml
index 3da1e33df..21b73d49d 100644
--- a/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf2.xml
+++ b/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf2.xml
@@ -2,11 +2,11 @@
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
- <comment>SWModule sign with JKS.</comment>
- <entry key="keystorePath">C:\opt\keystores\keyStoreCountry2.jks</entry>
- <entry key="keyStorePassword">local-demo</entry>
- <entry key="keyPassword">local-demo</entry>
- <entry key="issuer">CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES</entry>
- <entry key="serialNumber">4BA89DB2</entry>
- <entry key="keystoreType">JKS</entry>
+ <comment>SWModule sign with JKS.</comment>
+ <entry key="keystorePath">C:\opt\keystores\keyStoreCountry2.jks</entry>
+ <entry key="keyStorePassword">local-demo</entry>
+ <entry key="keyPassword">local-demo</entry>
+ <entry key="issuer">CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES</entry>
+ <entry key="serialNumber">4BA89DB2</entry>
+ <entry key="keystoreType">JKS</entry>
</properties> \ No newline at end of file
diff --git a/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf3.xml b/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf3.xml
index 4c14a1711..f9ebc85cc 100644
--- a/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf3.xml
+++ b/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf3.xml
@@ -2,11 +2,11 @@
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
- <comment>SWModule sign with JKS.</comment>
- <entry key="keystorePath">C:\opt\keystores\keyStoreCountry3.jks</entry>
- <entry key="keyStorePassword">local-demo</entry>
- <entry key="keyPassword">local-demo</entry>
- <entry key="issuer">CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES</entry>
- <entry key="serialNumber">4BA89DB2</entry>
- <entry key="keystoreType">JKS</entry>
+ <comment>SWModule sign with JKS.</comment>
+ <entry key="keystorePath">C:\opt\keystores\keyStoreCountry3.jks</entry>
+ <entry key="keyStorePassword">local-demo</entry>
+ <entry key="keyPassword">local-demo</entry>
+ <entry key="issuer">CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES</entry>
+ <entry key="serialNumber">4BA89DB2</entry>
+ <entry key="keystoreType">JKS</entry>
</properties> \ No newline at end of file
diff --git a/id/server/stork2-saml-engine/src/test/resources/SignModule_P11.xml b/id/server/stork2-saml-engine/src/test/resources/SignModule_P11.xml
index c683d97c3..0e95da1f2 100644
--- a/id/server/stork2-saml-engine/src/test/resources/SignModule_P11.xml
+++ b/id/server/stork2-saml-engine/src/test/resources/SignModule_P11.xml
@@ -2,10 +2,11 @@
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
- <comment>HWModule sign with interface PKCS11.</comment>
- <entry key="configurationFile">p11Config.cfg</entry>
- <entry key="keyPassword">*******</entry>
- <entry key="issuer">CN=XXXXXXXXX</entry>
- <entry key="serialNumber">xxxxxxxxxxxxxx</entry>
- <entry key="keystoreType">PKCS11</entry>
+ <comment>HWModule sign with interface PKCS11.</comment>
+ <entry key="configurationFile">p11Conf.cfg</entry>
+ <entry key="keyPassword">12345</entry>
+ <entry key="issuer">CN=Test Certificate</entry>
+ <entry key="serialNumber">147d4b07db8</entry>
+ <entry key="keystoreType">PKCS11</entry>
+ <entry key="trustStoreConfig">SignModule_Conf0.xml</entry>
</properties> \ No newline at end of file