From b445b300db3a6895647f7f939f63e6b1f52ac0a3 Mon Sep 17 00:00:00 2001 From: Thomas Knall Date: Tue, 25 Nov 2014 12:03:02 +0100 Subject: Fix build. - Remove svn metadata. - Fix local repository (inappropriate xalan-bin-dist dependency file names and copy-past error in dependency pom). - Switch jdk 1.5/1.6 to 1.7. - Exclude non working tests. --- id/server/stork2-saml-engine/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'id/server/stork2-saml-engine') diff --git a/id/server/stork2-saml-engine/pom.xml b/id/server/stork2-saml-engine/pom.xml index 30f2bff7c..777c7393f 100644 --- a/id/server/stork2-saml-engine/pom.xml +++ b/id/server/stork2-saml-engine/pom.xml @@ -143,8 +143,8 @@ maven-compiler-plugin 2.3.2 - 1.6 - 1.6 + 1.7 + 1.7 -- cgit v1.2.3 From 0ed0a7702850b2001aaa8d5b194708a96e90dea3 Mon Sep 17 00:00:00 2001 From: Thomas Knall Date: Fri, 9 Jan 2015 11:25:10 +0100 Subject: Apply several fixes. - Disable erroneous IAIK PKI logger initialization (should be addressed by. - Remove redundant maven-dependency version declarations. - Fix maven/eclipse lifecyle warning problem. --- id/server/stork2-saml-engine/pom.xml | 1 - 1 file changed, 1 deletion(-) (limited to 'id/server/stork2-saml-engine') diff --git a/id/server/stork2-saml-engine/pom.xml b/id/server/stork2-saml-engine/pom.xml index 777c7393f..63a84998c 100644 --- a/id/server/stork2-saml-engine/pom.xml +++ b/id/server/stork2-saml-engine/pom.xml @@ -124,7 +124,6 @@ xerces xercesImpl - 2.11.0 test -- cgit v1.2.3 From 38ae8cb883ab73603f490d62b4cac38c51ac43e1 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 19 Jan 2015 12:10:48 +0100 Subject: update libraries -> joda-time 2.7 -> slf4j 2.7.10 -> struts2 2.3.20 -> commons-codec 1.10 -> hibernate 4.3.8.Final -> mySQL-connector 5.1.34 -> opensaml 2.6.4 -> xmltooling 2.6.4 --- id/server/stork2-saml-engine/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server/stork2-saml-engine') diff --git a/id/server/stork2-saml-engine/pom.xml b/id/server/stork2-saml-engine/pom.xml index 30f2bff7c..21449b522 100644 --- a/id/server/stork2-saml-engine/pom.xml +++ b/id/server/stork2-saml-engine/pom.xml @@ -124,7 +124,7 @@ xerces xercesImpl - 2.11.0 + test -- cgit v1.2.3 From bbd89ecac39989210f2572b41f5050cc2885be40 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 23 Jan 2015 13:07:47 +0100 Subject: update versions --- id/server/stork2-saml-engine/pom.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'id/server/stork2-saml-engine') diff --git a/id/server/stork2-saml-engine/pom.xml b/id/server/stork2-saml-engine/pom.xml index a13a036a0..f28f2c9a4 100644 --- a/id/server/stork2-saml-engine/pom.xml +++ b/id/server/stork2-saml-engine/pom.xml @@ -60,7 +60,6 @@ org.opensaml opensaml - ${opensaml.version} org.slf4j @@ -92,8 +91,7 @@ org.opensaml xmltooling - 1.4.3 - + org.slf4j -- cgit v1.2.3 From 7719fb25b825a084f16ba869a2ccbf7e84b85ac8 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 26 Feb 2015 10:18:09 +0100 Subject: update STORKSAMLEngine default configuration --- id/server/stork2-saml-engine/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'id/server/stork2-saml-engine') diff --git a/id/server/stork2-saml-engine/pom.xml b/id/server/stork2-saml-engine/pom.xml index 612e0746f..e5d3dc1f4 100644 --- a/id/server/stork2-saml-engine/pom.xml +++ b/id/server/stork2-saml-engine/pom.xml @@ -96,7 +96,7 @@ org.slf4j slf4j-api - 1.7.7 + 1.7.10 + SWModule sign with JKS. C:\opt\keystores\storkDemoKeysTest.jks diff --git a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf0.xml b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf0.xml index 8c3a94601..2b20da600 100644 --- a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf0.xml +++ b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf0.xml @@ -83,5 +83,5 @@ http://www.stork.gov.eu/1.0/mandateContent http://www.stork.gov.eu/1.0/docRequest - + \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestSdoc.xml b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestSdoc.xml index d64572829..7dffe0312 100644 --- a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestSdoc.xml +++ b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestSdoc.xml @@ -1,15 +1,68 @@ -http://S-PEPS.gov.xxX1nUVB6qXdoKbJzNekiSo9ExLdw=ExCPHHC/9OhdhOl1Ou+43Qw1nvskpbMYMu9vqa7m16doxM2PIUmK7LUw7hZiKtjIdBxuhpca3OrjO8O6MuTDN1FksWoj+7B1KTLFtmspucT5O7Cu2OqhK5WIVuCaLuA7CD0N2UfFouRwR5NlLHyzn9Trd7IM5OjA41dGb5jqYl7Ir+62+MgjhZRlLooDzb5fDAczbxv9LHGiKRBpgnk40w3gDAvoSPNdEuKhZi8LPQWWNBvVi3N5ZmJmAIacZWBqePywXTjygmChWAc8p7ptAX6tw0hpBxyxoW3aaZZzWQNcwobTRYbn89fcM11gqIz/YK7VXtiQ7WEQt1enQD/GAA==MIIDIjCCAgqgAwIBAgIES6idsjANBgkqhkiG9w0BAQUFADBTMQswCQYDVQQGEwJFUzEOMAwGA1UE -CAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExEzARBgNVBAMMCmxvY2Fs -LWRlbW8wHhcNMTMwODI4MTY0NzM1WhcNMTUwODI4MTY0NzM1WjBTMQswCQYDVQQGEwJFUzEOMAwG -A1UECAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExEzARBgNVBAMMCmxv -Y2FsLWRlbW8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx+7zEQUbt8Ot9dByR5TuY -NPmTwaKhECtnkxYAx9tl+Ga3kFiv+dOSeDoQOhxkICG1ZMaG0Gtk0EQWjscC1cLwDXpAOdhOm5xh -ndFHxa3V3Y3zomFZA7A3nwP8wt17wDrc1xi2Ye8VrwO7Vjb/F8Rgutlcrvq+LF4g9nQLoRiKUq8w -NFvDlvhBbLr8hMVBMY/jY7tSQ85qLqKUkWRcoDttJjgWZoO1vpBS4m+FywtYdOoHnN6fv4Dvf1r2 -rNLgebgBvSfwznxiulwW6FBLasYX0rYKP7RfwG8TJ+FumOgAjADj2LdwK25RZNg44XU2V1z1Fp37 -fNXhfo08LpdD1ueFAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBADMRGTWOmadZyCoJNluV+M7LopjC -9WpFUj76X0cAoNXmt12zYqYe8hjRmBr6l2V/FXT3/TyWET1nILG46zwwAxslw3b2LvkhU+9QcuB8 -yC8TCJJ0kgsTZ/EUZPSbwUG7Nn2jkMiyjlyKcjSCQOzEKQyR1xYwyZG40+BPeGbYjmRgm6kcmCxY -USWoPwNyfke9gNT80f0pUj7wJ9YwWbTIz1rhf/h7rxoMYypXo+JXwaXW/Ra8v1uDcwfKpE5ZgwAU -nubLXF4A+H7/N7ZvB5XDwJ4W+99nuPsKfwacD8m1sflTXcEPzzhOq6iQ9anJT94/pMctnp827zXA -y66jvDrin5I=3ISfalsefalsefalseIS/IS/fbea6e68-0393-401b-b616-f767fff9418c \ No newline at end of file + + + http://S-PEPS.gov.xx + + + + + + + + + + + + + X1nUVB6qXdoKbJzNekiSo9ExLdw= + + + ExCPHHC/9OhdhOl1Ou+43Qw1nvskpbMYMu9vqa7m16doxM2PIUmK7LUw7hZiKtjIdBxuhpca3OrjO8O6MuTDN1FksWoj+7B1KTLFtmspucT5O7Cu2OqhK5WIVuCaLuA7CD0N2UfFouRwR5NlLHyzn9Trd7IM5OjA41dGb5jqYl7Ir+62+MgjhZRlLooDzb5fDAczbxv9LHGiKRBpgnk40w3gDAvoSPNdEuKhZi8LPQWWNBvVi3N5ZmJmAIacZWBqePywXTjygmChWAc8p7ptAX6tw0hpBxyxoW3aaZZzWQNcwobTRYbn89fcM11gqIz/YK7VXtiQ7WEQt1enQD/GAA== + + + MIIDIjCCAgqgAwIBAgIES6idsjANBgkqhkiG9w0BAQUFADBTMQswCQYDVQQGEwJFUzEOMAwGA1UE + CAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExEzARBgNVBAMMCmxvY2Fs + LWRlbW8wHhcNMTMwODI4MTY0NzM1WhcNMTUwODI4MTY0NzM1WjBTMQswCQYDVQQGEwJFUzEOMAwG + A1UECAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExEzARBgNVBAMMCmxv + Y2FsLWRlbW8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx+7zEQUbt8Ot9dByR5TuY + NPmTwaKhECtnkxYAx9tl+Ga3kFiv+dOSeDoQOhxkICG1ZMaG0Gtk0EQWjscC1cLwDXpAOdhOm5xh + ndFHxa3V3Y3zomFZA7A3nwP8wt17wDrc1xi2Ye8VrwO7Vjb/F8Rgutlcrvq+LF4g9nQLoRiKUq8w + NFvDlvhBbLr8hMVBMY/jY7tSQ85qLqKUkWRcoDttJjgWZoO1vpBS4m+FywtYdOoHnN6fv4Dvf1r2 + rNLgebgBvSfwznxiulwW6FBLasYX0rYKP7RfwG8TJ+FumOgAjADj2LdwK25RZNg44XU2V1z1Fp37 + fNXhfo08LpdD1ueFAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBADMRGTWOmadZyCoJNluV+M7LopjC + 9WpFUj76X0cAoNXmt12zYqYe8hjRmBr6l2V/FXT3/TyWET1nILG46zwwAxslw3b2LvkhU+9QcuB8 + yC8TCJJ0kgsTZ/EUZPSbwUG7Nn2jkMiyjlyKcjSCQOzEKQyR1xYwyZG40+BPeGbYjmRgm6kcmCxY + USWoPwNyfke9gNT80f0pUj7wJ9YwWbTIz1rhf/h7rxoMYypXo+JXwaXW/Ra8v1uDcwfKpE5ZgwAU + nubLXF4A+H7/N7ZvB5XDwJ4W+99nuPsKfwacD8m1sflTXcEPzzhOq6iQ9anJT94/pMctnp827zXA + y66jvDrin5I= + + + + + 3 + IS + false + false + false + + + IS/IS/fbea6e68-0393-401b-b616-f767fff9418c + + + + + + + \ No newline at end of file -- cgit v1.2.3 From 496ba9bb6e150ad67c5c628c1c97f30d6da81dfb Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Mon, 10 Aug 2015 16:35:14 +0200 Subject: approved changes --- .../java/eu/stork/peps/auth/engine/SAMLEngine.java | 9 +- .../eu/stork/peps/auth/engine/STORKSAMLEngine.java | 99 +++++++++------- .../stork/peps/auth/engine/X509PrincipalUtil.java | 2 +- .../eu/stork/peps/auth/engine/core/SAMLCore.java | 3 + .../stork/peps/auth/engine/core/STORKSAMLCore.java | 26 ++++- .../core/impl/AuthenticationAttributesImpl.java | 5 - .../engine/core/impl/CitizenCountryCodeImpl.java | 5 - .../engine/core/impl/EIDCrossBorderShareImpl.java | 7 +- .../engine/core/impl/EIDCrossSectorShareImpl.java | 7 +- .../auth/engine/core/impl/QAAAttributeImpl.java | 5 - .../engine/core/impl/RequestedAttributeImpl.java | 5 - .../auth/engine/core/impl/SPApplicationImpl.java | 5 - .../peps/auth/engine/core/impl/SPCountryImpl.java | 5 - .../stork/peps/auth/engine/core/impl/SPIDImpl.java | 5 - .../auth/engine/core/impl/SPInformationImpl.java | 5 - .../auth/engine/core/impl/SPInstitutionImpl.java | 5 - .../stork/peps/auth/engine/core/impl/SignHW.java | 78 +++++-------- .../stork/peps/auth/engine/core/impl/SignP12.java | 45 ++++---- .../stork/peps/auth/engine/core/impl/SignSW.java | 96 ++++++++-------- .../impl/VIDPAuthenticationAttributesImpl.java | 6 - .../validator/QAAAttributeSchemaValidator.java | 8 +- .../peps/configuration/ConfigurationCreator.java | 18 +-- .../test/simple/StorkAttrQueryRequestTest.java | 12 ++ .../peps/test/simple/StorkAuthRequestTest.java | 12 +- .../src/test/resources/SamlEngine.xml | 124 ++++++++++++--------- .../src/test/resources/SignModule_Conf0.xml | 28 +++-- .../src/test/resources/SignModule_Conf1.xml | 14 +-- .../src/test/resources/SignModule_Conf2.xml | 14 +-- .../src/test/resources/SignModule_Conf3.xml | 14 +-- .../src/test/resources/SignModule_P11.xml | 13 ++- 30 files changed, 348 insertions(+), 332 deletions(-) (limited to 'id/server/stork2-saml-engine') diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/SAMLEngine.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/SAMLEngine.java index f4d084a79..1dcaf4c95 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/SAMLEngine.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/SAMLEngine.java @@ -97,7 +97,14 @@ public class SAMLEngine { /** The Constant SAML_ENGINE_FILE_CONF. */ private static final String SAML_ENGINE_FILE_CONF = "fileConfiguration"; - /** The codification of characters. */ + /** + * Additional trust store for HW signing + */ + private static final String HW_TRUST_STORE_CONF = "softTrustStoreConfig"; + + /** + * The codification of characters. + */ private static final String CHARACTER_ENCODING = "UTF-8"; /** The SAML core. */ diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/STORKSAMLEngine.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/STORKSAMLEngine.java index 6a7e1f7c0..7bf5d5ca8 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/STORKSAMLEngine.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/STORKSAMLEngine.java @@ -202,8 +202,7 @@ public final class STORKSAMLEngine extends SAMLEngine { try { engine = new STORKSAMLEngine(nameInstance.trim()); } catch (Exception e) { - LOG.error("Error getting instance: " + nameInstance); - e.printStackTrace(); + LOG.error("Error get instance: " + nameInstance); } return engine; } @@ -389,15 +388,9 @@ public final class STORKSAMLEngine extends SAMLEngine { final Subject subject = SAMLEngineUtils.generateSubject(); - // Mandatory STORK verified - // String format = NameID.UNSPECIFIED - // specification: 'SAML:2.0' exist - // opensaml: "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified" - // opensaml "urn:oasis:names:tc:SAML:2.0:nameid-format:unspecified" - final String format = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"; + final String format = super.getSamlCoreProperties().getFormat(); final String nameQualifier = ""; - LOG.debug("Generate NameID"); final NameID nameId = SAMLEngineUtils.generateNameID(super.getSamlCoreProperties().getResponder(), format, nameQualifier); nameId.setValue(format); @@ -1102,7 +1095,6 @@ public final class STORKSAMLEngine extends SAMLEngine { // Validate Parameters mandatories validateParamAttrQueryReq(request); - // final AttributeQuery attrQueryRequestAux = SAMLEngineUtils final CustomAttributeQuery attrQueryRequestAux = SAMLEngineUtils.generateSAMLAttrQueryRequest(SAMLEngineUtils.generateNCName(), SAMLVersion.VERSION_20, SAMLEngineUtils.getCurrentTime()); // Set name spaces. @@ -1930,6 +1922,8 @@ public final class STORKSAMLEngine extends SAMLEngine { citizenCountryCode = (CitizenCountryCode) SAMLEngineUtils.createSamlObject(CitizenCountryCode.DEF_ELEMENT_NAME); citizenCountryCode.setCitizenCountryCode(request.getCitizenCountryCode().toUpperCase()); + + extensions.getUnknownXMLObjects().add(citizenCountryCode); } SPID spid = null; @@ -1938,6 +1932,8 @@ public final class STORKSAMLEngine extends SAMLEngine { spid = (SPID) SAMLEngineUtils.createSamlObject(SPID.DEF_ELEMENT_NAME); spid.setSPID(request.getSPID().toUpperCase()); + + extensions.getUnknownXMLObjects().add(spid); } return extensions; @@ -2493,11 +2489,6 @@ public final class STORKSAMLEngine extends SAMLEngine { throw new STORKSAMLEngineException("StorkSamlEngine: Assertion Consumer Service URL it's mandatory."); } - // Destination of the request - not mandatory - /* - * if (StringUtils.isBlank(request.getDestination())) { throw new STORKSAMLEngineException( "StorkSamlEngine: Destination is mandatory."); } - */ - // SP country is empty if (StringUtils.isBlank(request.getSpCountry())) { throw new STORKSAMLEngineException("StorkSamlEngine: SP country is mandatory."); @@ -2525,12 +2516,7 @@ public final class STORKSAMLEngine extends SAMLEngine { */ private void validateParamLogoutReq(final STORKLogoutRequest request) throws STORKSAMLEngineException { LOG.info("Validate parameters from logout request."); - // URL to which AP Response must be sent. - /* - * if (StringUtils.isBlank(request.get())) { throw new STORKSAMLEngineException( "StorkSamlEngine: Assertion Consumer Service URL it's mandatory."); } - */ - // Destination of the request if (StringUtils.isBlank(request.getDestination())) { throw new STORKSAMLEngineException("StorkSamlEngine: Destination is mandatory."); @@ -2591,9 +2577,9 @@ public final class STORKSAMLEngine extends SAMLEngine { throw new STORKSAMLEngineException("Issuer must be not empty or null."); } - if (responseAuthReq.getPersonalAttributeList() == null || responseAuthReq.getPersonalAttributeList().isEmpty()) { - LOG.error("PersonalAttributeList is null or empty."); - throw new STORKSAMLEngineException("PersonalAttributeList is null or empty."); + if (responseAuthReq.getPersonalAttributeList() == null) { + LOG.error("PersonalAttributeList is null."); + throw new STORKSAMLEngineException("PersonalAttributeList is null."); } if (StringUtils.isBlank(request.getAssertionConsumerServiceURL())) { @@ -2627,10 +2613,6 @@ public final class STORKSAMLEngine extends SAMLEngine { throw new STORKSAMLEngineException("PersonalAttributeList is null or empty."); } - /* - * if (StringUtils.isBlank(request.getAssertionConsumerServiceURL())) { throw new STORKSAMLEngineException( "assertionConsumerServiceURL is null or empty."); } - */ - if (StringUtils.isBlank(request.getSamlId())) { throw new STORKSAMLEngineException("request ID is null or empty."); } @@ -2840,7 +2822,6 @@ public final class STORKSAMLEngine extends SAMLEngine { attrRequest.setDestination(samlRequest.getDestination()); attrRequest.setAssertionConsumerServiceURL(samlRequest.getAssertionConsumerServiceURL()); - /* authnRequest.setProviderName(samlRequest.getProviderName()); */ attrRequest.setIssuer(samlRequest.getIssuer().getValue()); // Delete unknown elements from requested ones @@ -2881,13 +2862,15 @@ public final class STORKSAMLEngine extends SAMLEngine { final LogoutRequest samlRequest = (LogoutRequest) validateStorkSaml(tokenSaml); - LOG.debug("Validate Extensions."); - final Validator validatorExt = new ExtensionsSchemaValidator(); - try { - validatorExt.validate(samlRequest.getExtensions()); - } catch (ValidationException e) { - LOG.error("ValidationException: validate Extensions.", e); - throw new STORKSAMLEngineException(e); + if (samlRequest.getExtensions() != null) { + LOG.debug("Validate Extensions."); + final Validator validatorExt = new ExtensionsSchemaValidator(); + try { + validatorExt.validate(samlRequest.getExtensions()); + } catch (ValidationException e) { + LOG.error("ValidationException: validate Extensions.", e); + throw new STORKSAMLEngineException(e); + } } LOG.debug("Generate STORKLogoutRequest."); @@ -2908,6 +2891,43 @@ public final class STORKSAMLEngine extends SAMLEngine { } + /** + * Validate stork logout response. + * + * @param tokenSaml + * The SAML token + * + * @return the STORK logout response + * + * @throws STORKSAMLEngineException + * the STORKSAML engine exception + */ + public STORKLogoutResponse validateSTORKLogoutResponse(final byte[] tokenSaml) throws STORKSAMLEngineException { + + LOG.info("validate STORK Logout Response"); + + final LogoutResponse samlRes = (LogoutResponse) validateStorkSaml(tokenSaml); + + LOG.debug("Generate STORKLogoutResponse."); + final STORKLogoutResponse logoutRes = new STORKLogoutResponse(); + + try { + logoutRes.setTokenSaml(super.signAndMarshall(samlRes)); + } catch (SAMLEngineException e) { + LOG.error("Sign and Marshall.", e); + throw new STORKSAMLEngineException(e); + } + + logoutRes.setAlias(this.getAlias(samlRes.getSignature().getKeyInfo(), super.getSigner().getTrustStore())); + logoutRes.setSamlId(samlRes.getID()); + logoutRes.setDestination(samlRes.getDestination()); + logoutRes.setIssuer(samlRes.getIssuer().getValue()); + logoutRes.setStatusCode(samlRes.getStatus().getStatusCode().getValue().toString()); + logoutRes.setStatusMessage(samlRes.getStatus().getStatusMessage().getMessage().toString()); + logoutRes.setInResponseTo(samlRes.getInResponseTo()); + return logoutRes; + } + /** * Validate stork authentication response. * @@ -3060,16 +3080,15 @@ public final class STORKSAMLEngine extends SAMLEngine { authnResponse.setAssertions(samlResponse.getAssertions()); if (samlResponse.getAssertions().size() > 1) { PersonalAttributeList total = new PersonalAttributeList(); - List attrList = new ArrayList(); + List attrList = new ArrayList(); for (int i = 0; i < samlResponse.getAssertions().size(); i++) { Assertion tempAssertion = (Assertion) samlResponse.getAssertions().get(i); IPersonalAttributeList temp = generatePersonalAttributeList(tempAssertion); if (temp != null) { attrList.add(temp); - for (PersonalAttribute attribute : temp) { - PersonalAttribute attr = (PersonalAttribute) attribute.clone(); - attr.setName(attr.getName() + tempAssertion.getID()); - total.add(attr); + for (PersonalAttribute attribute : (IPersonalAttributeList) temp.clone()) { + attribute.setName(attribute.getName() + tempAssertion.getID()); + total.add(attribute); } } } diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/X509PrincipalUtil.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/X509PrincipalUtil.java index 175084048..73d7e4f62 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/X509PrincipalUtil.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/X509PrincipalUtil.java @@ -25,7 +25,7 @@ public final class X509PrincipalUtil { * @param principal2 * @return true if arguments are not null and equals */ - public static boolean equals(X509Principal principal1, X509Principal principal2) { + public static boolean X509equals(X509Principal principal1, X509Principal principal2) { boolean continueProcess = true; if (principal1 == null || principal2 == null) { return false; diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SAMLCore.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SAMLCore.java index 922e7e61e..16b9afd18 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SAMLCore.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SAMLCore.java @@ -55,6 +55,9 @@ public enum SAMLCore { /** The RESPONDE r_ tag. */ RESPONDER_TAG("responder"), + + /** The format r_tag. */ + FORMAT_TAG("format"), /** The STOR k10_ ns. */ STORK10_NS("urn:eu:stork:names:tc:STORK:1.0:assertion"), diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/STORKSAMLCore.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/STORKSAMLCore.java index 13d2f0af4..2a548ca6f 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/STORKSAMLCore.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/STORKSAMLCore.java @@ -73,7 +73,11 @@ public final class STORKSAMLCore { /** The responder. */ private String responder = null; - /** The SAML core properties. */ + private String format = null; + + /** + * The SAML core properties. + */ private Properties samlCoreProp = null; /** The time not on or after. */ @@ -188,6 +192,15 @@ public final class STORKSAMLCore { return responder; } + /** + * return the format string. + * + * @return + */ + public String getFormat() { + return this.format; + } + /** * Gets the time not on or after. * @@ -330,6 +343,8 @@ public final class STORKSAMLCore { requester = samlCoreProp.getProperty(SAMLCore.REQUESTER_TAG.getValue()); responder = samlCoreProp.getProperty(SAMLCore.RESPONDER_TAG.getValue()); + format = samlCoreProp.getProperty(SAMLCore.FORMAT_TAG.getValue(), "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"); + } catch (SAMLEngineException e) { LOGGER.error("SAMLCore: error loadConfiguration. ", e); throw new STORKSAMLEngineRuntimeException(e); @@ -491,6 +506,15 @@ public final class STORKSAMLCore { this.responder = newResponder; } + /** + * Sets the format string + * + * @param newFormat + */ + public void setFormat(final String newFormat) { + this.format = newFormat; + } + /** * Sets the time not on or after. * diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesImpl.java index 907b9bf68..9f602aba1 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesImpl.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesImpl.java @@ -102,9 +102,4 @@ public final class AuthenticationAttributesImpl extends AbstractSignableSAMLObje vIDPAuthenAttr = prepareForAssignment(this.vIDPAuthenAttr, newVIDPAuthenAttr); } - @Override - public int hashCode() { - LOGGER.warn("Hashcode has been called, passed to super. Nothing foreseen here"); - return super.hashCode(); - } } diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeImpl.java index 003d56b46..aa4c725f1 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeImpl.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeImpl.java @@ -77,9 +77,4 @@ public class CitizenCountryCodeImpl extends AbstractSAMLObject implements Citize return null; } - @Override - public int hashCode() { - LOGGER.warn("Hashcode has been called, passed to super. Nothing foreseen here"); - return super.hashCode(); - } } diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareImpl.java index b5d194c7f..13cc3d287 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareImpl.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareImpl.java @@ -77,9 +77,4 @@ public class EIDCrossBorderShareImpl extends AbstractSAMLObject implements EIDCr return null; } - @Override - public int hashCode() { - LOGGER.warn("Hashcode has been called, passed to super. Nothing foreseen here"); - return super.hashCode(); - } -} \ No newline at end of file +} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareImpl.java index f2762e327..2e3f6ab7e 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareImpl.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareImpl.java @@ -78,9 +78,4 @@ public class EIDCrossSectorShareImpl extends AbstractSAMLObject implements EIDCr return null; } - @Override - public int hashCode() { - LOGGER.warn("Hashcode has been called, passed to super. Nothing foreseen here"); - return super.hashCode(); - } -} \ No newline at end of file +} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeImpl.java index 423cf8b25..e74ce1fec 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeImpl.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeImpl.java @@ -77,9 +77,4 @@ public class QAAAttributeImpl extends AbstractSAMLObject implements QAAAttribute return null; } - @Override - public int hashCode() { - LOGGER.warn("Hashcode has been called, passed to super. Nothing foreseen here"); - return super.hashCode(); - } } diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeImpl.java index e7ac7213b..2537d3794 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeImpl.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeImpl.java @@ -213,9 +213,4 @@ public class RequestedAttributeImpl extends AbstractSAMLObject implements Reques this.unknownAttributes = newUnknownAttr; } - @Override - public int hashCode() { - LOGGER.warn("Hashcode has been called, passed to super. Nothing foreseen here"); - return super.hashCode(); - } } diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationImpl.java index 276697d6a..7f09d611f 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationImpl.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationImpl.java @@ -77,9 +77,4 @@ public class SPApplicationImpl extends AbstractSAMLObject implements SPApplicati return null; } - @Override - public int hashCode() { - LOGGER.warn("Hashcode has been called, passed to super. Nothing foreseen here"); - return super.hashCode(); - } } diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryImpl.java index 404a90079..ea9085867 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryImpl.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryImpl.java @@ -77,9 +77,4 @@ public class SPCountryImpl extends AbstractSAMLObject implements SPCountry { return null; } - @Override - public int hashCode() { - LOGGER.warn("Hashcode has been called, passed to super. Nothing foreseen here"); - return super.hashCode(); - } } diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDImpl.java index cea51a5a8..03dea20ed 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDImpl.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDImpl.java @@ -77,9 +77,4 @@ public class SPIDImpl extends AbstractSAMLObject implements SPID { return null; } - @Override - public int hashCode() { - LOGGER.warn("Hashcode has been called, passed to super. Nothing foreseen here"); - return super.hashCode(); - } } diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationImpl.java index 4089f0862..41b3d8998 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationImpl.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationImpl.java @@ -101,9 +101,4 @@ public final class SPInformationImpl extends AbstractSignableSAMLObject implemen this.spId = prepareForAssignment(this.spId, newSPId); } - @Override - public int hashCode() { - LOGGER.warn("Hashcode has been called, passed to super. Nothing foreseen here"); - return super.hashCode(); - } } diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionImpl.java index 054481744..ed0a75f35 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionImpl.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionImpl.java @@ -77,9 +77,4 @@ public class SPInstitutionImpl extends AbstractSAMLObject implements SPInstituti return null; } - @Override - public int hashCode() { - LOGGER.warn("Hashcode has been called, passed to super. Nothing foreseen here"); - return super.hashCode(); - } } diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignHW.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignHW.java index 6e23d7f24..1cd5fb761 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignHW.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignHW.java @@ -72,6 +72,7 @@ import eu.stork.peps.exceptions.SAMLEngineException; * The Class HWSign. Module of sign. * * @author fjquevedo + * @author advania */ public final class SignHW implements SAMLEngineSignI { @@ -79,14 +80,19 @@ public final class SignHW implements SAMLEngineSignI { private static final String CONF_FILE = "configurationFile"; /** - * The Constant KEYSTORE_TYPE. private static final String KEYSTORE_TYPE = "keystoreType" + * The Constant KEYSTORE_TYPE. */ + private static final String KEYSTORE_TYPE = "keystoreType"; /** The logger. */ private static final Logger LOG = LoggerFactory.getLogger(SignHW.class.getName()); /** The stork own key store. */ private KeyStore storkOwnKeyStore = null; + /** + * The soft trust key store. + */ + private SignSW swTrustStore = null; /** * Gets the stork own key store. @@ -160,6 +166,12 @@ public final class SignHW implements SAMLEngineSignI { throw new SAMLEngineException(e); } finally { IOUtils.closeQuietly(inputStr); + /** + * Init the soft keystore to validate with. trustStoreConfig is read from the SignModule config file and should refer to the keystore containing trusted certificates. + */ + swTrustStore = new SignSW(); + swTrustStore.init(properties.getProperty("trustStoreConfig")); + swTrustStore.loadCryptServiceProvider(); } } @@ -204,7 +216,7 @@ public final class SignHW implements SAMLEngineSignI { X509Principal issuerDN = new X509Principal(certificate.getIssuerDN().getName()); X509Principal issuerDNConf = new X509Principal(issuer); - if (serialNum.equalsIgnoreCase(serialNumber) && X509PrincipalUtil.equals(issuerDN, issuerDNConf)) { + if (serialNum.equalsIgnoreCase(serialNumber) && X509PrincipalUtil.X509equals(issuerDN, issuerDNConf)) { alias = aliasCert; find = true; } @@ -339,56 +351,14 @@ public final class SignHW implements SAMLEngineSignI { * exception in validate signature */ public SAMLObject validateSignature(final SignableSAMLObject tokenSaml) throws SAMLEngineException { - LOG.info("Start signature validation."); + LOG.info("Start signature validation HW."); + /* + * we are using the soft signature class to validate the signatures. This way we use the same key store code and validation that is used there. + */ try { - - // Validate structure signature - final SAMLSignatureProfileValidator signProfValidator = new SAMLSignatureProfileValidator(); - - // Indicates signature id conform to SAML Signature profile - signProfValidator.validate(tokenSaml.getSignature()); - - String aliasCert; - X509Certificate certificate; - - final List trustedCred = new ArrayList(); - - for (final Enumeration e = storkOwnKeyStore.aliases(); e.hasMoreElements();) { - aliasCert = e.nextElement(); - final BasicX509Credential credential = new BasicX509Credential(); - certificate = (X509Certificate) storkOwnKeyStore.getCertificate(aliasCert); - credential.setEntityCertificate(certificate); - trustedCred.add(credential); - } - - final KeyInfo keyInfo = tokenSaml.getSignature().getKeyInfo(); - final List listCertificates = KeyInfoHelper.getCertificates(keyInfo); - - if (listCertificates.size() != 1) { - throw new SAMLEngineException("Only must be one certificate"); - } - - // Exist only one certificate - final BasicX509Credential entityX509Cred = new BasicX509Credential(); - entityX509Cred.setEntityCertificate(listCertificates.get(0)); - - final ExplicitKeyTrustEvaluator keyTrustEvaluator = new ExplicitKeyTrustEvaluator(); - if (!keyTrustEvaluator.validate(entityX509Cred, trustedCred)) { - throw new SAMLEngineException("Certificate it is not trusted."); - } - - final SignatureValidator sigValidator = new SignatureValidator(entityX509Cred); - - sigValidator.validate(tokenSaml.getSignature()); - - } catch (final ValidationException e) { - LOG.error("ValidationException.", e); - throw new SAMLEngineException(e); - } catch (final KeyStoreException e) { - LOG.error("ValidationException.", e); - throw new SAMLEngineException(e); - } catch (final CertificateException e) { - LOG.error("CertificateException.", e); + swTrustStore.validateSignature(tokenSaml); + } catch (Exception e) { + LOG.error("SW ValidationException.", e); throw new SAMLEngineException(e); } return tokenSaml; @@ -408,6 +378,12 @@ public final class SignHW implements SAMLEngineSignI { try { inputStream = SignHW.class.getResourceAsStream("/" + properties.getProperty(CONF_FILE)); + final Provider pkcs11Provider = new sun.security.pkcs11.SunPKCS11(inputStream); + if (Security.getProperty(pkcs11Provider.getName()) == null) { + Security.insertProviderAt(pkcs11Provider, Security.getProviders().length); + } + + storkOwnKeyStore = KeyStore.getInstance(properties.getProperty(KEYSTORE_TYPE), pkcs11Provider); } catch (final Exception e) { throw new SAMLEngineException("Error loading CryptographicServiceProvider", e); diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignP12.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignP12.java index c91f11444..d5f01a4cc 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignP12.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignP12.java @@ -41,6 +41,7 @@ import eu.stork.peps.auth.engine.X509PrincipalUtil; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.NotImplementedException; import org.bouncycastle.jce.X509Principal; +import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.opensaml.Configuration; import org.opensaml.common.SAMLObject; import org.opensaml.common.SignableSAMLObject; @@ -166,25 +167,25 @@ public final class SignP12 implements SAMLEngineSignI { properties = new Properties(); try { try { - LOG.debug("Fichero a cargar " + fileConf); + LOG.debug("Loading " + fileConf); fileProperties = new FileInputStream(fileConf); properties.loadFromXML(fileProperties); } catch (Exception e) { - LOG.error("Fallo al cargar el recurso externo. Se reintenta como fichero interno."); + LOG.error("Failed to load external resource. Retrieving internal file."); fileProperties = SignP12.class.getResourceAsStream("/" + fileConf); if (fileProperties == null) { fileProperties = Thread.currentThread().getContextClassLoader().getResourceAsStream(fileConf); if (fileProperties == null) { Enumeration files = ClassLoader.getSystemClassLoader().getResources(fileConf); if (files != null && files.hasMoreElements()) { - LOG.info("Se han encontrado recurso/s. Se toma el primero."); + LOG.info("Found /s."); fileProperties = ClassLoader.getSystemClassLoader().getResourceAsStream(files.nextElement().getFile()); } else { - throw new IOException("No se pudo recuperar el fichero: " + fileConf, e); + throw new IOException("Could not load file: " + fileConf, e); } } } - LOG.debug("Recuperados " + fileProperties.available() + " bytes"); + LOG.debug("Recovered " + fileProperties.available() + " bytes"); properties.loadFromXML(fileProperties); } } catch (InvalidPropertiesFormatException e) { @@ -243,7 +244,7 @@ public final class SignP12 implements SAMLEngineSignI { X509Principal issuerDN = new X509Principal(certificate.getIssuerDN().getName()); X509Principal issuerDNConf = new X509Principal(issuer); - if (serialNum.equalsIgnoreCase(serialNumber) && X509PrincipalUtil.equals(issuerDN, issuerDNConf)) { + if (serialNum.equalsIgnoreCase(serialNumber) && X509PrincipalUtil.X509equals(issuerDN, issuerDNConf)) { alias = aliasCert; find = true; } @@ -455,23 +456,21 @@ public final class SignP12 implements SAMLEngineSignI { FileInputStream fisTrustStore = null; try { - // // Dynamically register Bouncy Castle provider. - // boolean found = false; - // // Check if BouncyCastle is already registered as a provider - // final Provider[] providers = Security.getProviders(); - // for (int i = 0; i < providers.length; i++) { - // if (providers[i].getName().equals( - // BouncyCastleProvider.PROVIDER_NAME)) { - // found = true; - // } - // } - // - // // Register only if the provider has not been previously registered - // if (!found) { - // LOG.debug("SAMLCore: Register Bouncy Castle provider."); - // Security.insertProviderAt(new BouncyCastleProvider(), Security - // .getProviders().length); - // } + // Dynamically register Bouncy Castle provider. + boolean found = false; + // Check if BouncyCastle is already registered as a provider + final Provider[] providers = Security.getProviders(); + for (int i = 0; i < providers.length; i++) { + if (providers[i].getName().equals(BouncyCastleProvider.PROVIDER_NAME)) { + found = true; + } + } + + // Register only if the provider has not been previously registered + if (!found) { + LOG.debug("SAMLCore: Register Bouncy Castle provider."); + Security.insertProviderAt(new BouncyCastleProvider(), Security.getProviders().length); + } p12Store = KeyStore.getInstance(properties.getProperty("keystoreType")); diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java index e1ae2b8e2..1ca857e9e 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java @@ -12,17 +12,34 @@ * Licence for the specific language governing permissions and limitations under * the Licence. */ - package eu.stork.peps.auth.engine.core.impl; -import eu.stork.peps.auth.engine.X509PrincipalUtil; -import eu.stork.peps.auth.engine.core.CustomAttributeQuery; -import eu.stork.peps.auth.engine.core.SAMLEngineSignI; -import eu.stork.peps.exceptions.SAMLEngineException; +import java.io.ByteArrayInputStream; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.security.GeneralSecurityException; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.Security; +import java.security.UnrecoverableKeyException; +import java.security.cert.CertificateExpiredException; +import java.security.cert.CertificateFactory; +import java.security.cert.CertificateNotYetValidException; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.InvalidPropertiesFormatException; +import java.util.List; +import java.util.Properties; + import org.apache.commons.io.IOUtils; import org.apache.commons.lang.NotImplementedException; import org.bouncycastle.jce.X509Principal; -//import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.opensaml.Configuration; import org.opensaml.common.SAMLObject; import org.opensaml.common.SignableSAMLObject; @@ -41,25 +58,22 @@ import org.opensaml.xml.security.keyinfo.NamedKeyInfoGeneratorManager; import org.opensaml.xml.security.trust.ExplicitKeyTrustEvaluator; import org.opensaml.xml.security.trust.ExplicitX509CertificateTrustEvaluator; import org.opensaml.xml.security.x509.BasicX509Credential; -import org.opensaml.xml.signature.*; +import org.opensaml.xml.signature.KeyInfo; import org.opensaml.xml.signature.Signature; +import org.opensaml.xml.signature.SignatureConstants; import org.opensaml.xml.signature.SignatureException; +import org.opensaml.xml.signature.SignatureValidator; import org.opensaml.xml.signature.Signer; import org.opensaml.xml.util.Base64; import org.opensaml.xml.validation.ValidationException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.ByteArrayInputStream; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.security.*; -import java.security.cert.CertificateExpiredException; -import java.security.cert.CertificateFactory; -import java.security.cert.CertificateNotYetValidException; -import java.security.cert.X509Certificate; -import java.util.*; +import eu.stork.peps.auth.engine.X509PrincipalUtil; +import eu.stork.peps.auth.engine.core.CustomAttributeQuery; +import eu.stork.peps.auth.engine.core.SAMLEngineSignI; +import eu.stork.peps.exceptions.SAMLEngineException; + /** * The Class SWSign. Class responsible for signing and validating of messages SAML with a certificate store software. @@ -215,16 +229,12 @@ public class SignSW implements SAMLEngineSignI { final String serialNum = certificate.getSerialNumber().toString(16); - try { - X509Principal issuerDN = new X509Principal(certificate.getIssuerDN().getName()); - X509Principal issuerDNConf = new X509Principal(issuer); + X509Principal issuerDN = new X509Principal(certificate.getIssuerDN().getName()); + X509Principal issuerDNConf = new X509Principal(issuer); - if (serialNum.equalsIgnoreCase(serialNumber) && X509PrincipalUtil.equals(issuerDN, issuerDNConf)) { - alias = aliasCert; - find = true; - } - } catch (Exception ex) { - LOG.error("Exception during signing: " + ex.getMessage()); // Added as a workaround for Bouncycastle email error + if (serialNum.equalsIgnoreCase(serialNumber) && X509PrincipalUtil.X509equals(issuerDN, issuerDNConf)) { + alias = aliasCert; + find = true; } } if (!find) { @@ -344,7 +354,7 @@ public class SignSW implements SAMLEngineSignI { * @see eu.stork.peps.auth.engine.core.SAMLEngineSignI#validateSignature(org.opensaml.common.SignableSAMLObject) */ public final SAMLObject validateSignature(final SignableSAMLObject tokenSaml) throws SAMLEngineException { - LOG.info("Start signature validation."); + LOG.info("Start signature validation SW."); try { // Validate structure signature @@ -440,23 +450,21 @@ public class SignSW implements SAMLEngineSignI { LOG.info("Load Cryptographic Service Provider"); FileInputStream fis = null; try { - // // Dynamically register Bouncy Castle provider. - // boolean found = false; - // // Check if BouncyCastle is already registered as a provider - // final Provider[] providers = Security.getProviders(); - // for (int i = 0; i < providers.length; i++) { - // if (providers[i].getName().equals( - // BouncyCastleProvider.PROVIDER_NAME)) { - // found = true; - // } - // } - // - // // Register only if the provider has not been previously registered - // if (!found) { - // LOG.info("SAMLCore: Register Bouncy Castle provider."); - // Security.insertProviderAt(new BouncyCastleProvider(), Security - // .getProviders().length); - // } + // Dynamically register Bouncy Castle provider. + boolean found = false; + // Check if BouncyCastle is already registered as a provider + final Provider[] providers = Security.getProviders(); + for (int i = 0; i < providers.length; i++) { + if (providers[i].getName().equals(BouncyCastleProvider.PROVIDER_NAME)) { + found = true; + } + } + + // Register only if the provider has not been previously registered + if (!found) { + LOG.info("SAMLCore: Register Bouncy Castle provider."); + Security.insertProviderAt(new BouncyCastleProvider(), Security.getProviders().length); + } storkOwnKeyStore = KeyStore.getInstance(properties.getProperty(KEYSTORE_TYPE)); diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesImpl.java index d7d92ea74..bfb85e357 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesImpl.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesImpl.java @@ -125,10 +125,4 @@ public final class VIDPAuthenticationAttributesImpl extends AbstractSignableSAML public void setSPInformation(SPInformation newSPInformation) { this.spInformation = prepareForAssignment(this.spInformation, newSPInformation); } - - @Override - public int hashCode() { - LOGGER.warn("Hashcode has been called, passed to super. Nothing foreseen here"); - return super.hashCode(); - } } diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/QAAAttributeSchemaValidator.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/QAAAttributeSchemaValidator.java index bf7626dc5..04ff153d3 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/QAAAttributeSchemaValidator.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/QAAAttributeSchemaValidator.java @@ -54,8 +54,12 @@ public class QAAAttributeSchemaValidator implements Validator { if (DatatypeHelper.isEmpty(qaaAttribute.getQaaLevel())) { throw new ValidationException("QAALevel label must be specified."); } - - final int qaa = Integer.valueOf(qaaAttribute.getQaaLevel()); + int qaa = 0; + try { + qaa = Integer.valueOf(qaaAttribute.getQaaLevel()); + } catch (Exception e) { + throw new ValidationException("QAALevel is not a valid number!"); + } if (qaa < QAAAttribute.MIN_VALUE || qaa > QAAAttribute.MAX_VALUE) { throw new ValidationException("QAALevel label must be greater than 0."); diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java index 6e76c52a6..c0197b9db 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java @@ -12,15 +12,8 @@ * Licence for the specific language governing permissions and limitations under * the Licence. */ - package eu.stork.peps.configuration; -import eu.stork.peps.exceptions.STORKSAMLEngineException; -import org.apache.commons.io.IOUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.HashMap; @@ -28,6 +21,12 @@ import java.util.InvalidPropertiesFormatException; import java.util.Map; import java.util.Properties; +import org.apache.commons.io.IOUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import eu.stork.peps.exceptions.STORKSAMLEngineException; + /** * The Class InstanceCreator. * @@ -90,6 +89,7 @@ public final class ConfigurationCreator { * the STORKSAML engine runtime exception */ private static Properties getNewInstance(final String fileName) throws STORKSAMLEngineException { + LOGGER.info("Create file configuration properties to Stork Saml Engine: " + fileName); InputStream fileEngineProp = null; // fetch base from system properties, give a default if there is nothing configured @@ -115,10 +115,10 @@ public final class ConfigurationCreator { configuration.loadFromXML(fileEngineProp); return configuration; } catch (InvalidPropertiesFormatException e) { - LOGGER.error("Invalid properties format."); + LOGGER.error("Invalid properties format: " + fileName); throw new STORKSAMLEngineException(e); } catch (IOException e) { - LOGGER.error("Error read file: " + base + fileName); + LOGGER.error("Error read file: " + fileName); throw new STORKSAMLEngineException(e); } finally { IOUtils.closeQuietly(fileEngineProp); 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 @@ - - - - - - + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - + - - - - + + + + - - - - - + + + + + - + - - - - + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + \ 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 @@ - + - SWModule sign with JKS. - C:\opt\keystores\storkDemoKeysTest.jks - local-demo - local-demo - CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES - 4BA89DB2 - JKS + SWModule sign with JKS. + C:\opt\keystores\storkDemoKeysTest.jks + local-demo + local-demo + CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES + 4BA89DB2 + JKS \ 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 @@ - SWModule sign with JKS. - C:\opt\keystores\storkDemoKeysTest.jks - local-demo - local-demo - CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES - 4BA89DB2 - JKS + SWModule sign with JKS. + C:\opt\keystores\storkDemoKeysTest.jks + local-demo + local-demo + CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES + 4BA89DB2 + JKS \ 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 @@ - SWModule sign with JKS. - C:\opt\keystores\keyStoreCountry2.jks - local-demo - local-demo - CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES - 4BA89DB2 - JKS + SWModule sign with JKS. + C:\opt\keystores\keyStoreCountry2.jks + local-demo + local-demo + CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES + 4BA89DB2 + JKS \ 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 @@ - SWModule sign with JKS. - C:\opt\keystores\keyStoreCountry3.jks - local-demo - local-demo - CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES - 4BA89DB2 - JKS + SWModule sign with JKS. + C:\opt\keystores\keyStoreCountry3.jks + local-demo + local-demo + CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES + 4BA89DB2 + JKS \ 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 @@ - HWModule sign with interface PKCS11. - p11Config.cfg - ******* - CN=XXXXXXXXX - xxxxxxxxxxxxxx - PKCS11 + HWModule sign with interface PKCS11. + p11Conf.cfg + 12345 + CN=Test Certificate + 147d4b07db8 + PKCS11 + SignModule_Conf0.xml \ No newline at end of file -- cgit v1.2.3 From 2b8c631a8ef6d6970a482914e41c59f37e3a6d08 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Mon, 10 Aug 2015 16:52:00 +0200 Subject: approved tests --- .../src/test/resources/StorkSamlEngine_Conf0.xml | 189 +++++++++------- .../src/test/resources/StorkSamlEngine_Conf1.xml | 184 +++++++++------- .../src/test/resources/StorkSamlEngine_Conf2.xml | 151 ++++++++----- .../src/test/resources/StorkSamlEngine_Conf3.xml | 144 +++++++----- .../eu/stork/STORKSAMLEngine/AttrQueryRequest.xml | 148 ++++++------- .../stork/STORKSAMLEngine/AttrQueryRequestSdoc.xml | 120 +++++----- .../STORKSAMLEngine/AttrQueryRequestTagDelete.xml | 126 +++++------ .../eu/stork/STORKSAMLEngine/AttrQueryResponse.xml | 242 ++++++++++----------- .../data/eu/stork/STORKSAMLEngine/AuthnRequest.xml | 138 ++++++------ .../STORKSAMLEngine/AuthnRequestTagDelete.xml | 88 ++++---- .../AuthnRequestTagDeleteEncoded.xml | 88 ++++---- .../src/test/resources/logback-test.xml | 26 +-- .../src/test/resources/p11Conf.cfg | 30 +-- 13 files changed, 886 insertions(+), 788 deletions(-) (limited to 'id/server/stork2-saml-engine') diff --git a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf0.xml b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf0.xml index 2b20da600..2a266a975 100644 --- a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf0.xml +++ b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf0.xml @@ -2,86 +2,111 @@ - SAML constants for AuthnRequests and Responses. - - - unspecified - - - obtained - - - entity - - - - HTTP-POST - - - - - - - - - - false - - - true - - - http://S-PEPS.gov.xx - - - http://C-PEPS.gov.xx - - - 300 - - - false - - - - http://www.stork.gov.eu/1.0/eIdentifier - http://www.stork.gov.eu/1.0/givenName - http://www.stork.gov.eu/1.0/surname - http://www.stork.gov.eu/1.0/inheritedFamilyName - http://www.stork.gov.eu/1.0/adoptedFamilyName - http://www.stork.gov.eu/1.0/gender - http://www.stork.gov.eu/1.0/dateOfBirth - http://www.stork.gov.eu/1.0/countryCodeOfBirth - http://www.stork.gov.eu/1.0/nationalityCode - http://www.stork.gov.eu/1.0/maritalStatus - http://www.stork.gov.eu/1.0/residenceAddress - http://www.stork.gov.eu/1.0/eMail - http://www.stork.gov.eu/1.0/academicTitle - http://www.stork.gov.eu/1.0/pseudonym - http://www.stork.gov.eu/1.0/age - http://www.stork.gov.eu/1.0/isAgeOver - - http://www.stork.gov.eu/1.0/textResidenceAddress - http://www.stork.gov.eu/1.0/canonicalResidenceAddress - - http://www.stork.gov.eu/1.0/title - http://www.stork.gov.eu/1.0/residencePermit - - http://www.stork.gov.eu/1.0/signedDoc - http://www.stork.gov.eu/1.0/citizen509Certificate - - http://www.stork.gov.eu/1.0/newAttribute1 - http://www.stork.gov.eu/1.0/newAttribute2 - http://www.stork.gov.eu/1.0/hasDegree - http://www.stork.gov.eu/1.0/mandateContent - - http://www.stork.gov.eu/1.0/docRequest - + SAML constants for AuthnRequests and Responses. + + + unspecified + + + obtained + + + entity + + + + HTTP-POST + + + + + + + + + + false + + + true + + + http://S-PEPS.gov.xx + + + http://C-PEPS.gov.xx + + + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + + + 300 + + + false + + + + http://www.stork.gov.eu/1.0/eIdentifier + http://www.stork.gov.eu/1.0/givenName + http://www.stork.gov.eu/1.0/surname + http://www.stork.gov.eu/1.0/inheritedFamilyName + http://www.stork.gov.eu/1.0/adoptedFamilyName + http://www.stork.gov.eu/1.0/gender + http://www.stork.gov.eu/1.0/dateOfBirth + http://www.stork.gov.eu/1.0/countryCodeOfBirth + http://www.stork.gov.eu/1.0/placeOfBirth + http://www.stork.gov.eu/1.0/nationalityCode + http://www.stork.gov.eu/1.0/maritalStatus + http://www.stork.gov.eu/1.0/textResidenceAddress + http://www.stork.gov.eu/1.0/canonicalResidenceAddress + http://www.stork.gov.eu/1.0/eMail + http://www.stork.gov.eu/1.0/title + http://www.stork.gov.eu/1.0/residencePermit + http://www.stork.gov.eu/1.0/pseudonym + http://www.stork.gov.eu/1.0/age + http://www.stork.gov.eu/1.0/isAgeOver + http://www.stork.gov.eu/1.0/signedDoc + http://www.stork.gov.eu/1.0/citizenQAALevel + http://www.stork.gov.eu/1.0/fiscalNumber + http://www.stork.gov.eu/1.0/unknown + http://www.stork.gov.eu/1.0/newAttribute1 + http://www.stork.gov.eu/1.0/newAttribute2 + http://www.stork.gov.eu/1.0/hasDegree + + http://www.stork.gov.eu/1.0/diplomaSupplement + http://www.stork.gov.eu/1.0/currentStudiesSupplement + http://www.stork.gov.eu/1.0/isStudent + http://www.stork.gov.eu/1.0/isAcademicStaff + http://www.stork.gov.eu/1.0/isTeacherOf + http://www.stork.gov.eu/1.0/isCourseCoordinator + http://www.stork.gov.eu/1.0/isAdminStaff + http://www.stork.gov.eu/1.0/habilitation + http://www.stork.gov.eu/1.0/Title + http://www.stork.gov.eu/1.0/hasDegree + http://www.stork.gov.eu/1.0/hasAccountInBank + http://www.stork.gov.eu/1.0/isHealthCareProfessional + + http://www.stork.gov.eu/1.0/eLPIdentifier + http://www.stork.gov.eu/1.0/legalName + http://www.stork.gov.eu/1.0/alternativeName + http://www.stork.gov.eu/1.0/type + http://www.stork.gov.eu/1.0/translatableType + http://www.stork.gov.eu/1.0/status + http://www.stork.gov.eu/1.0/activity + http://www.stork.gov.eu/1.0/registeredAddress + http://www.stork.gov.eu/1.0/registeredCanonicalAddress + http://www.stork.gov.eu/1.0/contactInformation + http://www.stork.gov.eu/1.0/LPFiscalNumber + http://www.stork.gov.eu/1.0/mandate + http://www.stork.gov.eu/1.0/docRequest + + \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf1.xml b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf1.xml index ad04cc3df..a65717a05 100644 --- a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf1.xml +++ b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf1.xml @@ -2,84 +2,110 @@ - SAML constants for AuthnRequests and Responses. - - - unspecified - - - obtained - - - entity - - - - HTTP-POST - - - - - - - - - - false - - - true - - - http://S-PEPS.gov.xx - - - http://C-PEPS.gov.xx - - - 300 - - - false - - - - http://www.stork.gov.eu/1.0/eIdentifier - http://www.stork.gov.eu/1.0/givenName - http://www.stork.gov.eu/1.0/surname - http://www.stork.gov.eu/1.0/inheritedFamilyName - http://www.stork.gov.eu/1.0/adoptedFamilyName - http://www.stork.gov.eu/1.0/gender - http://www.stork.gov.eu/1.0/dateOfBirth - http://www.stork.gov.eu/1.0/countryCodeOfBirth - http://www.stork.gov.eu/1.0/nationalityCode - http://www.stork.gov.eu/1.0/maritalStatus - http://www.stork.gov.eu/1.0/residenceAddress - http://www.stork.gov.eu/1.0/eMail - http://www.stork.gov.eu/1.0/academicTitle - http://www.stork.gov.eu/1.0/pseudonym - http://www.stork.gov.eu/1.0/age - http://www.stork.gov.eu/1.0/isAgeOver - - http://www.stork.gov.eu/1.0/textResidenceAddress - http://www.stork.gov.eu/1.0/canonicalResidenceAddress - - http://www.stork.gov.eu/1.0/title - http://www.stork.gov.eu/1.0/residencePermit - - http://www.stork.gov.eu/1.0/signedDoc - http://www.stork.gov.eu/1.0/citizen509Certificate - - http://www.stork.gov.eu/1.0/newAttribute1 - http://www.stork.gov.eu/1.0/newAttribute2 - http://www.stork.gov.eu/1.0/hasDegree - http://www.stork.gov.eu/1.0/mandateContent + SAML constants for AuthnRequests and Responses. + + + unspecified + + + obtained + + + entity + + + + HTTP-POST + + + + + + + + + + false + + + true + + + http://S-PEPS.gov.xx + + + http://C-PEPS.gov.xx + + + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + + + 300 + + + false + + + + http://www.stork.gov.eu/1.0/eIdentifier + http://www.stork.gov.eu/1.0/givenName + http://www.stork.gov.eu/1.0/surname + http://www.stork.gov.eu/1.0/inheritedFamilyName + http://www.stork.gov.eu/1.0/adoptedFamilyName + http://www.stork.gov.eu/1.0/gender + http://www.stork.gov.eu/1.0/dateOfBirth + http://www.stork.gov.eu/1.0/countryCodeOfBirth + http://www.stork.gov.eu/1.0/placeOfBirth + http://www.stork.gov.eu/1.0/nationalityCode + http://www.stork.gov.eu/1.0/maritalStatus + http://www.stork.gov.eu/1.0/textResidenceAddress + http://www.stork.gov.eu/1.0/canonicalResidenceAddress + http://www.stork.gov.eu/1.0/eMail + http://www.stork.gov.eu/1.0/title + http://www.stork.gov.eu/1.0/residencePermit + http://www.stork.gov.eu/1.0/pseudonym + http://www.stork.gov.eu/1.0/age + http://www.stork.gov.eu/1.0/isAgeOver + http://www.stork.gov.eu/1.0/signedDoc + http://www.stork.gov.eu/1.0/citizenQAALevel + http://www.stork.gov.eu/1.0/fiscalNumber + http://www.stork.gov.eu/1.0/unknown + http://www.stork.gov.eu/1.0/newAttribute1 + http://www.stork.gov.eu/1.0/newAttribute2 + http://www.stork.gov.eu/1.0/hasDegree + + http://www.stork.gov.eu/1.0/diplomaSupplement + http://www.stork.gov.eu/1.0/currentStudiesSupplement + http://www.stork.gov.eu/1.0/isStudent + http://www.stork.gov.eu/1.0/isAcademicStaff + http://www.stork.gov.eu/1.0/isTeacherOf + http://www.stork.gov.eu/1.0/isCourseCoordinator + http://www.stork.gov.eu/1.0/isAdminStaff + http://www.stork.gov.eu/1.0/habilitation + http://www.stork.gov.eu/1.0/Title + http://www.stork.gov.eu/1.0/hasDegree + http://www.stork.gov.eu/1.0/hasAccountInBank + http://www.stork.gov.eu/1.0/isHealthCareProfessional + + http://www.stork.gov.eu/1.0/eLPIdentifier + http://www.stork.gov.eu/1.0/legalName + http://www.stork.gov.eu/1.0/alternativeName + http://www.stork.gov.eu/1.0/type + http://www.stork.gov.eu/1.0/translatableType + http://www.stork.gov.eu/1.0/status + http://www.stork.gov.eu/1.0/activity + http://www.stork.gov.eu/1.0/registeredAddress + http://www.stork.gov.eu/1.0/registeredCanonicalAddress + http://www.stork.gov.eu/1.0/contactInformation + http://www.stork.gov.eu/1.0/LPFiscalNumber + http://www.stork.gov.eu/1.0/mandate + http://www.stork.gov.eu/1.0/docRequest \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf2.xml b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf2.xml index fd1db92ac..a0a5bea10 100644 --- a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf2.xml +++ b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf2.xml @@ -2,59 +2,100 @@ - SAML constants for AuthnRequests and Responses. - - - unspecified - - obtained - - - entity - - - - HTTP-POST - - false - false - false - - - http://S-PEPS.gov.xx - - - http://C-PEPS.gov.xx - - - 300 - - - false - - - false - - - - http://www.stork.gov.eu/1.0/eIdentifier - http://www.stork.gov.eu/1.0/givenName - http://www.stork.gov.eu/1.0/surname - http://www.stork.gov.eu/1.0/inheritedFamilyName - http://www.stork.gov.eu/1.0/adoptedFamilyName - http://www.stork.gov.eu/1.0/gender - http://www.stork.gov.eu/1.0/dateOfBirth - http://www.stork.gov.eu/1.0/countryCodeOfBirth - http://www.stork.gov.eu/1.0/nationalityCode - http://www.stork.gov.eu/1.0/maritalStatus - http://www.stork.gov.eu/1.0/residenceAddress - http://www.stork.gov.eu/1.0/eMail - http://www.stork.gov.eu/1.0/academicTitle - http://www.stork.gov.eu/1.0/pseudonym - http://www.stork.gov.eu/1.0/age - http://www.stork.gov.eu/1.0/isAgeOver + SAML constants for AuthnRequests and Responses. + + + unspecified + + obtained + + + entity + + + + HTTP-POST + + false + false + false + + + http://S-PEPS.gov.xx + + + http://C-PEPS.gov.xx + + + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + + + 300 + + + false + + + false + + + + http://www.stork.gov.eu/1.0/eIdentifier + http://www.stork.gov.eu/1.0/givenName + http://www.stork.gov.eu/1.0/surname + http://www.stork.gov.eu/1.0/inheritedFamilyName + http://www.stork.gov.eu/1.0/adoptedFamilyName + http://www.stork.gov.eu/1.0/gender + http://www.stork.gov.eu/1.0/dateOfBirth + http://www.stork.gov.eu/1.0/countryCodeOfBirth + http://www.stork.gov.eu/1.0/placeOfBirth + http://www.stork.gov.eu/1.0/nationalityCode + http://www.stork.gov.eu/1.0/maritalStatus + http://www.stork.gov.eu/1.0/textResidenceAddress + http://www.stork.gov.eu/1.0/canonicalResidenceAddress + http://www.stork.gov.eu/1.0/eMail + http://www.stork.gov.eu/1.0/title + http://www.stork.gov.eu/1.0/residencePermit + http://www.stork.gov.eu/1.0/pseudonym + http://www.stork.gov.eu/1.0/age + http://www.stork.gov.eu/1.0/isAgeOver + http://www.stork.gov.eu/1.0/signedDoc + http://www.stork.gov.eu/1.0/citizenQAALevel + http://www.stork.gov.eu/1.0/fiscalNumber + http://www.stork.gov.eu/1.0/unknown + http://www.stork.gov.eu/1.0/newAttribute1 + http://www.stork.gov.eu/1.0/newAttribute2 + http://www.stork.gov.eu/1.0/hasDegree + + http://www.stork.gov.eu/1.0/diplomaSupplement + http://www.stork.gov.eu/1.0/currentStudiesSupplement + http://www.stork.gov.eu/1.0/isStudent + http://www.stork.gov.eu/1.0/isAcademicStaff + http://www.stork.gov.eu/1.0/isTeacherOf + http://www.stork.gov.eu/1.0/isCourseCoordinator + http://www.stork.gov.eu/1.0/isAdminStaff + http://www.stork.gov.eu/1.0/habilitation + http://www.stork.gov.eu/1.0/Title + http://www.stork.gov.eu/1.0/hasDegree + http://www.stork.gov.eu/1.0/hasAccountInBank + http://www.stork.gov.eu/1.0/isHealthCareProfessional + + http://www.stork.gov.eu/1.0/eLPIdentifier + http://www.stork.gov.eu/1.0/legalName + http://www.stork.gov.eu/1.0/alternativeName + http://www.stork.gov.eu/1.0/type + http://www.stork.gov.eu/1.0/translatableType + http://www.stork.gov.eu/1.0/status + http://www.stork.gov.eu/1.0/activity + http://www.stork.gov.eu/1.0/registeredAddress + http://www.stork.gov.eu/1.0/registeredCanonicalAddress + http://www.stork.gov.eu/1.0/contactInformation + http://www.stork.gov.eu/1.0/LPFiscalNumber + http://www.stork.gov.eu/1.0/mandate + http://www.stork.gov.eu/1.0/docRequest + \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf3.xml b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf3.xml index bea40d274..61c6cd6d6 100644 --- a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf3.xml +++ b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf3.xml @@ -2,56 +2,96 @@ - SAML constants for AuthnRequests and Responses. - - - unspecified - - obtained - - - entity - - - - HTTP-POST - - false - false - false - - - http://S-PEPS.gov.xx - - - http://C-PEPS.gov.xx - - - 300 - - - false - - - http://www.stork.gov.eu/1.0/eIdentifier - http://www.stork.gov.eu/1.0/givenName - http://www.stork.gov.eu/1.0/surname - http://www.stork.gov.eu/1.0/inheritedFamilyName - http://www.stork.gov.eu/1.0/adoptedFamilyName - http://www.stork.gov.eu/1.0/gender - http://www.stork.gov.eu/1.0/dateOfBirth - http://www.stork.gov.eu/1.0/countryCodeOfBirth - http://www.stork.gov.eu/1.0/nationalityCode - http://www.stork.gov.eu/1.0/maritalStatus - http://www.stork.gov.eu/1.0/residenceAddress - http://www.stork.gov.eu/1.0/eMail - http://www.stork.gov.eu/1.0/academicTitle - http://www.stork.gov.eu/1.0/pseudonym - http://www.stork.gov.eu/1.0/age - http://www.stork.gov.eu/1.0/isAgeOver - http://www.stork.gov.eu/1.0/unknown + SAML constants for AuthnRequests and Responses. + + + unspecified + + obtained + + + entity + + + + HTTP-POST + + false + false + false + + + http://S-PEPS.gov.xx + + + http://C-PEPS.gov.xx + + + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + + + 300 + + + false + + + http://www.stork.gov.eu/1.0/eIdentifier + http://www.stork.gov.eu/1.0/givenName + http://www.stork.gov.eu/1.0/surname + http://www.stork.gov.eu/1.0/inheritedFamilyName + http://www.stork.gov.eu/1.0/adoptedFamilyName + http://www.stork.gov.eu/1.0/gender + http://www.stork.gov.eu/1.0/dateOfBirth + http://www.stork.gov.eu/1.0/countryCodeOfBirth + http://www.stork.gov.eu/1.0/placeOfBirth + http://www.stork.gov.eu/1.0/nationalityCode + http://www.stork.gov.eu/1.0/maritalStatus + http://www.stork.gov.eu/1.0/textResidenceAddress + http://www.stork.gov.eu/1.0/canonicalResidenceAddress + http://www.stork.gov.eu/1.0/eMail + http://www.stork.gov.eu/1.0/title + http://www.stork.gov.eu/1.0/residencePermit + http://www.stork.gov.eu/1.0/pseudonym + http://www.stork.gov.eu/1.0/age + http://www.stork.gov.eu/1.0/isAgeOver + http://www.stork.gov.eu/1.0/signedDoc + http://www.stork.gov.eu/1.0/citizenQAALevel + http://www.stork.gov.eu/1.0/fiscalNumber + http://www.stork.gov.eu/1.0/unknown + http://www.stork.gov.eu/1.0/newAttribute1 + http://www.stork.gov.eu/1.0/newAttribute2 + http://www.stork.gov.eu/1.0/hasDegree + + http://www.stork.gov.eu/1.0/diplomaSupplement + http://www.stork.gov.eu/1.0/currentStudiesSupplement + http://www.stork.gov.eu/1.0/isStudent + http://www.stork.gov.eu/1.0/isAcademicStaff + http://www.stork.gov.eu/1.0/isTeacherOf + http://www.stork.gov.eu/1.0/isCourseCoordinator + http://www.stork.gov.eu/1.0/isAdminStaff + http://www.stork.gov.eu/1.0/habilitation + http://www.stork.gov.eu/1.0/Title + http://www.stork.gov.eu/1.0/hasDegree + http://www.stork.gov.eu/1.0/hasAccountInBank + http://www.stork.gov.eu/1.0/isHealthCareProfessional + + http://www.stork.gov.eu/1.0/eLPIdentifier + http://www.stork.gov.eu/1.0/legalName + http://www.stork.gov.eu/1.0/alternativeName + http://www.stork.gov.eu/1.0/type + http://www.stork.gov.eu/1.0/translatableType + http://www.stork.gov.eu/1.0/status + http://www.stork.gov.eu/1.0/activity + http://www.stork.gov.eu/1.0/registeredAddress + http://www.stork.gov.eu/1.0/registeredCanonicalAddress + http://www.stork.gov.eu/1.0/contactInformation + http://www.stork.gov.eu/1.0/LPFiscalNumber + http://www.stork.gov.eu/1.0/mandate + http://www.stork.gov.eu/1.0/docRequest + \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequest.xml b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequest.xml index 3764389e4..d4f6f89da 100644 --- a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequest.xml +++ b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequest.xml @@ -1,82 +1,68 @@ - - - http://S-PEPS.gov.xx - - - - - - - - - - - - - BgPDTVCv7BhiWIs6HsC06jaHaag= - - - dIC61bGi6Jqp1zSVojpjaVq9WaZcDtNImXgo1Dyze5/hJA07Sy4TaHu+/IuLEC99aLjM6rxh2UUNqpPaQCFlF5eVkVv/c4gHEZVyevhjJKTidqmnuhlI78PGMx2thfxFsHsPcqHqOzy1Z6w18K1ds6APQP+aXI9TNKis+pykn4nJititYuiSseD0VY0F4QnXx+U6k3raoi1CAFE5fe7EuI/KfxuhhQLAbLq90Vm8R94ITBjfSS25mXstXNe9zppTSjDB42ld1TjDovDwXAn5OxiZasIEb5m68sRlxgoQ/2/+ZdYNNINFLAwkCbb8MiCbGASd626Bme0Kx+ropeWdxw== - - - MIIDXjCCAkagAwIBAgIEUk1MbDANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJJUzESMBAGA1UE - CAwJUmV5a2phdmlrMRIwEAYDVQQHDAlSZXlramF2aWsxEDAOBgNVBAoMB0FkdmFuaWExDzANBgNV - BAsMBlNUT1JLMjEXMBUGA1UEAwwOc2FtbC1kZW1vLWNlcnQwHhcNMTMxMDAzMTA1MzEyWhcNMjMx - MDAzMTA1MzEyWjBxMQswCQYDVQQGEwJJUzESMBAGA1UECAwJUmV5a2phdmlrMRIwEAYDVQQHDAlS - ZXlramF2aWsxEDAOBgNVBAoMB0FkdmFuaWExDzANBgNVBAsMBlNUT1JLMjEXMBUGA1UEAwwOc2Ft - bC1kZW1vLWNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCkSgTxZkNRXZTKLB0c - 4oz7/8Dh56FX+0cYg7hjw4e8vn+ITXkxzrmUH57FtsvKln4mq1H0FHXL80u3IiWX8qY+QLgNeKeB - m85lXuyOb3wWpKAaQvpLAkejGLCx22AN2L0WZkKZV2puwRQVsRHCq6U6vToJXDZ6Ui6ltKsAl/ZS - 8qUFpiIvqD5ea4ohz4JsFE/uApRc7pbJ4VbOmAAeH/tQTayptq2kPb2vvUVk+2cH5J7UD+GCI88E - e+mS+C33tV9NmWUHL69mYEe8FXjumbKA5e9i1ejn9i0/BLUtHFonHnL9YFMim0foI7NNc5mNg9aw - vm0PuByVU3kuibQkqGBLAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAA9X5B4NBmVuhjECi+KOnRRX - 5oUV+jbYKhGZODDPi+F4Uo7ZtPFQ6sS3tE54+8AoDl5zQ5q5fDDVXhB42IIIjDxHKo8cBXie5FZ6 - mJtErvWZWYWdO0uV2OQAUALq2LieidqSFDJ+Pjl8w1New8oi3migwyE0jZo4Q97lJGDfJTruV0A2 - JE/Gt6QAAcWhhN2hZl92pYkIi5OeqHXyzBUp5vg8LLfNmeyziCAiXDC1Sy/aQU/cllZ3zFJMrqZM - s2xBpmB4sF1YRbIrr2OqEVE6M6DUx+pAQOd2uogV3AMT9D5MYpckI1jx/o/Tto7ju74nIVOskDiN - K0FR8izxcT0HixM= - - - - - 3 - false - false - false - - - - 16 - 18 - - - Sveinbjorn - - - ES/IS/1234567890 - - - - - - + + http://S-PEPS.gov.xx + + + + + + + + + + + + + NwBXMUys6XjoR7Ddbr6JI5gB+O8= + + + MFoAC5mncGKFyvZKygSIH7+9JrXWMJ18jolBHZ0WisxpIrDldS+K+Mf6uwOirL5mal2uktpIT2RRiT1Twk+fS5t94wnobaLpktpv+uoZCzd2BAqFpBBHnImwC/UEy7hCF9htsW8CCx97wRXHA4IGx5OX9Fg4f+ZJdPPFLrGpdfJ3bJXvQeQPwGLqhjWio/XnAYwJYQ8YGQvRywZDDodTZDWHsKMHAsrIdmNJz93wmMPceRtgcUceZdN4jDkPE8SPNrApe2ksd3dEKauyyJQ2DR5jryVQpGM7sJzQhP9Z57XIJta+c/nJ7bttw+M+QsZn/E+CLQpcI8MeuuhBb1+mGA== + + + MIIDIjCCAgqgAwIBAgIES6idsjANBgkqhkiG9w0BAQUFADBTMQswCQYDVQQGEwJFUzEOMAwGA1UE + CAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExEzARBgNVBAMMCmxvY2Fs + LWRlbW8wHhcNMTMwODI4MTY0NzM1WhcNMTUwODI4MTY0NzM1WjBTMQswCQYDVQQGEwJFUzEOMAwG + A1UECAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExEzARBgNVBAMMCmxv + Y2FsLWRlbW8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx+7zEQUbt8Ot9dByR5TuY + NPmTwaKhECtnkxYAx9tl+Ga3kFiv+dOSeDoQOhxkICG1ZMaG0Gtk0EQWjscC1cLwDXpAOdhOm5xh + ndFHxa3V3Y3zomFZA7A3nwP8wt17wDrc1xi2Ye8VrwO7Vjb/F8Rgutlcrvq+LF4g9nQLoRiKUq8w + NFvDlvhBbLr8hMVBMY/jY7tSQ85qLqKUkWRcoDttJjgWZoO1vpBS4m+FywtYdOoHnN6fv4Dvf1r2 + rNLgebgBvSfwznxiulwW6FBLasYX0rYKP7RfwG8TJ+FumOgAjADj2LdwK25RZNg44XU2V1z1Fp37 + fNXhfo08LpdD1ueFAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBADMRGTWOmadZyCoJNluV+M7LopjC + 9WpFUj76X0cAoNXmt12zYqYe8hjRmBr6l2V/FXT3/TyWET1nILG46zwwAxslw3b2LvkhU+9QcuB8 + yC8TCJJ0kgsTZ/EUZPSbwUG7Nn2jkMiyjlyKcjSCQOzEKQyR1xYwyZG40+BPeGbYjmRgm6kcmCxY + USWoPwNyfke9gNT80f0pUj7wJ9YwWbTIz1rhf/h7rxoMYypXo+JXwaXW/Ra8v1uDcwfKpE5ZgwAU + nubLXF4A+H7/N7ZvB5XDwJ4W+99nuPsKfwacD8m1sflTXcEPzzhOq6iQ9anJT94/pMctnp827zXA + y66jvDrin5I= + + + + + 3 + IS + false + false + false + + + ES/IS/1234567890 + + + Sveinbjorn + + + + fiscalNumber + + + 16 + 18 + + + LPFiscalNumber + + + + + + \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestSdoc.xml b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestSdoc.xml index 7dffe0312..fadc86d14 100644 --- a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestSdoc.xml +++ b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestSdoc.xml @@ -1,68 +1,54 @@ - - - http://S-PEPS.gov.xx - - - - - - - - - - - - - X1nUVB6qXdoKbJzNekiSo9ExLdw= - - - ExCPHHC/9OhdhOl1Ou+43Qw1nvskpbMYMu9vqa7m16doxM2PIUmK7LUw7hZiKtjIdBxuhpca3OrjO8O6MuTDN1FksWoj+7B1KTLFtmspucT5O7Cu2OqhK5WIVuCaLuA7CD0N2UfFouRwR5NlLHyzn9Trd7IM5OjA41dGb5jqYl7Ir+62+MgjhZRlLooDzb5fDAczbxv9LHGiKRBpgnk40w3gDAvoSPNdEuKhZi8LPQWWNBvVi3N5ZmJmAIacZWBqePywXTjygmChWAc8p7ptAX6tw0hpBxyxoW3aaZZzWQNcwobTRYbn89fcM11gqIz/YK7VXtiQ7WEQt1enQD/GAA== - - - MIIDIjCCAgqgAwIBAgIES6idsjANBgkqhkiG9w0BAQUFADBTMQswCQYDVQQGEwJFUzEOMAwGA1UE - CAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExEzARBgNVBAMMCmxvY2Fs - LWRlbW8wHhcNMTMwODI4MTY0NzM1WhcNMTUwODI4MTY0NzM1WjBTMQswCQYDVQQGEwJFUzEOMAwG - A1UECAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExEzARBgNVBAMMCmxv - Y2FsLWRlbW8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx+7zEQUbt8Ot9dByR5TuY - NPmTwaKhECtnkxYAx9tl+Ga3kFiv+dOSeDoQOhxkICG1ZMaG0Gtk0EQWjscC1cLwDXpAOdhOm5xh - ndFHxa3V3Y3zomFZA7A3nwP8wt17wDrc1xi2Ye8VrwO7Vjb/F8Rgutlcrvq+LF4g9nQLoRiKUq8w - NFvDlvhBbLr8hMVBMY/jY7tSQ85qLqKUkWRcoDttJjgWZoO1vpBS4m+FywtYdOoHnN6fv4Dvf1r2 - rNLgebgBvSfwznxiulwW6FBLasYX0rYKP7RfwG8TJ+FumOgAjADj2LdwK25RZNg44XU2V1z1Fp37 - fNXhfo08LpdD1ueFAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBADMRGTWOmadZyCoJNluV+M7LopjC - 9WpFUj76X0cAoNXmt12zYqYe8hjRmBr6l2V/FXT3/TyWET1nILG46zwwAxslw3b2LvkhU+9QcuB8 - yC8TCJJ0kgsTZ/EUZPSbwUG7Nn2jkMiyjlyKcjSCQOzEKQyR1xYwyZG40+BPeGbYjmRgm6kcmCxY - USWoPwNyfke9gNT80f0pUj7wJ9YwWbTIz1rhf/h7rxoMYypXo+JXwaXW/Ra8v1uDcwfKpE5ZgwAU - nubLXF4A+H7/N7ZvB5XDwJ4W+99nuPsKfwacD8m1sflTXcEPzzhOq6iQ9anJT94/pMctnp827zXA - y66jvDrin5I= - - - - - 3 - IS - false - false - false - - - IS/IS/fbea6e68-0393-401b-b616-f767fff9418c - - - - - - + + http://S-PEPS.gov.xx + + + + + + + + + + + + + 2WMvsIXoH1VpwqbNiXG8lWS2ZPc= + + + nMfUZiYHyHgSky4NHfDGch8a6UxWupS1Dhk2mu3L065Vq2eKLfDwWjgNkKPDoLcEkgAiDpNlLsS0+nDk8IexAMSq+T54Mlt4AhMRIrDP3SlWya5mqQ0VnxFENGlhi7kSKK2oIMfkiaeIBART7QBZggSZFnk0mw/BzmJM5bJ4Dipymndx7tv98BDlWFZEKH7iSc9uUuMpVygTNDxtEsdMcBKpqYiyVyTln8/xKsqXSL4RA10MYmqfvFsMZWUwQUgdl5tor910/XrAXHXJY50zH0CwekUXszOdvO7s3WvrG4lt3goqq2WDcaeDzizV93+Ih+lVl9PebTtMxCyO4fxw7Q== + + + MIIDIjCCAgqgAwIBAgIES6idsjANBgkqhkiG9w0BAQUFADBTMQswCQYDVQQGEwJFUzEOMAwGA1UE + CAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExEzARBgNVBAMMCmxvY2Fs + LWRlbW8wHhcNMTMwODI4MTY0NzM1WhcNMTUwODI4MTY0NzM1WjBTMQswCQYDVQQGEwJFUzEOMAwG + A1UECAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExEzARBgNVBAMMCmxv + Y2FsLWRlbW8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx+7zEQUbt8Ot9dByR5TuY + NPmTwaKhECtnkxYAx9tl+Ga3kFiv+dOSeDoQOhxkICG1ZMaG0Gtk0EQWjscC1cLwDXpAOdhOm5xh + ndFHxa3V3Y3zomFZA7A3nwP8wt17wDrc1xi2Ye8VrwO7Vjb/F8Rgutlcrvq+LF4g9nQLoRiKUq8w + NFvDlvhBbLr8hMVBMY/jY7tSQ85qLqKUkWRcoDttJjgWZoO1vpBS4m+FywtYdOoHnN6fv4Dvf1r2 + rNLgebgBvSfwznxiulwW6FBLasYX0rYKP7RfwG8TJ+FumOgAjADj2LdwK25RZNg44XU2V1z1Fp37 + fNXhfo08LpdD1ueFAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBADMRGTWOmadZyCoJNluV+M7LopjC + 9WpFUj76X0cAoNXmt12zYqYe8hjRmBr6l2V/FXT3/TyWET1nILG46zwwAxslw3b2LvkhU+9QcuB8 + yC8TCJJ0kgsTZ/EUZPSbwUG7Nn2jkMiyjlyKcjSCQOzEKQyR1xYwyZG40+BPeGbYjmRgm6kcmCxY + USWoPwNyfke9gNT80f0pUj7wJ9YwWbTIz1rhf/h7rxoMYypXo+JXwaXW/Ra8v1uDcwfKpE5ZgwAU + nubLXF4A+H7/N7ZvB5XDwJ4W+99nuPsKfwacD8m1sflTXcEPzzhOq6iQ9anJT94/pMctnp827zXA + y66jvDrin5I= + + + + + 3 + IS + false + false + false + + + IS/IS/fbea6e68-0393-401b-b616-f767fff9418c + + + + + + \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestTagDelete.xml b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestTagDelete.xml index becc689fe..5c04f5c93 100644 --- a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestTagDelete.xml +++ b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestTagDelete.xml @@ -1,66 +1,66 @@ - http://S-PEPS.gov.xx - - hhQXDKNrJJ3Yy/pkZNZF4GlWrA/Xsx4CH9chgVa5HK4qZQvFXvZwegdw6U7rm7qv0zmI4xaLTv/bpmqJzEPfY3sIvrDRu9EouEKwtjbMbcvVQsx7I+j0yy7/cBcQJe3lRwQwyvazfYVbnSeGFxBN6WOHPqv6uInaQO/hXkicT3tBtm8o3UgUDY6c8wIMuD5A0hWTkL6z6f893AbdN85OQYAdHItNsQWeLOIeiGC918X7qqTfhFtBAB2oGVjlsSEqWox1jNqrPl1jjA0dP76m5SIVSqF8XcDR306ZB9GLJywOHKba0lxGLsXOAzJ+8u9jeixJ6VZKFqZg2Fhl/saKbg== - - - MIIDJzCCAg8CBEuonbIwDQYJKoZIhvcNAQEFBQAwWDELMAkGA1UEBhMCRVMxDjAMBgNVBAgMBVNw - YWluMQ8wDQYDVQQHDAZNYWRyaWQxDjAMBgNVBAoMBUluZHJhMRgwFgYDVQQDDA9sb2NhbC1kZW1v - LWNlcnQwHhcNMTAwMzIzMTA1MzM4WhcNMTAwNjAxMTA1MzM4WjBYMQswCQYDVQQGEwJFUzEOMAwG - A1UECAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExGDAWBgNVBAMMD2xv - Y2FsLWRlbW8tY2VydDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJfdQ1/mkM9sqqab - ri8qqqX4s0J6UEEXyF+0AjLU8RC4WMeYFSZ5tfwnyLsoXY0/9bZLXnBxSibQYaf4SnpZJhlVA4sU - 0d8qyEWA2OvXGDCm7uspGHG3CRQa7fpHsmHmfIAqho9XDlwpwJdx5gK4Edc6aArcMQfjqMhy1s1n - 6Of1i1lMGGsGrERIRY7biIQu/8nITbHH18sUAZMG1u/Q0Avi9O3LWyswHXUouZ818fWwG6xru2N5 - y6vtVO/SL3doRSdqYkEms93TgxTtaKg8XNe24zhNTte6nvWLaKesi2KzZGC57HU47HBFEs8NWk7z - 9BDf8uLyPz9VDahwVKzMto8CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAgpuReXQ7Dsfdoe5zzy2F - 6kn1qqtMkRGsBPKnDFCI/GkIZpBiqlfwdh6sipnFKWfKEDlPKN1kEhbkDR2GA1Cp4F4ZSL/HumZM - pWabRhDxhTPvHIFbbShPDJY93+jw/yQeaWgMuhw3WzdH9TrVoRZH0Q7sG1pIJo5/6IogIZwFvJHT - /NDutKmurU6Lw8Vnde8PfnQd+FTEhz0SEGyKkWjAuhGbJfseBy/z3L+MJq1rdSQ9PF7wXDvWNzJq - yaNBUWWBV1TskvkNZXcaguroVPy2XhA1aixlAajWEXLk6Uuj5UYqalrV/reNYvDvY0BV2CIn51r7 - Ppm8IFVTk8mYfX8/jw== - - - - - 3 - false - false - false - - - - 16 - 18 - - - Sveinbjörn - - - ES/IS/1234567890 - - - - - - + xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" + xmlns:stork="urn:eu:stork:names:tc:STORK:1.0:assertion" xmlns:storkp="urn:eu:stork:names:tc:STORK:1.0:protocol" + xmlns:xs="http://www.w3.org/2001/XMLSchema" Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified" + Destination="http://C-PEPS.gov.xx/PEPS/ColleagueRequest" ID="_f6c8fc355b9f125cb5283f038e1b3cdf" + IssueInstant="2013-10-03T10:28:15.449Z" Version="2.0"> + http://S-PEPS.gov.xx + + hhQXDKNrJJ3Yy/pkZNZF4GlWrA/Xsx4CH9chgVa5HK4qZQvFXvZwegdw6U7rm7qv0zmI4xaLTv/bpmqJzEPfY3sIvrDRu9EouEKwtjbMbcvVQsx7I+j0yy7/cBcQJe3lRwQwyvazfYVbnSeGFxBN6WOHPqv6uInaQO/hXkicT3tBtm8o3UgUDY6c8wIMuD5A0hWTkL6z6f893AbdN85OQYAdHItNsQWeLOIeiGC918X7qqTfhFtBAB2oGVjlsSEqWox1jNqrPl1jjA0dP76m5SIVSqF8XcDR306ZB9GLJywOHKba0lxGLsXOAzJ+8u9jeixJ6VZKFqZg2Fhl/saKbg== + + + MIIDJzCCAg8CBEuonbIwDQYJKoZIhvcNAQEFBQAwWDELMAkGA1UEBhMCRVMxDjAMBgNVBAgMBVNw + YWluMQ8wDQYDVQQHDAZNYWRyaWQxDjAMBgNVBAoMBUluZHJhMRgwFgYDVQQDDA9sb2NhbC1kZW1v + LWNlcnQwHhcNMTAwMzIzMTA1MzM4WhcNMTAwNjAxMTA1MzM4WjBYMQswCQYDVQQGEwJFUzEOMAwG + A1UECAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExGDAWBgNVBAMMD2xv + Y2FsLWRlbW8tY2VydDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJfdQ1/mkM9sqqab + ri8qqqX4s0J6UEEXyF+0AjLU8RC4WMeYFSZ5tfwnyLsoXY0/9bZLXnBxSibQYaf4SnpZJhlVA4sU + 0d8qyEWA2OvXGDCm7uspGHG3CRQa7fpHsmHmfIAqho9XDlwpwJdx5gK4Edc6aArcMQfjqMhy1s1n + 6Of1i1lMGGsGrERIRY7biIQu/8nITbHH18sUAZMG1u/Q0Avi9O3LWyswHXUouZ818fWwG6xru2N5 + y6vtVO/SL3doRSdqYkEms93TgxTtaKg8XNe24zhNTte6nvWLaKesi2KzZGC57HU47HBFEs8NWk7z + 9BDf8uLyPz9VDahwVKzMto8CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAgpuReXQ7Dsfdoe5zzy2F + 6kn1qqtMkRGsBPKnDFCI/GkIZpBiqlfwdh6sipnFKWfKEDlPKN1kEhbkDR2GA1Cp4F4ZSL/HumZM + pWabRhDxhTPvHIFbbShPDJY93+jw/yQeaWgMuhw3WzdH9TrVoRZH0Q7sG1pIJo5/6IogIZwFvJHT + /NDutKmurU6Lw8Vnde8PfnQd+FTEhz0SEGyKkWjAuhGbJfseBy/z3L+MJq1rdSQ9PF7wXDvWNzJq + yaNBUWWBV1TskvkNZXcaguroVPy2XhA1aixlAajWEXLk6Uuj5UYqalrV/reNYvDvY0BV2CIn51r7 + Ppm8IFVTk8mYfX8/jw== + + + + + 3 + false + false + false + + + + 16 + 18 + + + Sveinbjörn + + + ES/IS/1234567890 + + + + + + \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryResponse.xml b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryResponse.xml index 7ea486812..79c59f5ed 100644 --- a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryResponse.xml +++ b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryResponse.xml @@ -1,124 +1,124 @@ - http://C-PEPS.gov.xx - - - - - - - - - - - - - yMOVS1T/yRiVh3L6IBM9rR9Ie3w= - - - d8e/RyNNPmnHRIzTIuRSnW6B60oWGBGxjRua/HvNxTuod0qSarYJxEedhY9Wl1Z9WYXlry28FuKjp3DA3HhzNaVd7A7QpFqNC4dnizSVWFjxlhmoE/Uv3Y/ha9P/fk6nbtHCSKW4kHSX7QfFLeggcLmUG0IULRF8UmRdQ0WerCl0aSZZeSp8J3LsFBPeWCRSwXgfiLn+RehggzZmQU6g0ssxrpnsYEAtjAiOli+YVQGuumsZGaJ8zHA/DgJ2FTGovNUyfuSUFLhd9nLlSqFs2Avnx0Ck7Q1dxDO5truOm6e285YLHqLaGdetFyPQAj/Z4w4RJ5u5X6d7rhBjTfRAAw== - - - MIIDJzCCAg8CBEuonbIwDQYJKoZIhvcNAQEFBQAwWDELMAkGA1UEBhMCRVMxDjAMBgNVBAgMBVNw - YWluMQ8wDQYDVQQHDAZNYWRyaWQxDjAMBgNVBAoMBUluZHJhMRgwFgYDVQQDDA9sb2NhbC1kZW1v - LWNlcnQwHhcNMTAwMzIzMTA1MzM4WhcNMTAwNjAxMTA1MzM4WjBYMQswCQYDVQQGEwJFUzEOMAwG - A1UECAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExGDAWBgNVBAMMD2xv - Y2FsLWRlbW8tY2VydDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJfdQ1/mkM9sqqab - ri8qqqX4s0J6UEEXyF+0AjLU8RC4WMeYFSZ5tfwnyLsoXY0/9bZLXnBxSibQYaf4SnpZJhlVA4sU - 0d8qyEWA2OvXGDCm7uspGHG3CRQa7fpHsmHmfIAqho9XDlwpwJdx5gK4Edc6aArcMQfjqMhy1s1n - 6Of1i1lMGGsGrERIRY7biIQu/8nITbHH18sUAZMG1u/Q0Avi9O3LWyswHXUouZ818fWwG6xru2N5 - y6vtVO/SL3doRSdqYkEms93TgxTtaKg8XNe24zhNTte6nvWLaKesi2KzZGC57HU47HBFEs8NWk7z - 9BDf8uLyPz9VDahwVKzMto8CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAgpuReXQ7Dsfdoe5zzy2F - 6kn1qqtMkRGsBPKnDFCI/GkIZpBiqlfwdh6sipnFKWfKEDlPKN1kEhbkDR2GA1Cp4F4ZSL/HumZM - pWabRhDxhTPvHIFbbShPDJY93+jw/yQeaWgMuhw3WzdH9TrVoRZH0Q7sG1pIJo5/6IogIZwFvJHT - /NDutKmurU6Lw8Vnde8PfnQd+FTEhz0SEGyKkWjAuhGbJfseBy/z3L+MJq1rdSQ9PF7wXDvWNzJq - yaNBUWWBV1TskvkNZXcaguroVPy2XhA1aixlAajWEXLk6Uuj5UYqalrV/reNYvDvY0BV2CIn51r7 - Ppm8IFVTk8mYfX8/jw== - - - - - - urn:oasis:names:tc:SAML:2.0:status:Success - - - http://C-PEPS.gov.xx - - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - - - - - - - http://S-PEPS.gov.xx - - - - - - - - - - - - 16/12/2008 - - - - 105 - IS - 10 - Gudrunartun - Reykjavik - - - - - value3 - value4 - value1 - value2 - - - - 16 - 18 - - - 123456789IS - - - + xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" + xmlns:stork="urn:eu:stork:names:tc:STORK:1.0:assertion" xmlns:storkp="urn:eu:stork:names:tc:STORK:1.0:protocol" + xmlns:xs="http://www.w3.org/2001/XMLSchema" Consent="urn:oasis:names:tc:SAML:2.0:consent:obtained" + Destination="http://C-PEPS.gov.xx/PEPS/ColleagueRequest" ID="_483140d440fc4eef8e949ace49669f2e" + InResponseTo="_0a22c1120bf2de912714c24e99dd38ed" IssueInstant="2013-10-08T09:11:17.255Z" + Version="2.0"> + http://C-PEPS.gov.xx + + + + + + + + + + + + + yMOVS1T/yRiVh3L6IBM9rR9Ie3w= + + + d8e/RyNNPmnHRIzTIuRSnW6B60oWGBGxjRua/HvNxTuod0qSarYJxEedhY9Wl1Z9WYXlry28FuKjp3DA3HhzNaVd7A7QpFqNC4dnizSVWFjxlhmoE/Uv3Y/ha9P/fk6nbtHCSKW4kHSX7QfFLeggcLmUG0IULRF8UmRdQ0WerCl0aSZZeSp8J3LsFBPeWCRSwXgfiLn+RehggzZmQU6g0ssxrpnsYEAtjAiOli+YVQGuumsZGaJ8zHA/DgJ2FTGovNUyfuSUFLhd9nLlSqFs2Avnx0Ck7Q1dxDO5truOm6e285YLHqLaGdetFyPQAj/Z4w4RJ5u5X6d7rhBjTfRAAw== + + + MIIDJzCCAg8CBEuonbIwDQYJKoZIhvcNAQEFBQAwWDELMAkGA1UEBhMCRVMxDjAMBgNVBAgMBVNw + YWluMQ8wDQYDVQQHDAZNYWRyaWQxDjAMBgNVBAoMBUluZHJhMRgwFgYDVQQDDA9sb2NhbC1kZW1v + LWNlcnQwHhcNMTAwMzIzMTA1MzM4WhcNMTAwNjAxMTA1MzM4WjBYMQswCQYDVQQGEwJFUzEOMAwG + A1UECAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExGDAWBgNVBAMMD2xv + Y2FsLWRlbW8tY2VydDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJfdQ1/mkM9sqqab + ri8qqqX4s0J6UEEXyF+0AjLU8RC4WMeYFSZ5tfwnyLsoXY0/9bZLXnBxSibQYaf4SnpZJhlVA4sU + 0d8qyEWA2OvXGDCm7uspGHG3CRQa7fpHsmHmfIAqho9XDlwpwJdx5gK4Edc6aArcMQfjqMhy1s1n + 6Of1i1lMGGsGrERIRY7biIQu/8nITbHH18sUAZMG1u/Q0Avi9O3LWyswHXUouZ818fWwG6xru2N5 + y6vtVO/SL3doRSdqYkEms93TgxTtaKg8XNe24zhNTte6nvWLaKesi2KzZGC57HU47HBFEs8NWk7z + 9BDf8uLyPz9VDahwVKzMto8CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAgpuReXQ7Dsfdoe5zzy2F + 6kn1qqtMkRGsBPKnDFCI/GkIZpBiqlfwdh6sipnFKWfKEDlPKN1kEhbkDR2GA1Cp4F4ZSL/HumZM + pWabRhDxhTPvHIFbbShPDJY93+jw/yQeaWgMuhw3WzdH9TrVoRZH0Q7sG1pIJo5/6IogIZwFvJHT + /NDutKmurU6Lw8Vnde8PfnQd+FTEhz0SEGyKkWjAuhGbJfseBy/z3L+MJq1rdSQ9PF7wXDvWNzJq + yaNBUWWBV1TskvkNZXcaguroVPy2XhA1aixlAajWEXLk6Uuj5UYqalrV/reNYvDvY0BV2CIn51r7 + Ppm8IFVTk8mYfX8/jw== + + + + + + urn:oasis:names:tc:SAML:2.0:status:Success + + + http://C-PEPS.gov.xx + + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + + + + + + + http://S-PEPS.gov.xx + + + + + + + + + + + + 16/12/2008 + + + + 105 + IS + 10 + Gudrunartun + Reykjavik + + + + + value3 + value4 + value1 + value2 + + + + 16 + 18 + + + 123456789IS + + + \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequest.xml b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequest.xml index c48bfde95..93e778113 100644 --- a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequest.xml +++ b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequest.xml @@ -1,72 +1,72 @@ - http://S-PEPS.gov.xx - - - - - - - - - - - - - yzsqaxBNicOrixBUno5cL0CBOpE= - - - - Xycll1PF7hh3Xdykpr6nIr8Q6PQ6OxLIBBBugoGpAm/V4Hu7tKakHJp8TgtRWZ30jG5eolOXnJkC - wiaTVUFaQz7cNn27syRJkdA+eYlz9doiwUJ5eD1cAyddZYsNPpSeAj5UK45oN0qCH+/pI9mRw8Oi - YIN/BUEtXkoYTjPtkmA= - - - - MIIBmDCCAQECBEuWisIwDQYJKoZIhvcNAQEFBQAwEzERMA8GA1UEAxMIY291bnRyeTEwHhcNMTAw - MzA5MTc1MjAyWhcNMTAwNjA3MTc1MjAyWjATMREwDwYDVQQDEwhjb3VudHJ5MTCBnzANBgkqhkiG - 9w0BAQEFAAOBjQAwgYkCgYEAnb2gcchwxvJBclcsfCBWJnYefLJYQnDGCQ3RUtYZc26JznnLXclu - h1XfLJlWgYk/pFKz7B9KfJztal47c6mBfisnxjhdcLqcbXOuRIm7E8TZPzdbHEd60WHPDv20jr+r - /WkOQs12tKQMbgDX2wtBBcJODLYCDiYa1oQsnyhdOGkCAwEAATANBgkqhkiG9w0BAQUFAAOBgQBk - 3luVRc0EqEE1zZeYvRPi5a2yOZfI9H+/rXI1qNLwmICnuJX++ukUbqJHm/FV1iSPM9O9oqzifJ/K - eKL5EcUugJ76Tu5XO8za2FoJvYr+jIZDsEkCg+OSzcp/eljiWAIh2enZcQ/ON6QxWXeSNJPH0xOq - KAoZgbUK0Zld3Dsheg== - - - - - 3 - EDU001 - OXF001 - APP001 - EN - true - true - true - - - 16 - 18 - - - - - + xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" + xmlns:stork="urn:eu:stork:names:tc:STORK:1.0:assertion" xmlns:storkp="urn:eu:stork:names:tc:STORK:1.0:protocol" + AssertionConsumerServiceURL="http://S-PEPS.gov.xx/PEPS/ColleagueResponse" + Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified" Destination="http://C-PEPS.gov.xx/PEPS/ColleagueRequest" + ForceAuthn="true" ID="_e54eee285e7b8e2772875c406ec39674" IsPassive="false" + IssueInstant="2010-06-08T07:37:54.533Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" + ProviderName="University of Oxford" Version="2.0"> + http://S-PEPS.gov.xx + + + + + + + + + + + + + yzsqaxBNicOrixBUno5cL0CBOpE= + + + + Xycll1PF7hh3Xdykpr6nIr8Q6PQ6OxLIBBBugoGpAm/V4Hu7tKakHJp8TgtRWZ30jG5eolOXnJkC + wiaTVUFaQz7cNn27syRJkdA+eYlz9doiwUJ5eD1cAyddZYsNPpSeAj5UK45oN0qCH+/pI9mRw8Oi + YIN/BUEtXkoYTjPtkmA= + + + + MIIBmDCCAQECBEuWisIwDQYJKoZIhvcNAQEFBQAwEzERMA8GA1UEAxMIY291bnRyeTEwHhcNMTAw + MzA5MTc1MjAyWhcNMTAwNjA3MTc1MjAyWjATMREwDwYDVQQDEwhjb3VudHJ5MTCBnzANBgkqhkiG + 9w0BAQEFAAOBjQAwgYkCgYEAnb2gcchwxvJBclcsfCBWJnYefLJYQnDGCQ3RUtYZc26JznnLXclu + h1XfLJlWgYk/pFKz7B9KfJztal47c6mBfisnxjhdcLqcbXOuRIm7E8TZPzdbHEd60WHPDv20jr+r + /WkOQs12tKQMbgDX2wtBBcJODLYCDiYa1oQsnyhdOGkCAwEAATANBgkqhkiG9w0BAQUFAAOBgQBk + 3luVRc0EqEE1zZeYvRPi5a2yOZfI9H+/rXI1qNLwmICnuJX++ukUbqJHm/FV1iSPM9O9oqzifJ/K + eKL5EcUugJ76Tu5XO8za2FoJvYr+jIZDsEkCg+OSzcp/eljiWAIh2enZcQ/ON6QxWXeSNJPH0xOq + KAoZgbUK0Zld3Dsheg== + + + + + 3 + EDU001 + OXF001 + APP001 + EN + true + true + true + + + 16 + 18 + + + + + \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDelete.xml b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDelete.xml index 8766f9a8b..cca0dbc27 100644 --- a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDelete.xml +++ b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDelete.xml @@ -1,47 +1,47 @@ - http://S-PEPS.gov.xx - - - S6nY97RSCUJXq3HZ5obSLCI341LvtAA3vHjR1FWxrIMDPACQMqlNWBYNnRP1RiZiJV6x0RieH+SR - Vkiy03jYyhr0XkwAE5Wd6Huf+zIbeTXjZkdQj7JpAXoB+ky4G/+L0deamvsP3eO7ZJ4grady4gmC - Xt8p8tK3EoMocZse2hw= - - - - MIIBkTCB+wIESpT8bTANBgkqhkiG9w0BAQUFADAQMQ4wDAYDVQQDEwVzdG9yazAeFw0wOTA4MjYw - OTEyMTNaFw0wOTExMjQwOTEyMTNaMBAxDjAMBgNVBAMTBXN0b3JrMIGfMA0GCSqGSIb3DQEBAQUA - A4GNADCBiQKBgQDK/QL8NuMd41I1lObObeRA6DaM8bjeYqIz5mg5WnnZv4jlcK7Gq89Lk6htXRFl - lAXpDYhI3zolMIMHEMZ3zQQPc7lgTV6Bbz9uD2YTJ9Kx55e8Y6Y49DO+TiiejGJxTzTFUcuBJHaK - ipuvLVd1a8N3RAnaGSUOozhrTqxba82mEwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFJgeS18nhUl - r7WnvSn9FlkI94U//Hk3iZLc3/cScTu7D7Y/J0eUq4TF8PsSzWX5khGuqrTkswNgfEtl2IpACQ2w - kB8+RxeRNdddQlGHlO4ZqnpvxXBwSouiy2yUeAo0y++vMFm6DO4sxfk8eTtimPDo5SzBtjtGtbqS - 3cyl/wz8 - - - - - 3 - false - false - false - - - - - - + xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" + xmlns:stork="urn:eu:stork:names:tc:STORK:1.0:stork" xmlns:storkp="urn:eu:stork:names:tc:STORK:1.0:protocol" + AssertionConsumerServiceURL="http://localhost:8080/SP/ReturnPage" + Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified" Destination="http://locahost:8080/PEPS/ServiceProvider" + ForceAuthn="true" ID="_0c64ff85-1323-4618-847b-12d1983b86e4" IsPassive="false" + IssueInstant="2010-04-07T16:45:03.593Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" + ProviderName="PT-SP" Version="2.0"> + http://S-PEPS.gov.xx + + + S6nY97RSCUJXq3HZ5obSLCI341LvtAA3vHjR1FWxrIMDPACQMqlNWBYNnRP1RiZiJV6x0RieH+SR + Vkiy03jYyhr0XkwAE5Wd6Huf+zIbeTXjZkdQj7JpAXoB+ky4G/+L0deamvsP3eO7ZJ4grady4gmC + Xt8p8tK3EoMocZse2hw= + + + + MIIBkTCB+wIESpT8bTANBgkqhkiG9w0BAQUFADAQMQ4wDAYDVQQDEwVzdG9yazAeFw0wOTA4MjYw + OTEyMTNaFw0wOTExMjQwOTEyMTNaMBAxDjAMBgNVBAMTBXN0b3JrMIGfMA0GCSqGSIb3DQEBAQUA + A4GNADCBiQKBgQDK/QL8NuMd41I1lObObeRA6DaM8bjeYqIz5mg5WnnZv4jlcK7Gq89Lk6htXRFl + lAXpDYhI3zolMIMHEMZ3zQQPc7lgTV6Bbz9uD2YTJ9Kx55e8Y6Y49DO+TiiejGJxTzTFUcuBJHaK + ipuvLVd1a8N3RAnaGSUOozhrTqxba82mEwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFJgeS18nhUl + r7WnvSn9FlkI94U//Hk3iZLc3/cScTu7D7Y/J0eUq4TF8PsSzWX5khGuqrTkswNgfEtl2IpACQ2w + kB8+RxeRNdddQlGHlO4ZqnpvxXBwSouiy2yUeAo0y++vMFm6DO4sxfk8eTtimPDo5SzBtjtGtbqS + 3cyl/wz8 + + + + + 3 + false + false + false + + + + + + \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDeleteEncoded.xml b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDeleteEncoded.xml index 1b1e1646c..db606145c 100644 --- a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDeleteEncoded.xml +++ b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDeleteEncoded.xml @@ -1,47 +1,47 @@ - http://S-PEPS.gov.xx - - - S6nY97RSCUJXq3HZ5obSLCI341LvtAA3vHjR1FWxrIMDPACQMqlNWBYNnRP1RiZiJV6x0RieH+SR - Vkiy03jYyhr0XkwAE5Wd6Huf+zIbeTXjZkdQj7JpAXoB+ky4G/+L0deamvsP3eO7ZJ4grady4gmC - Xt8p8tK3EoMocZse2hw= - - - - MIIBkTCB+wIESpT8bTANBgkqhkiG9w0BAQUFADAQMQ4wDAYDVQQDEwVzdG9yazAeFw0wOTA4MjYw - OTEyMTNaFw0wOTExMjQwOTEyMTNaMBAxDjAMBgNVBAMTBXN0b3JrMIGfMA0GCSqGSIb3DQEBAQUA - A4GNADCBiQKBgQDK/QL8NuMd41I1lObObeRA6DaM8bjeYqIz5mg5WnnZv4jlcK7Gq89Lk6htXRFl - lAXpDYhI3zolMIMHEMZ3zQQPc7lgTV6Bbz9uD2YTJ9Kx55e8Y6Y49DO+TiiejGJxTzTFUcuBJHaK - ipuvLVd1a8N3RAnaGSUOozhrTqxba82mEwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFJgeS18nhUl - r7WnvSn9FlkI94U//Hk3iZLc3/cScTu7D7Y/J0eUq4TF8PsSzWX5khGuqrTkswNgfEtl2IpACQ2w - kB8+RxeRNdddQlGHlO4ZqnpvxXBwSouiy2yUeAo0y++vMFm6DO4sxfk8eTtimPDo5SzBtjtGtbqS - 3cyl/wz8 - - - - - 3 - false - false - false - - - - - - + xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" + xmlns:stork="urn:eu:stork:names:tc:STORK:1.0:stork" xmlns:storkp="urn:eu:stork:names:tc:STORK:1.0:protocol" + AssertionConsumerServiceURL="http://localhost:8080/SP/ReturnPage" + Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified" Destination="http://localhost:8080/PEPS/ServiceProvider" + ForceAuthn="true" ID="_0c64ff85-1323-4618-847b-12d1983b86e4" IsPassive="false" + IssueInstant="2010-04-07T16:45:03.593Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" + ProviderName="PT-SP" Version="2.0"> + http://S-PEPS.gov.xx + + + S6nY97RSCUJXq3HZ5obSLCI341LvtAA3vHjR1FWxrIMDPACQMqlNWBYNnRP1RiZiJV6x0RieH+SR + Vkiy03jYyhr0XkwAE5Wd6Huf+zIbeTXjZkdQj7JpAXoB+ky4G/+L0deamvsP3eO7ZJ4grady4gmC + Xt8p8tK3EoMocZse2hw= + + + + MIIBkTCB+wIESpT8bTANBgkqhkiG9w0BAQUFADAQMQ4wDAYDVQQDEwVzdG9yazAeFw0wOTA4MjYw + OTEyMTNaFw0wOTExMjQwOTEyMTNaMBAxDjAMBgNVBAMTBXN0b3JrMIGfMA0GCSqGSIb3DQEBAQUA + A4GNADCBiQKBgQDK/QL8NuMd41I1lObObeRA6DaM8bjeYqIz5mg5WnnZv4jlcK7Gq89Lk6htXRFl + lAXpDYhI3zolMIMHEMZ3zQQPc7lgTV6Bbz9uD2YTJ9Kx55e8Y6Y49DO+TiiejGJxTzTFUcuBJHaK + ipuvLVd1a8N3RAnaGSUOozhrTqxba82mEwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFJgeS18nhUl + r7WnvSn9FlkI94U//Hk3iZLc3/cScTu7D7Y/J0eUq4TF8PsSzWX5khGuqrTkswNgfEtl2IpACQ2w + kB8+RxeRNdddQlGHlO4ZqnpvxXBwSouiy2yUeAo0y++vMFm6DO4sxfk8eTtimPDo5SzBtjtGtbqS + 3cyl/wz8 + + + + + 3 + false + false + false + + + + + + \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/logback-test.xml b/id/server/stork2-saml-engine/src/test/resources/logback-test.xml index 99d7d353a..84d48c00e 100644 --- a/id/server/stork2-saml-engine/src/test/resources/logback-test.xml +++ b/id/server/stork2-saml-engine/src/test/resources/logback-test.xml @@ -2,20 +2,20 @@ - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + - - - + + + - - - - + + + + \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/p11Conf.cfg b/id/server/stork2-saml-engine/src/test/resources/p11Conf.cfg index bd9f357ce..84f7050d1 100644 --- a/id/server/stork2-saml-engine/src/test/resources/p11Conf.cfg +++ b/id/server/stork2-saml-engine/src/test/resources/p11Conf.cfg @@ -1,21 +1,15 @@ -//ATTRIBUTE VALUE -//name name suffix of this provider instance -//library pathname of PKCS#11 implementation -//slotListIndex slot index - -//PREFIX DESCRIPTION -//CKO_ Object class -//CKA_ Attribute -//CKK_ Key type - -//attributes(operation, keytype, keyalgorithm) = { -// name1 = value1 -// [...] -//} - -name=nameProvider -library=library.dll -slotListIndex=0 +name=OpenDNSSEC +library = /usr/lib/softhsm/libsofthsm.so +slot = 0 +attributes(generate, *, *) = { + CKA_TOKEN = true +} +attributes(generate, CKO_CERTIFICATE, *) = { + CKA_PRIVATE = false +} +attributes(generate, CKO_PUBLIC_KEY, *) = { + CKA_PRIVATE = false +} attributes(*,CKO_PUBLIC_KEY,CKK_RSA)={ CKA_VERIFY=true } -- cgit v1.2.3 From 9f2beccee247fb30235aeae28ecb91789e39cbe3 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Tue, 11 Aug 2015 13:26:30 +0200 Subject: approved some more changes --- id/server/stork2-saml-engine/pom.xml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'id/server/stork2-saml-engine') diff --git a/id/server/stork2-saml-engine/pom.xml b/id/server/stork2-saml-engine/pom.xml index 36df747e4..590e8f4c3 100644 --- a/id/server/stork2-saml-engine/pom.xml +++ b/id/server/stork2-saml-engine/pom.xml @@ -13,7 +13,7 @@ STORKSAMLEngine UTF-8 - 1.4.0 + 1.5.1 0.5.2 0.5.1 1.4.0 @@ -49,17 +49,12 @@ eu.stork Commons ${commons.version} - org.opensaml opensaml + ${opensaml.version} org.slf4j -- cgit v1.2.3 From 7d6f5207275778350bff8f23087fe1c905210e2b Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Tue, 11 Aug 2015 13:38:53 +0200 Subject: accepted complex attributes xsd --- .../src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java | 1 + 1 file changed, 1 insertion(+) (limited to 'id/server/stork2-saml-engine') diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java index c0197b9db..e513c6add 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java @@ -14,6 +14,7 @@ */ package eu.stork.peps.configuration; +import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.HashMap; -- cgit v1.2.3 From 04381eb4e2d67ced539b34747403bb06cdf36c53 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Tue, 11 Aug 2015 14:30:07 +0200 Subject: poms --- id/server/stork2-saml-engine/pom.xml | 39 ++++++++---------------------------- 1 file changed, 8 insertions(+), 31 deletions(-) (limited to 'id/server/stork2-saml-engine') diff --git a/id/server/stork2-saml-engine/pom.xml b/id/server/stork2-saml-engine/pom.xml index 590e8f4c3..4effa9d1c 100644 --- a/id/server/stork2-saml-engine/pom.xml +++ b/id/server/stork2-saml-engine/pom.xml @@ -16,8 +16,7 @@ 1.5.1 0.5.2 0.5.1 - 1.4.0 - 2.6.2 + 1.5.1 ${maven.build.timestamp} ${basedir}/../../../repository @@ -50,11 +49,16 @@ Commons ${commons.version} + + + org.opensaml + xmltooling + + org.opensaml opensaml - ${opensaml.version} org.slf4j @@ -83,11 +87,6 @@ - - org.opensaml - xmltooling - - org.slf4j slf4j-api @@ -101,10 +100,9 @@ org.slf4j jcl-over-slf4j - org.slf4j @@ -148,30 +146,9 @@ true - - - - org.apache.maven.plugins maven-source-plugin -- cgit v1.2.3