Author: alessio.soldano(a)jboss.com
Date: 2012-05-08 10:28:21 -0400 (Tue, 08 May 2012)
New Revision: 16239
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/PicketLinkSTService.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestUtils.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/picketlink-sts.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/PicketLinkSTS.wsdl
Removed:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trustPicketLink/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trustPicketLink/
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase.java
Log:
[JBWS-3493] Refactoring WS-Trust testcases to remove duplications
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml 2012-05-08
13:40:09 UTC (rev 16238)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml 2012-05-08
14:28:21 UTC (rev 16239)
@@ -258,14 +258,14 @@
<war
warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-trustPicketLink-sts.war"
needxmlfile='false'>
<classes dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/wsse/policy/trustPicketLink/PicketLinkSTService.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/wsse/policy/trustPicketLink/STSCallbackHandler.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/policy/trust/PicketLinkSTService.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/policy/trust/STSCallbackHandler.class"/>
</classes>
- <webinf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/trustPicketLink/WEB-INF">
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/trust/WEB-INF">
<include name="wsdl/PicketLinkSTS.wsdl"/>
<include name="jboss-web.xml"/>
</webinf>
- <zipfileset
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/trustPicketLink/WEB-INF"
prefix="WEB-INF/classes">
+ <zipfileset
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/trust/WEB-INF"
prefix="WEB-INF/classes">
<include name="stsstore.jks" />
<include name="picketlink-sts.xml" />
<include name="stsKeystore.properties" />
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/PicketLinkSTService.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/PicketLinkSTService.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/PicketLinkSTService.java 2012-05-08
14:28:21 UTC (rev 16239)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.wsse.policy.trust;
+
+import javax.annotation.Resource;
+import javax.xml.ws.Service;
+import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.WebServiceProvider;
+
+import org.apache.cxf.annotations.EndpointProperties;
+import org.apache.cxf.annotations.EndpointProperty;
+import org.apache.cxf.interceptor.InInterceptors;
+import org.picketlink.identity.federation.core.wstrust.PicketLinkSTS;
+
+/**
+ * A Security Token Service implementation extending default PicketLink one
+ *
+ * @author <a href="mailto:sguilhen@redhat.com">Stefan Guilhen</a>
+ * @author <a href="mailto:pskopek@redhat.com">Peter Skopek</a>
+ * @author <a href="mailto:alessio.soldano@jboss.com">Alessio
Soldano</a>
+ */
+@WebServiceProvider(serviceName = "PicketLinkSTS", portName =
"PicketLinkSTSPort", targetNamespace =
"urn:picketlink:identity-federation:sts", wsdlLocation =
"WEB-INF/wsdl/PicketLinkSTS.wsdl")
+@ServiceMode(value = Service.Mode.MESSAGE)
+//be sure to have dependency on org.apache.cxf module when on AS7, otherwise Apache CXF
annotations are ignored
+@EndpointProperties(value = {
+ @EndpointProperty(key = "ws-security.signature.username", value =
"mystskey"),
+ @EndpointProperty(key = "ws-security.signature.properties", value =
"stsKeystore.properties"),
+ @EndpointProperty(key = "ws-security.callback-handler", value =
"org.jboss.test.ws.jaxws.samples.wsse.policy.trust.STSCallbackHandler")
+})
+@InInterceptors(interceptors =
{"org.jboss.wsf.stack.cxf.security.authentication.SubjectCreatingPolicyInterceptor"})
+public class PicketLinkSTService extends PicketLinkSTS
+{
+ @Resource
+ public void setWSC(WebServiceContext wctx) {
+ this.context = wctx;
+ }
+
+}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase.java 2012-05-08
14:28:21 UTC (rev 16239)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.wsse.policy.trust;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * WS-Trust test case using PicketLink implementation of STS
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 30-Apr-2012
+ */
+public final class WSTrustPicketLinkTestCase extends JBossWSTest
+{
+ private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-policy-trust/SecurityService";
+ private final String stsURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-policy-trustPicketLink-sts/PicketLinkSTS";
+
+ public static Test suite()
+ {
+ //deploy client, STS and service; start a security domain to be used by the STS for
authenticating client
+ return WSTrustTestUtils.getTestSetup(WSTrustPicketLinkTestCase.class,
+ "jaxws-samples-wsse-policy-trust-client.jar
jaxws-samples-wsse-policy-trustPicketLink-sts.war
jaxws-samples-wsse-policy-trust.war");
+ }
+
+ public void test() throws Exception
+ {
+ Bus bus = BusFactory.newInstance().createBus();
+ try
+ {
+ BusFactory.setThreadDefaultBus(bus);
+
+ final QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
"SecurityService");
+ final URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ ServiceIface proxy = (ServiceIface) service.getPort(ServiceIface.class);
+
+ final QName stsServiceName = new
QName("urn:picketlink:identity-federation:sts", "PicketLinkSTS");
+ final QName stsPortName = new
QName("urn:picketlink:identity-federation:sts", "PicketLinkSTSPort");
+ WSTrustTestUtils.setupWsse(proxy, bus, stsURL + "?wsdl",
stsServiceName, stsPortName);
+
+ assertEquals("WS-Trust Hello World!", proxy.sayHello());
+ }
+ finally
+ {
+ bus.shutdown(true);
+ }
+ }
+}
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase.java 2012-05-08
13:40:09 UTC (rev 16238)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase.java 2012-05-08
14:28:21 UTC (rev 16239)
@@ -22,20 +22,14 @@
package org.jboss.test.ws.jaxws.samples.wsse.policy.trust;
import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
import junit.framework.Test;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
-import org.apache.cxf.ws.security.SecurityConstants;
-import org.apache.cxf.ws.security.trust.STSClient;
-import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
/**
@@ -46,7 +40,7 @@
* @author alessio.soldano(a)jboss.com
* @since 08-Feb-2012
*/
-public final class WSTrustTestCase extends JBossWSTest
+public class WSTrustTestCase extends JBossWSTest
{
private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-policy-trust/SecurityService";
private final String stsURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-policy-trust-sts/SecurityTokenService";
@@ -54,18 +48,10 @@
public static Test suite()
{
//deploy client, STS and service; start a security domain to be used by the STS for
authenticating client
- JBossWSCXFTestSetup testSetup = new JBossWSCXFTestSetup(
- WSTrustTestCase.class, "jaxws-samples-wsse-policy-trust-client.jar
jaxws-samples-wsse-policy-trust-sts.war jaxws-samples-wsse-policy-trust.war");
- Map<String, String> authenticationOptions = new HashMap<String,
String>();
- authenticationOptions.put("usersProperties",
-
getResourceFile("jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-users.properties").getAbsolutePath());
- authenticationOptions.put("rolesProperties",
-
getResourceFile("jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-roles.properties").getAbsolutePath());
- authenticationOptions.put("unauthenticatedIdentity",
"anonymous");
- testSetup.addSecurityDomainRequirement("JBossWS-trust-sts",
authenticationOptions);
- return testSetup;
+ return WSTrustTestUtils.getTestSetup(WSTrustTestCase.class,
+ "jaxws-samples-wsse-policy-trust-client.jar
jaxws-samples-wsse-policy-trust-sts.war jaxws-samples-wsse-policy-trust.war");
}
-
+
public void test() throws Exception
{
Bus bus = BusFactory.newInstance().createBus();
@@ -73,11 +59,15 @@
{
BusFactory.setThreadDefaultBus(bus);
- QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
"SecurityService");
- URL wsdlURL = new URL(serviceURL + "?wsdl");
+ final QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
"SecurityService");
+ final URL wsdlURL = new URL(serviceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface) service.getPort(ServiceIface.class);
- setupWsse(proxy, bus);
+
+ final QName stsServiceName = new
QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512/",
"SecurityTokenService");
+ final QName stsPortName = new
QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512/",
"UT_Port");
+ WSTrustTestUtils.setupWsse(proxy, bus, stsURL + "?wsdl",
stsServiceName, stsPortName);
+
assertEquals("WS-Trust Hello World!", proxy.sayHello());
}
finally
@@ -85,27 +75,4 @@
bus.shutdown(true);
}
}
-
- private void setupWsse(ServiceIface proxy, Bus bus)
- {
- Map<String, Object> ctx = ((BindingProvider) proxy).getRequestContext();
- ctx.put(SecurityConstants.CALLBACK_HANDLER, new ClientCallbackHandler());
- ctx.put(SecurityConstants.SIGNATURE_PROPERTIES,
Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
- ctx.put(SecurityConstants.ENCRYPT_PROPERTIES,
Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
- ctx.put(SecurityConstants.SIGNATURE_USERNAME, "myclientkey");
- ctx.put(SecurityConstants.ENCRYPT_USERNAME, "myservicekey");
- STSClient stsClient = new STSClient(bus);
- stsClient.setWsdlLocation(stsURL + "?wsdl");
- stsClient.setServiceQName(new
QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512/",
"SecurityTokenService"));
- stsClient.setEndpointQName(new
QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512/",
"UT_Port"));
- Map<String, Object> props = stsClient.getProperties();
- props.put(SecurityConstants.USERNAME, "alice");
- props.put(SecurityConstants.CALLBACK_HANDLER, new ClientCallbackHandler());
- props.put(SecurityConstants.ENCRYPT_PROPERTIES,
Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
- props.put(SecurityConstants.ENCRYPT_USERNAME, "mystskey");
- props.put(SecurityConstants.STS_TOKEN_USERNAME, "myclientkey");
- props.put(SecurityConstants.STS_TOKEN_PROPERTIES,
Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
- props.put(SecurityConstants.STS_TOKEN_USE_CERT_FOR_KEYINFO, "true");
- ctx.put(SecurityConstants.STS_CLIENT, stsClient);
- }
}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestUtils.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestUtils.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestUtils.java 2012-05-08
14:28:21 UTC (rev 16239)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.wsse.policy.trust;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.ws.security.SecurityConstants;
+import org.apache.cxf.ws.security.trust.STSClient;
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTestHelper;
+
+/**
+ * Some client util methods for WS-Trust testcases
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 08-May-2012
+ */
+public class WSTrustTestUtils
+{
+ public static JBossWSCXFTestSetup getTestSetup(Class<?> testClass, String
archives) {
+ JBossWSCXFTestSetup testSetup = new JBossWSCXFTestSetup(testClass, archives);
+ Map<String, String> authenticationOptions = new HashMap<String,
String>();
+ authenticationOptions.put("usersProperties",
+
JBossWSTestHelper.getResourceFile("jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-users.properties").getAbsolutePath());
+ authenticationOptions.put("rolesProperties",
+
JBossWSTestHelper.getResourceFile("jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-roles.properties").getAbsolutePath());
+ authenticationOptions.put("unauthenticatedIdentity",
"anonymous");
+ testSetup.addSecurityDomainRequirement("JBossWS-trust-sts",
authenticationOptions);
+ return testSetup;
+ }
+
+ public static void setupWsse(ServiceIface proxy, Bus bus, String stsWsdlLocation,
QName stsService, QName stsPort)
+ {
+ Map<String, Object> ctx = ((BindingProvider) proxy).getRequestContext();
+ ctx.put(SecurityConstants.CALLBACK_HANDLER, new ClientCallbackHandler());
+ ctx.put(SecurityConstants.SIGNATURE_PROPERTIES,
Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
+ ctx.put(SecurityConstants.ENCRYPT_PROPERTIES,
Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
+ ctx.put(SecurityConstants.SIGNATURE_USERNAME, "myclientkey");
+ ctx.put(SecurityConstants.ENCRYPT_USERNAME, "myservicekey");
+ STSClient stsClient = new STSClient(bus);
+ stsClient.setWsdlLocation(stsWsdlLocation);
+ stsClient.setServiceQName(stsService);
+ stsClient.setEndpointQName(stsPort);
+ Map<String, Object> props = stsClient.getProperties();
+ props.put(SecurityConstants.USERNAME, "alice");
+ props.put(SecurityConstants.CALLBACK_HANDLER, new ClientCallbackHandler());
+ props.put(SecurityConstants.ENCRYPT_PROPERTIES,
Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
+ props.put(SecurityConstants.ENCRYPT_USERNAME, "mystskey");
+ props.put(SecurityConstants.STS_TOKEN_USERNAME, "myclientkey");
+ props.put(SecurityConstants.STS_TOKEN_PROPERTIES,
Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
+ props.put(SecurityConstants.STS_TOKEN_USE_CERT_FOR_KEYINFO, "true");
+ ctx.put(SecurityConstants.STS_CLIENT, stsClient);
+ }
+}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/picketlink-sts.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/picketlink-sts.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/picketlink-sts.xml 2012-05-08
14:28:21 UTC (rev 16239)
@@ -0,0 +1,20 @@
+<PicketLinkSTS xmlns="urn:picketlink:identity-federation:config:1.0"
+ STSName="PicketLinkSTS" TokenTimeout="7200"
EncryptToken="false">
+ <KeyProvider
ClassName="org.picketlink.identity.federation.core.impl.KeyStoreKeyManager">
+ <Auth Key="KeyStoreURL" Value="stsstore.jks"/>
+ <Auth Key="KeyStorePass" Value="stsspass"/>
+ <Auth Key="SigningKeyAlias" Value="mystskey"/>
+ <Auth Key="SigningKeyPass" Value="stskpass"/>
+ <ValidatingAlias
Key="http://localhost:8080/jaxws-samples-wsse-policy-trust/SecurityService"
Value="myservicekey"/>
+ </KeyProvider>
+ <TokenProviders>
+ <TokenProvider
ProviderClass="org.picketlink.identity.federation.core.wstrust.plugins.saml.SAML11TokenProvider"
+
TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profi...
+ TokenElement="Assertion"
+ TokenElementNS="urn:oasis:names:tc:SAML:1.0:assertion"/>
+ <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>
+</PicketLinkSTS>
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/PicketLinkSTS.wsdl
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/PicketLinkSTS.wsdl
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/PicketLinkSTS.wsdl 2012-05-08
14:28:21 UTC (rev 16239)
@@ -0,0 +1,181 @@
+<?xml version="1.0"?>
+<wsdl:definitions name="PicketLinkSTS"
targetNamespace="urn:picketlink:identity-federation:sts"
+ xmlns:tns="urn:picketlink:identity-federation:sts"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:wsap10="http://www.w3.org/2006/05/addressing/wsdl"
+
xmlns:wsp="http://www.w3.org/ns/ws-policy"
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
+ <wsdl:types>
+ <xs:schema targetNamespace="urn:picketlink:identity-federation:sts"
+ xmlns:tns="urn:picketlink:identity-federation:sts"
+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ version="1.0" elementFormDefault="qualified">
+ <xs:element name="MessageBody">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:any minOccurs="0" maxOccurs="unbounded"
namespace="##any"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:schema>
+ </wsdl:types>
+ <wsdl:message name="RequestSecurityToken">
+ <wsdl:part name="rstMessage" element="tns:MessageBody"/>
+ </wsdl:message>
+ <wsdl:message name="RequestSecurityTokenResponse">
+ <wsdl:part name="rstrMessage" element="tns:MessageBody"/>
+ </wsdl:message>
+ <wsdl:portType name="SecureTokenService">
+ <wsdl:operation name="IssueToken">
+ <wsdl:input
wsap10:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/...
message="tns:RequestSecurityToken"/>
+ <wsdl:output
wsap10:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTR...
message="tns:RequestSecurityTokenResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="STSBinding"
type="tns:SecureTokenService">
+ <wsp:PolicyReference URI="#UT_policy" />
+ <soap12:binding
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="IssueToken">
+ <soap12:operation
soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Iss...
style="document"/>
+ <wsdl:input>
+ <wsp:PolicyReference URI="#Input_policy" />
+ <soap12:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <wsp:PolicyReference URI="#Output_policy" />
+ <soap12:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="PicketLinkSTS">
+ <wsdl:port name="PicketLinkSTSPort"
binding="tns:STSBinding">
+ <soap12:address
location="http://localhost:8080/picketlink-sts/PicketLinkSTS"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <wsp:Policy wsu:Id="UT_policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <wsap10:UsingAddressing/>
+ <sp:SymmetricBinding
+
xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702&...
+ <wsp:Policy>
+ <sp:ProtectionToken>
+ <wsp:Policy>
+ <sp:X509Token
+
sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/...
+ <wsp:Policy>
+ <sp:RequireDerivedKeys />
+ <sp:RequireThumbprintReference />
+ <sp:WssX509V3Token10 />
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:ProtectionToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256 />
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Lax />
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp />
+ <sp:EncryptSignature />
+ <sp:OnlySignEntireHeadersAndBody />
+ </wsp:Policy>
+ </sp:SymmetricBinding>
+ <sp:SignedSupportingTokens
+
xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702&...
+ <wsp:Policy>
+ <sp:UsernameToken
+
sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/...
+ <wsp:Policy>
+ <sp:WssUsernameToken10 />
+ </wsp:Policy>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:SignedSupportingTokens>
+ <sp:Wss11
+
xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702&...
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier />
+ <sp:MustSupportRefIssuerSerial />
+ <sp:MustSupportRefThumbprint />
+ <sp:MustSupportRefEncryptedKey />
+ </wsp:Policy>
+ </sp:Wss11>
+ <sp:Trust13
+
xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702&...
+ <wsp:Policy>
+ <sp:MustSupportIssuedTokens />
+ <sp:RequireClientEntropy />
+ <sp:RequireServerEntropy />
+ </wsp:Policy>
+ </sp:Trust13>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+ <wsp:Policy wsu:Id="Input_policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SignedParts
+
xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702&...
+ <sp:Body />
+ <sp:Header Name="To"
+
Namespace="http://www.w3.org/2005/08/addressing" />
+ <sp:Header Name="From"
+
Namespace="http://www.w3.org/2005/08/addressing" />
+ <sp:Header Name="FaultTo"
+
Namespace="http://www.w3.org/2005/08/addressing" />
+ <sp:Header Name="ReplyTo"
+
Namespace="http://www.w3.org/2005/08/addressing" />
+ <sp:Header Name="MessageID"
+
Namespace="http://www.w3.org/2005/08/addressing" />
+ <sp:Header Name="RelatesTo"
+
Namespace="http://www.w3.org/2005/08/addressing" />
+ <sp:Header Name="Action"
+
Namespace="http://www.w3.org/2005/08/addressing" />
+ </sp:SignedParts>
+ <sp:EncryptedParts
+
xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702&...
+ <sp:Body />
+ </sp:EncryptedParts>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+ <wsp:Policy wsu:Id="Output_policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SignedParts
+
xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702&...
+ <sp:Body />
+ <sp:Header Name="To"
+
Namespace="http://www.w3.org/2005/08/addressing" />
+ <sp:Header Name="From"
+
Namespace="http://www.w3.org/2005/08/addressing" />
+ <sp:Header Name="FaultTo"
+
Namespace="http://www.w3.org/2005/08/addressing" />
+ <sp:Header Name="ReplyTo"
+
Namespace="http://www.w3.org/2005/08/addressing" />
+ <sp:Header Name="MessageID"
+
Namespace="http://www.w3.org/2005/08/addressing" />
+ <sp:Header Name="RelatesTo"
+
Namespace="http://www.w3.org/2005/08/addressing" />
+ <sp:Header Name="Action"
+
Namespace="http://www.w3.org/2005/08/addressing" />
+ </sp:SignedParts>
+ <sp:EncryptedParts
+
xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702&...
+ <sp:Body />
+ </sp:EncryptedParts>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+</wsdl:definitions>