Author: anil.saldhana(a)jboss.com
Date: 2010-07-29 14:24:23 -0400 (Thu, 29 Jul 2010)
New Revision: 336
Added:
federation/trunk/picketlink-fed-core/src/test/resources/sts/picketlink-sts-xmldsig-Canonicalization.xml
Modified:
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/config/ConfigUnitTestCase.java
federation/trunk/picketlink-fed-core/src/test/resources/config/test-config-2.xml
federation/trunk/picketlink-fed-core/src/test/resources/config/test-config-3.xml
Log:
PLFED-91: make the canonicalization method for the xml dsig configurable
Modified:
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/config/ConfigUnitTestCase.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/config/ConfigUnitTestCase.java 2010-07-29
18:18:00 UTC (rev 335)
+++
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/config/ConfigUnitTestCase.java 2010-07-29
18:24:23 UTC (rev 336)
@@ -26,6 +26,7 @@
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Unmarshaller;
+import javax.xml.crypto.dsig.CanonicalizationMethod;
import junit.framework.TestCase;
@@ -83,6 +84,7 @@
assertEquals("20000", 20000L, idp.getAssertionValidity());
assertEquals("somefqn", idp.getRoleGenerator());
assertTrue(idp.isEncrypt());
+ assertEquals( CanonicalizationMethod.EXCLUSIVE , idp.getCanonicalizationMethod()
);
KeyProviderType kp = idp.getKeyProvider();
assertNotNull("KeyProvider is not null", kp);
assertEquals("SomeClass", "SomeClass", kp.getClassName());
@@ -123,6 +125,7 @@
SPType sp = ((JAXBElement<SPType>) object).getValue();
assertEquals("http://localhost:8080/idp", sp.getIdentityURL());
assertEquals("http://localhost:8080/sales", sp.getServiceURL());
+ assertEquals( CanonicalizationMethod.EXCLUSIVE , sp.getCanonicalizationMethod() );
}
/**
Modified:
federation/trunk/picketlink-fed-core/src/test/resources/config/test-config-2.xml
===================================================================
---
federation/trunk/picketlink-fed-core/src/test/resources/config/test-config-2.xml 2010-07-29
18:18:00 UTC (rev 335)
+++
federation/trunk/picketlink-fed-core/src/test/resources/config/test-config-2.xml 2010-07-29
18:24:23 UTC (rev 336)
@@ -1,7 +1,8 @@
<PicketLinkIDP xmlns="urn:picketlink:identity-federation:config:1.0"
AssertionValidity="20000"
RoleGenerator="somefqn"
- Encrypt="true">
+ Encrypt="true"
+
CanonicalizationMethod="http://www.w3.org/2001/10/xml-exc-c14n#"...
<IdentityURL>http://localhost:8080/idp</IdentityURL>
<Trust>
<Domains>localhost,jboss.com,jboss.org</Domains>
Modified:
federation/trunk/picketlink-fed-core/src/test/resources/config/test-config-3.xml
===================================================================
---
federation/trunk/picketlink-fed-core/src/test/resources/config/test-config-3.xml 2010-07-29
18:18:00 UTC (rev 335)
+++
federation/trunk/picketlink-fed-core/src/test/resources/config/test-config-3.xml 2010-07-29
18:24:23 UTC (rev 336)
@@ -1,4 +1,5 @@
-<PicketLinkSP xmlns="urn:picketlink:identity-federation:config:1.0">
+<PicketLinkSP xmlns="urn:picketlink:identity-federation:config:1.0"
+
CanonicalizationMethod="http://www.w3.org/2001/10/xml-exc-c14n#"...
<IdentityURL>http://localhost:8080/idp</IdentityURL>
<Trust>
<Domains>localhost,jboss.com,jboss.org</Domains>
Added:
federation/trunk/picketlink-fed-core/src/test/resources/sts/picketlink-sts-xmldsig-Canonicalization.xml
===================================================================
---
federation/trunk/picketlink-fed-core/src/test/resources/sts/picketlink-sts-xmldsig-Canonicalization.xml
(rev 0)
+++
federation/trunk/picketlink-fed-core/src/test/resources/sts/picketlink-sts-xmldsig-Canonicalization.xml 2010-07-29
18:24:23 UTC (rev 336)
@@ -0,0 +1,32 @@
+<PicketLinkSTS xmlns="urn:picketlink:identity-federation:config:1.0"
+ STSName="Test STS" TokenTimeout="7200"
EncryptToken="false"
+
CanonicalizationMethod="http://www.w3.org/2001/10/xml-exc-c14n#"...
+ <KeyProvider
ClassName="org.picketlink.identity.federation.core.impl.KeyStoreKeyManager">
+ <Auth Key="KeyStoreURL" Value="keystore/sts_keystore.jks"/>
+ <Auth Key="KeyStorePass" Value="testpass"/>
+ <Auth Key="SigningKeyAlias" Value="sts"/>
+ <Auth Key="SigningKeyPass" Value="keypass"/>
+ <ValidatingAlias
Key="http://services.testcorp.org/provider1"
Value="service1"/>
+ <ValidatingAlias
Key="http://services.testcorp.org/provider2"
Value="service2"/>
+ </KeyProvider>
+ <RequestHandler>org.picketlink.identity.federation.core.wstrust.StandardRequestHandler</RequestHandler>
+ <TokenProviders>
+ <TokenProvider
ProviderClass="org.picketlink.test.identity.federation.core.wstrust.SpecialTokenProvider"
+
TokenType="http://www.tokens.org/SpecialToken"
+ TokenElement="SpecialToken"
+ TokenElementNS="http://www.tokens.org">
+ <Property Key="Property1" Value="Value1"/>
+ <Property Key="Property2" Value="Value2"/>
+ </TokenProvider>
+ <TokenProvider
ProviderClass="org.picketlink.identity.federation.core.wstrust.plugins.saml.SAML20TokenProvider"
+
TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profi...
+ TokenElement="Assertion"
+ TokenElementNS="urn:oasis:names:tc:SAML:2.0:assertion"/>
+ </TokenProviders>
+ <ServiceProviders>
+ <ServiceProvider
Endpoint="http://services.testcorp.org/provider1"
TokenType="http://www.tokens.org/SpecialToken"
+ TruststoreAlias="service1"/>
+ <ServiceProvider
Endpoint="http://services.testcorp.org/provider2"
TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profi...
+ TruststoreAlias="service2"/>
+ </ServiceProviders>
+</PicketLinkSTS>
\ No newline at end of file