You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2011/12/15 16:22:10 UTC
svn commit: r1214808 - in /cxf/trunk/systests/ws-security-examples/src/test:
java/org/apache/cxf/systest/wssec/examples/saml/
resources/org/apache/cxf/systest/wssec/examples/saml/
resources/org/apache/cxf/systest/wssec/examples/saml/client/ resources/o...
Author: coheigea
Date: Thu Dec 15 15:22:09 2011
New Revision: 1214808
URL: http://svn.apache.org/viewvc?rev=1214808&view=rev
Log:
Adding some more SAML ws-security-example tests
Modified:
cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlTokenTest.java
cxf/trunk/systests/ws-security-examples/src/test/resources/org/apache/cxf/systest/wssec/examples/saml/DoubleItSaml.wsdl
cxf/trunk/systests/ws-security-examples/src/test/resources/org/apache/cxf/systest/wssec/examples/saml/client/client.xml
cxf/trunk/systests/ws-security-examples/src/test/resources/org/apache/cxf/systest/wssec/examples/saml/server/server.xml
Modified: cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlTokenTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlTokenTest.java?rev=1214808&r1=1214807&r2=1214808&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlTokenTest.java (original)
+++ cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlTokenTest.java Thu Dec 15 15:22:09 2011
@@ -124,4 +124,96 @@ public class SamlTokenTest extends Abstr
samlPort.doubleIt(25);
}
+ /**
+ * 2.3.1.4 (WSS1.0) SAML1.1 Sender Vouches with X.509 Certificates, Sign, Optional Encrypt
+ */
+ @org.junit.Test
+ public void testAsymmetricSigned() throws Exception {
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = SamlTokenTest.class.getResource("client/client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = SamlTokenTest.class.getResource("DoubleItSaml.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSignedPort");
+ DoubleItPortType samlPort =
+ service.getPort(portQName, DoubleItPortType.class);
+ updateAddressPort(samlPort, PORT);
+
+ samlPort.doubleIt(25);
+ }
+
+ /**
+ * 2.3.1.5 (WSS1.0) SAML1.1 Holder of Key, Sign, Optional Encrypt
+ */
+ @org.junit.Test
+ public void testAsymmetricInitiator() throws Exception {
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = SamlTokenTest.class.getResource("client/client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = SamlTokenTest.class.getResource("DoubleItSaml.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricInitiatorPort");
+ DoubleItPortType samlPort =
+ service.getPort(portQName, DoubleItPortType.class);
+ updateAddressPort(samlPort, PORT);
+
+ samlPort.doubleIt(25);
+ }
+
+
+ /**
+ * 2.3.2.1 (WSS1.1) SAML 2.0 Bearer
+ */
+ @org.junit.Test
+ public void testAsymmetricSaml2Bearer() throws Exception {
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = SamlTokenTest.class.getResource("client/client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = SamlTokenTest.class.getResource("DoubleItSaml.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSaml2BearerPort");
+ DoubleItPortType samlPort =
+ service.getPort(portQName, DoubleItPortType.class);
+ updateAddressPort(samlPort, PORT);
+
+ samlPort.doubleIt(25);
+ }
+
+ /**
+ * 2.3.2.2 (WSS1.1) SAML2.0 Sender Vouches over SSL
+ */
+ @org.junit.Test
+ public void testTLSSenderVouchesSaml2() throws Exception {
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = SamlTokenTest.class.getResource("client/client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = SamlTokenTest.class.getResource("DoubleItSaml.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItTLSSenderVouchesSaml2Port");
+ DoubleItPortType samlPort =
+ service.getPort(portQName, DoubleItPortType.class);
+ updateAddressPort(samlPort, PORT2);
+
+ samlPort.doubleIt(25);
+ }
}
Modified: cxf/trunk/systests/ws-security-examples/src/test/resources/org/apache/cxf/systest/wssec/examples/saml/DoubleItSaml.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security-examples/src/test/resources/org/apache/cxf/systest/wssec/examples/saml/DoubleItSaml.wsdl?rev=1214808&r1=1214807&r2=1214808&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security-examples/src/test/resources/org/apache/cxf/systest/wssec/examples/saml/DoubleItSaml.wsdl (original)
+++ cxf/trunk/systests/ws-security-examples/src/test/resources/org/apache/cxf/systest/wssec/examples/saml/DoubleItSaml.wsdl Thu Dec 15 15:22:09 2011
@@ -84,6 +84,82 @@
</wsdl:operation>
</wsdl:binding>
+ <wsdl:binding name="DoubleItAsymmetricSignedBinding" type="tns:DoubleItPortType">
+ <wsp:PolicyReference URI="#DoubleItAsymmetricSignedPolicy" />
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="DoubleIt">
+ <soap:operation soapAction="" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Input_Policy"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Output_Policy"/>
+ </wsdl:output>
+ <wsdl:fault name="DoubleItFault">
+ <soap:body use="literal" name="DoubleItFault" />
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:binding name="DoubleItAsymmetricInitiatorBinding" type="tns:DoubleItPortType">
+ <wsp:PolicyReference URI="#DoubleItAsymmetricInitiatorPolicy" />
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="DoubleIt">
+ <soap:operation soapAction="" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Input_Policy"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Output_Policy"/>
+ </wsdl:output>
+ <wsdl:fault name="DoubleItFault">
+ <soap:body use="literal" name="DoubleItFault" />
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:binding name="DoubleItAsymmetricSaml2BearerBinding" type="tns:DoubleItPortType">
+ <wsp:PolicyReference URI="#DoubleItAsymmetricSaml2BearerPolicy" />
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="DoubleIt">
+ <soap:operation soapAction="" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ <wsdl:fault name="DoubleItFault">
+ <soap:body use="literal" name="DoubleItFault" />
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:binding name="DoubleItTLSSenderVouchesSaml2Binding" type="tns:DoubleItPortType">
+ <wsp:PolicyReference URI="#DoubleItTLSSenderVouchesSaml2Policy" />
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="DoubleIt">
+ <soap:operation soapAction="" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ <wsdl:fault name="DoubleItFault">
+ <soap:body use="literal" name="DoubleItFault" />
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+
<wsdl:service name="DoubleItService">
<wsdl:port name="DoubleItBearerPort" binding="tns:DoubleItBearerBinding">
<soap:address location="http://localhost:9009/DoubleItSamlBearer" />
@@ -94,6 +170,18 @@
<wsdl:port name="DoubleItTLSHOKSignedEndorsingPort" binding="tns:DoubleItTLSHOKSignedEndorsingBinding">
<soap:address location="https://localhost:9010/DoubleItSamlTLSHOKSignedEndorsing" />
</wsdl:port>
+ <wsdl:port name="DoubleItAsymmetricSignedPort" binding="tns:DoubleItAsymmetricSignedBinding">
+ <soap:address location="http://localhost:9009/DoubleItSamlAsymmetricSigned" />
+ </wsdl:port>
+ <wsdl:port name="DoubleItAsymmetricInitiatorPort" binding="tns:DoubleItAsymmetricInitiatorBinding">
+ <soap:address location="http://localhost:9009/DoubleItSamlAsymmetricInitiator" />
+ </wsdl:port>
+ <wsdl:port name="DoubleItAsymmetricSaml2BearerPort" binding="tns:DoubleItAsymmetricSaml2BearerBinding">
+ <soap:address location="http://localhost:9009/DoubleItSamlAsymmetricSaml2Bearer" />
+ </wsdl:port>
+ <wsdl:port name="DoubleItTLSSenderVouchesSaml2Port" binding="tns:DoubleItTLSSenderVouchesSaml2Binding">
+ <soap:address location="https://localhost:9010/DoubleItSamlTLSSenderVouchesSaml2" />
+ </wsdl:port>
</wsdl:service>
<!-- 2.3.1.1 (WSS1.0) SAML1.1 Assertion (Bearer) -->
@@ -186,10 +274,218 @@
</sp:SignedEndorsingSupportingTokens>
</wsp:Policy>
+ <!-- 2.3.1.4 (WSS1.0) SAML1.1 Sender Vouches with X.509 Certificates, Sign, Optional Encrypt -->
+ <wsp:Policy wsu:Id="DoubleItAsymmetricSignedPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding>
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10 />
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10 />
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10>
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedSupportingTokens>
+ <wsp:Policy>
+ <sp:SamlToken
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssSamlV11Token10/>
+ </wsp:Policy>
+ </sp:SamlToken>
+ </wsp:Policy>
+ </sp:SignedSupportingTokens>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+ <!-- 2.3.1.5 (WSS1.0) SAML1.1 Holder of Key, Sign, Optional Encrypt -->
+ <wsp:Policy wsu:Id="DoubleItAsymmetricInitiatorPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding>
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:SamlToken
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssSamlV11Token10/>
+ </wsp:Policy>
+ </sp:SamlToken>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10 />
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10>
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ </wsp:Policy>
+ </sp:Wss10>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+ <!-- 2.3.2.1 (WSS1.1) SAML 2.0 Bearer -->
+ <wsp:Policy wsu:Id="DoubleItAsymmetricSaml2BearerPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding>
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10 />
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss11>
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ <sp:MustSupportRefThumbprint/>
+ <sp:MustSupportRefEncryptedKey/>
+ </wsp:Policy>
+ </sp:Wss11>
+ <sp:SupportingTokens>
+ <wsp:Policy>
+ <sp:SamlToken
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssSamlV20Token11/>
+ </wsp:Policy>
+ </sp:SamlToken>
+ </wsp:Policy>
+ </sp:SupportingTokens>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+ <!-- 2.3.2.2 (WSS1.1) SAML2.0 Sender Vouches over SSL -->
+ <wsp:Policy wsu:Id="DoubleItTLSSenderVouchesSaml2Policy">
+ <sp:TransportBinding>
+ <wsp:Policy>
+ <sp:TransportToken>
+ <wsp:Policy>
+ <sp:HttpsToken>
+ <wsp:Policy>
+ <sp:RequireClientCertificate/>
+ </wsp:Policy>
+ </sp:HttpsToken>
+ </wsp:Policy>
+ </sp:TransportToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128 />
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict />
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp />
+ </wsp:Policy>
+ </sp:TransportBinding>
+ <sp:SignedSupportingTokens>
+ <wsp:Policy>
+ <sp:SamlToken
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssSamlV20Token11/>
+ </wsp:Policy>
+ </sp:SamlToken>
+ </wsp:Policy>
+ </sp:SignedSupportingTokens>
+ </wsp:Policy>
+
<wsp:Policy wsu:Id="DoubleItBinding_DoubleIt_Input_Policy">
<wsp:ExactlyOne>
<wsp:All>
- <sp:EncryptedParts>
+ <sp:EncryptedParts wsp:Optional="true">
<sp:Body/>
</sp:EncryptedParts>
<sp:SignedParts>
Modified: cxf/trunk/systests/ws-security-examples/src/test/resources/org/apache/cxf/systest/wssec/examples/saml/client/client.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security-examples/src/test/resources/org/apache/cxf/systest/wssec/examples/saml/client/client.xml?rev=1214808&r1=1214807&r2=1214808&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security-examples/src/test/resources/org/apache/cxf/systest/wssec/examples/saml/client/client.xml (original)
+++ cxf/trunk/systests/ws-security-examples/src/test/resources/org/apache/cxf/systest/wssec/examples/saml/client/client.xml Thu Dec 15 15:22:09 2011
@@ -54,11 +54,6 @@
</jaxws:properties>
</jaxws:client>
- <bean id="saml1SenderVouchesHandler"
- class="org.apache.cxf.systest.wssec.examples.saml.SamlCallbackHandler">
- <property name="confirmationMethod" value="urn:oasis:names:tc:SAML:1.0:cm:sender-vouches"/>
- </bean>
-
<jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItTLSHOKSignedEndorsingPort"
createdFromAPI="true">
<jaxws:properties>
@@ -71,11 +66,75 @@
</jaxws:properties>
</jaxws:client>
+ <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItAsymmetricSignedPort"
+ createdFromAPI="true">
+ <jaxws:properties>
+ <entry key="ws-security.saml-callback-handler" value-ref="saml1SenderVouchesHandler"/>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.wssec.examples.common.CommonPasswordCallback"/>
+ <entry key="ws-security.signature.properties" value="alice.properties"/>
+ <entry key="ws-security.signature.username" value="alice"/>
+ <entry key="ws-security.encryption.properties" value="bob.properties"/>
+ <entry key="ws-security.encryption.username" value="bob"/>
+ </jaxws:properties>
+ </jaxws:client>
+
+ <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItAsymmetricInitiatorPort"
+ createdFromAPI="true">
+ <jaxws:properties>
+ <entry key="ws-security.saml-callback-handler" value-ref="saml1HOKHandler"/>
+ <entry key="ws-security.self-sign-saml-assertion" value="true"/>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.wssec.examples.common.CommonPasswordCallback"/>
+ <entry key="ws-security.signature.properties" value="alice.properties"/>
+ <entry key="ws-security.signature.username" value="alice"/>
+ <entry key="ws-security.encryption.properties" value="bob.properties"/>
+ <entry key="ws-security.encryption.username" value="bob"/>
+ </jaxws:properties>
+ </jaxws:client>
+
+ <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItAsymmetricSaml2BearerPort"
+ createdFromAPI="true">
+ <jaxws:properties>
+ <entry key="ws-security.saml-callback-handler" value-ref="saml2BearerHandler"/>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.wssec.examples.common.CommonPasswordCallback"/>
+ <entry key="ws-security.signature.properties" value="alice.properties"/>
+ <entry key="ws-security.signature.username" value="alice"/>
+ <entry key="ws-security.encryption.properties" value="bob.properties"/>
+ <entry key="ws-security.encryption.username" value="bob"/>
+ </jaxws:properties>
+ </jaxws:client>
+
+ <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItTLSSenderVouchesSaml2Port"
+ createdFromAPI="true">
+ <jaxws:properties>
+ <entry key="ws-security.saml-callback-handler" value-ref="saml2SenderVouchesHandler"/>
+ </jaxws:properties>
+ </jaxws:client>
+
+ <bean id="saml1SenderVouchesHandler"
+ class="org.apache.cxf.systest.wssec.examples.saml.SamlCallbackHandler">
+ <property name="confirmationMethod" value="urn:oasis:names:tc:SAML:1.0:cm:sender-vouches"/>
+ </bean>
+
+ <bean id="saml2SenderVouchesHandler"
+ class="org.apache.cxf.systest.wssec.examples.saml.SamlCallbackHandler">
+ <property name="confirmationMethod" value="urn:oasis:names:tc:SAML:2.0:cm:sender-vouches"/>
+ <property name="saml2" value="true"/>
+ </bean>
+
<bean id="saml1HOKHandler"
class="org.apache.cxf.systest.wssec.examples.saml.SamlCallbackHandler">
<property name="confirmationMethod" value="urn:oasis:names:tc:SAML:1.0:cm:holder-of-key"/>
</bean>
+ <bean id="saml2BearerHandler"
+ class="org.apache.cxf.systest.wssec.examples.saml.SamlCallbackHandler">
+ <property name="confirmationMethod" value="urn:oasis:names:tc:SAML:2.0:cm:bearer"/>
+ <property name="saml2" value="true"/>
+ </bean>
+
<http:conduit name="https://localhost:.*">
<http:tlsClientParameters disableCNCheck="true">
<sec:keyManagers keyPassword="password">
Modified: cxf/trunk/systests/ws-security-examples/src/test/resources/org/apache/cxf/systest/wssec/examples/saml/server/server.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security-examples/src/test/resources/org/apache/cxf/systest/wssec/examples/saml/server/server.xml?rev=1214808&r1=1214807&r2=1214808&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security-examples/src/test/resources/org/apache/cxf/systest/wssec/examples/saml/server/server.xml (original)
+++ cxf/trunk/systests/ws-security-examples/src/test/resources/org/apache/cxf/systest/wssec/examples/saml/server/server.xml Thu Dec 15 15:22:09 2011
@@ -82,6 +82,70 @@
</jaxws:properties>
</jaxws:endpoint>
+ <jaxws:endpoint
+ id="AsymmetricSigned"
+ address="http://localhost:${testutil.ports.Server}/DoubleItSamlAsymmetricSigned"
+ serviceName="s:DoubleItService"
+ endpointName="s:DoubleItAsymmetricSignedPort"
+ xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.wssec.examples.common.DoubleItPortTypeImpl"
+ wsdlLocation="org/apache/cxf/systest/wssec/examples/saml/DoubleItSaml.wsdl">
+ <jaxws:properties>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.wssec.examples.common.CommonPasswordCallback"/>
+ <entry key="ws-security.signature.properties" value="bob.properties"/>
+ <entry key="ws-security.encryption.properties" value="alice.properties"/>
+ <entry key="ws-security.encryption.username" value="alice"/>
+ </jaxws:properties>
+ </jaxws:endpoint>
+
+ <jaxws:endpoint
+ id="AsymmetricInitiator"
+ address="http://localhost:${testutil.ports.Server}/DoubleItSamlAsymmetricInitiator"
+ serviceName="s:DoubleItService"
+ endpointName="s:DoubleItAsymmetricInitiatorPort"
+ xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.wssec.examples.common.DoubleItPortTypeImpl"
+ wsdlLocation="org/apache/cxf/systest/wssec/examples/saml/DoubleItSaml.wsdl">
+ <jaxws:properties>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.wssec.examples.common.CommonPasswordCallback"/>
+ <entry key="ws-security.signature.properties" value="bob.properties"/>
+ <entry key="ws-security.encryption.properties" value="alice.properties"/>
+ <entry key="ws-security.encryption.username" value="alice"/>
+ </jaxws:properties>
+ </jaxws:endpoint>
+
+ <jaxws:endpoint
+ id="AsymmetricSaml2Bearer"
+ address="http://localhost:${testutil.ports.Server}/DoubleItSamlAsymmetricSaml2Bearer"
+ serviceName="s:DoubleItService"
+ endpointName="s:DoubleItAsymmetricSaml2BearerPort"
+ xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.wssec.examples.common.DoubleItPortTypeImpl"
+ wsdlLocation="org/apache/cxf/systest/wssec/examples/saml/DoubleItSaml.wsdl">
+ <jaxws:properties>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.wssec.examples.common.CommonPasswordCallback"/>
+ <entry key="ws-security.signature.properties" value="bob.properties"/>
+ <entry key="ws-security.encryption.properties" value="alice.properties"/>
+ <entry key="ws-security.encryption.username" value="alice"/>
+ </jaxws:properties>
+ </jaxws:endpoint>
+
+ <jaxws:endpoint
+ id="TLSSenderVouchesSaml2"
+ address="https://localhost:${testutil.ports.Server.2}/DoubleItSamlTLSSenderVouchesSaml2"
+ serviceName="s:DoubleItService"
+ endpointName="s:DoubleItTLSSenderVouchesSaml2Port"
+ xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.wssec.examples.common.DoubleItPortTypeImpl"
+ wsdlLocation="org/apache/cxf/systest/wssec/examples/saml/DoubleItSaml.wsdl"
+ depends-on="tls-settings">
+ <jaxws:properties>
+ </jaxws:properties>
+ </jaxws:endpoint>
+
<!-- -->
<!-- Any services listening on port ${testutil.ports.Server} must use the following -->
<!-- Transport Layer Security (TLS) settings -->