JBossWS SVN: r15630 - stack/cxf/branches/wstrust/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-10 12:08:41 -0500 (Fri, 10 Feb 2012)
New Revision: 15630
Modified:
stack/cxf/branches/wstrust/modules/testsuite/pom.xml
Log:
sync. ejb client
Modified: stack/cxf/branches/wstrust/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/pom.xml 2012-02-10 11:47:51 UTC (rev 15629)
+++ stack/cxf/branches/wstrust/modules/testsuite/pom.xml 2012-02-10 17:08:41 UTC (rev 15630)
@@ -1142,7 +1142,7 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-ejb-client</artifactId>
- <version>1.0.0.Final</version>
+ <version>1.0.1.Final</version>
<exclusions>
<exclusion>
<groupId>org.jboss.remoting3</groupId>
12 years, 11 months
JBossWS SVN: r15629 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-10 06:47:51 -0500 (Fri, 10 Feb 2012)
New Revision: 15629
Modified:
stack/native/trunk/modules/testsuite/pom.xml
Log:
sync. ejb client
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2012-02-10 11:45:14 UTC (rev 15628)
+++ stack/native/trunk/modules/testsuite/pom.xml 2012-02-10 11:47:51 UTC (rev 15629)
@@ -963,7 +963,7 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-ejb-client</artifactId>
- <version>1.0.0.Final</version>
+ <version>1.0.1.Final</version>
<exclusions>
<exclusion>
<groupId>org.jboss.remoting3</groupId>
12 years, 11 months
JBossWS SVN: r15628 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-10 06:45:14 -0500 (Fri, 10 Feb 2012)
New Revision: 15628
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
sync. ejb client
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2012-02-09 16:19:35 UTC (rev 15627)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2012-02-10 11:45:14 UTC (rev 15628)
@@ -1142,7 +1142,7 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-ejb-client</artifactId>
- <version>1.0.0.Final</version>
+ <version>1.0.1.Final</version>
<exclusions>
<exclusion>
<groupId>org.jboss.remoting3</groupId>
12 years, 11 months
JBossWS SVN: r15627 - stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-02-09 11:19:35 -0500 (Thu, 09 Feb 2012)
New Revision: 15627
Modified:
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase.java
Log:
Cleanup to the testcase
Modified: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase.java
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase.java 2012-02-09 15:57:08 UTC (rev 15626)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase.java 2012-02-09 16:19:35 UTC (rev 15627)
@@ -49,12 +49,11 @@
public final class WSTrustTestCase extends JBossWSTest
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-trust";
-// private final String stsPath = "jaxws-samples-wsse-policy-trust-sts";
private final String stsURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-trust-sts";
-// private Endpoint stsEndpoint;
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>();
@@ -66,48 +65,6 @@
testSetup.addSecurityDomainRequirement("JBossWS-trust-sts", authenticationOptions);
return testSetup;
}
-
-// @Override
-// protected void setUp() throws Exception {
-// super.setUp();
-//
-// //Prepare the STS ...
-// StaticSTSProperties props = new StaticSTSProperties();
-// props.setSignaturePropertiesFile("stsKeystore.properties");
-// props.setSignatureUsername("mystskey");
-// props.setCallbackHandlerClass(STSCallbackHandler.class.getName());
-// props.setIssuer("DoubleItSTSIssuer");
-//
-// List<ServiceMBean> services = new LinkedList<ServiceMBean>();
-// StaticService service = new StaticService();
-// //service.setEndpoints(Arrays.asList("http://localhost:(\\d)*/jaxws-samples-wsse-policy-trust-sts"));
-// service.setEndpoints(Arrays.asList(stsURL));
-// services.add(service);
-//
-// TokenIssueOperation issueOperation = new TokenIssueOperation();
-// issueOperation.setServices(services);
-// issueOperation.getTokenProviders().add(new SAMLTokenProvider());
-// issueOperation.setStsProperties(props);
-//
-// TokenValidateOperation validateOperation = new TokenValidateOperation();
-// validateOperation.getTokenValidators().add(new SAMLTokenValidator());
-// validateOperation.setStsProperties(props);
-//
-// SecurityTokenServiceProvider sts = new SecurityTokenServiceProvider();
-// sts.setIssueOperation(issueOperation);
-// sts.setValidateOperation(validateOperation);
-//
-// //Publish STS through Endpoint API
-// stsEndpoint = Endpoint.publish(stsURL, sts);
-// }
-//
-// @Override
-// protected void tearDown() throws Exception {
-// if (stsEndpoint != null) {
-// stsEndpoint.stop();
-// }
-// super.tearDown();
-// }
public void test() throws Exception
{
12 years, 11 months
JBossWS SVN: r15626 - in stack/cxf/branches/wstrust/modules/testsuite/cxf-tests: src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-02-09 10:57:08 -0500 (Thu, 09 Feb 2012)
New Revision: 15626
Added:
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ClientCallbackHandler.java
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/STSCallbackHandler.java
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/SampleSTS.java
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServerCallbackHandler.java
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServiceIface.java
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServiceImpl.java
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase.java
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/META-INF/
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/META-INF/clientKeystore.properties
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/META-INF/clientstore.jks
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jboss-web.xml
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-roles.properties
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-users.properties
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/serviceKeystore.properties
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/servicestore.jks
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/stsKeystore.properties
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/stsstore.jks
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/SecurityService.wsdl
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/SecurityService_schema1.xsd
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/ws-trust-1.4-service.wsdl
Modified:
stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml
Log:
Adding WS-Trust demo
Modified: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml 2012-02-09 15:56:08 UTC (rev 15625)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml 2012-02-09 15:57:08 UTC (rev 15626)
@@ -167,6 +167,55 @@
</metainf>
</jar>
+ <!-- jaxws-samples-wsse-policy-trust -->
+ <war
+ warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-trust.war" needxmlfile='false'>
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServiceIface.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServiceImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/Say*.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServerCallbackHandler.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/trust/WEB-INF">
+ <include name="wsdl/Security*"/>
+ </webinf>
+ <zipfileset dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/trust/WEB-INF" prefix="WEB-INF/classes">
+ <include name="servicestore.jks" />
+ <include name="serviceKeystore.properties" />
+ </zipfileset>
+ <manifest>
+ <attribute name="Dependencies" value="org.apache.ws.security,org.apache.cxf"/>
+ </manifest>
+ </war>
+
+ <!-- jaxws-samples-wsse-policy-trust-sts -->
+ <war
+ warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-trust-sts.war" needxmlfile='false'>
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/trust/SampleSTS.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/trust/WEB-INF">
+ <include name="wsdl/ws-trust*"/>
+ <include name="jboss-web.xml"/>
+ </webinf>
+ <zipfileset dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/trust/WEB-INF" prefix="WEB-INF/classes">
+ <include name="stsstore.jks" />
+ <include name="stsKeystore.properties" />
+ </zipfileset>
+ <manifest>
+ <attribute name="Dependencies" value="org.apache.ws.security,org.apache.cxf"/>
+ </manifest>
+ </war>
+
+ <!-- jaxws-samples-wsse-policy-trust-client -->
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-trust-client.jar">
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/trust/META-INF">
+ <include name="clientKeystore.properties" />
+ <include name="clientstore.jks" />
+ </metainf>
+ </jar>
+
<!-- jaxws-samples-wsse-policy-username-unsecure-transport -->
<war
warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-username-unsecure-transport.war"
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ClientCallbackHandler.java
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ClientCallbackHandler.java (rev 0)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ClientCallbackHandler.java 2012-02-09 15:57:08 UTC (rev 15626)
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.jboss.test.ws.jaxws.samples.wsse.policy.trust;
+
+import java.io.IOException;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import org.apache.ws.security.WSPasswordCallback;
+
+public class ClientCallbackHandler implements CallbackHandler {
+
+ public void handle(Callback[] callbacks) throws IOException,
+ UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ if (callbacks[i] instanceof WSPasswordCallback) {
+ WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
+ if ("myclientkey".equals(pc.getIdentifier())) {
+ pc.setPassword("ckpass");
+ break;
+ } else if ("alice".equals(pc.getIdentifier())) {
+ pc.setPassword("clarinet");
+ break;
+ } else if ("bob".equals(pc.getIdentifier())) {
+ pc.setPassword("trombone");
+ break;
+ } else if ("eve".equals(pc.getIdentifier())) {
+ pc.setPassword("evekpass");
+ break;
+ }
+ }
+ }
+ }
+}
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/STSCallbackHandler.java
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/STSCallbackHandler.java (rev 0)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/STSCallbackHandler.java 2012-02-09 15:57:08 UTC (rev 15626)
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.jboss.test.ws.jaxws.samples.wsse.policy.trust;
+
+import java.io.IOException;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import org.apache.ws.security.WSPasswordCallback;
+
+public class STSCallbackHandler implements CallbackHandler {
+
+ public void handle(Callback[] callbacks) throws IOException,
+ UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ if (callbacks[i] instanceof WSPasswordCallback) {
+ WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
+ if ("mystskey".equals(pc.getIdentifier())) {
+ pc.setPassword("stskpass");
+ break;
+ } else if ("alice".equals(pc.getIdentifier())) {
+ pc.setPassword("clarinet");
+ break;
+ }
+ }
+ }
+ }
+}
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/SampleSTS.java
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/SampleSTS.java (rev 0)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/SampleSTS.java 2012-02-09 15:57:08 UTC (rev 15626)
@@ -0,0 +1,83 @@
+/*
+ * 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.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.servlet.annotation.WebServlet;
+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.apache.cxf.sts.StaticSTSProperties;
+import org.apache.cxf.sts.operation.TokenIssueOperation;
+import org.apache.cxf.sts.operation.TokenValidateOperation;
+import org.apache.cxf.sts.service.ServiceMBean;
+import org.apache.cxf.sts.service.StaticService;
+import org.apache.cxf.sts.token.provider.SAMLTokenProvider;
+import org.apache.cxf.sts.token.validator.SAMLTokenValidator;
+import org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider;
+
+@WebServiceProvider(serviceName = "SecurityTokenService",
+ portName = "UT_Port",
+ targetNamespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/",
+ wsdlLocation = "WEB-INF/wsdl/ws-trust-1.4-service.wsdl")
+@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"})
+@WebServlet(name = "SampleSTSServlet", urlPatterns = "/*")
+public class SampleSTS extends SecurityTokenServiceProvider
+{
+ public SampleSTS() throws Exception
+ {
+ super();
+
+ StaticSTSProperties props = new StaticSTSProperties();
+ props.setSignaturePropertiesFile("stsKeystore.properties");
+ props.setSignatureUsername("mystskey");
+ props.setCallbackHandlerClass(STSCallbackHandler.class.getName());
+ props.setIssuer("DoubleItSTSIssuer");
+
+ List<ServiceMBean> services = new LinkedList<ServiceMBean>();
+ StaticService service = new StaticService();
+ service.setEndpoints(Arrays.asList("http://localhost:(\\d)*/jaxws-samples-wsse-policy-trust"));
+ services.add(service);
+
+ TokenIssueOperation issueOperation = new TokenIssueOperation();
+ issueOperation.setServices(services);
+ issueOperation.getTokenProviders().add(new SAMLTokenProvider());
+ issueOperation.setStsProperties(props);
+
+ TokenValidateOperation validateOperation = new TokenValidateOperation();
+ validateOperation.getTokenValidators().add(new SAMLTokenValidator());
+ validateOperation.setStsProperties(props);
+
+ this.setIssueOperation(issueOperation);
+ this.setValidateOperation(validateOperation);
+ }
+}
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServerCallbackHandler.java
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServerCallbackHandler.java (rev 0)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServerCallbackHandler.java 2012-02-09 15:57:08 UTC (rev 15626)
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.jboss.test.ws.jaxws.samples.wsse.policy.trust;
+
+import java.io.IOException;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import org.apache.ws.security.WSPasswordCallback;
+
+public class ServerCallbackHandler implements CallbackHandler {
+
+ public void handle(Callback[] callbacks) throws IOException,
+ UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ if (callbacks[i] instanceof WSPasswordCallback) { // CXF
+ WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
+ if ("myservicekey".equals(pc.getIdentifier())) {
+ pc.setPassword("skpass");
+ break;
+ }
+ }
+ }
+ }
+}
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServiceIface.java
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServiceIface.java (rev 0)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServiceIface.java 2012-02-09 15:57:08 UTC (rev 15626)
@@ -0,0 +1,35 @@
+/*
+ * 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.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService
+(
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy"
+)
+public interface ServiceIface
+{
+ @WebMethod
+ String sayHello();
+}
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServiceImpl.java
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServiceImpl.java (rev 0)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServiceImpl.java 2012-02-09 15:57:08 UTC (rev 15626)
@@ -0,0 +1,51 @@
+/*
+ * 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.jws.WebService;
+import javax.servlet.annotation.WebServlet;
+
+import org.apache.cxf.annotations.EndpointProperties;
+import org.apache.cxf.annotations.EndpointProperty;
+
+@WebService
+(
+ portName = "SecurityServicePort",
+ serviceName = "SecurityService",
+ wsdlLocation = "WEB-INF/wsdl/SecurityService.wsdl",
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
+ endpointInterface = "org.jboss.test.ws.jaxws.samples.wsse.policy.trust.ServiceIface"
+)
+@EndpointProperties(value = {
+ @EndpointProperty(key = "ws-security.signature.username", value = "myservicekey"),
+ @EndpointProperty(key = "ws-security.signature.properties", value = "serviceKeystore.properties"),
+ @EndpointProperty(key = "ws-security.encryption.properties", value = "serviceKeystore.properties"),
+ @EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.trust.ServerCallbackHandler")
+})
+@WebServlet(name = "ServiceImplServlet", urlPatterns = "/*")
+public class ServiceImpl implements ServiceIface
+{
+ public String sayHello()
+ {
+ return "WS-Trust Hello World!";
+ }
+}
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase.java
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase.java (rev 0)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase.java 2012-02-09 15:57:08 UTC (rev 15626)
@@ -0,0 +1,154 @@
+/*
+ * 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 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;
+
+/**
+ * WS-Trust test case
+ * This is basically the Apache CXF STS demo (from distribution samples)
+ * ported to jbossws-cxf for running over JBoss Application Server.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 08-Feb-2012
+ */
+public final class WSTrustTestCase extends JBossWSTest
+{
+ private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-trust";
+// private final String stsPath = "jaxws-samples-wsse-policy-trust-sts";
+ private final String stsURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-trust-sts";
+// private Endpoint stsEndpoint;
+
+ public static Test suite()
+ {
+ 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;
+ }
+
+// @Override
+// protected void setUp() throws Exception {
+// super.setUp();
+//
+// //Prepare the STS ...
+// StaticSTSProperties props = new StaticSTSProperties();
+// props.setSignaturePropertiesFile("stsKeystore.properties");
+// props.setSignatureUsername("mystskey");
+// props.setCallbackHandlerClass(STSCallbackHandler.class.getName());
+// props.setIssuer("DoubleItSTSIssuer");
+//
+// List<ServiceMBean> services = new LinkedList<ServiceMBean>();
+// StaticService service = new StaticService();
+// //service.setEndpoints(Arrays.asList("http://localhost:(\\d)*/jaxws-samples-wsse-policy-trust-sts"));
+// service.setEndpoints(Arrays.asList(stsURL));
+// services.add(service);
+//
+// TokenIssueOperation issueOperation = new TokenIssueOperation();
+// issueOperation.setServices(services);
+// issueOperation.getTokenProviders().add(new SAMLTokenProvider());
+// issueOperation.setStsProperties(props);
+//
+// TokenValidateOperation validateOperation = new TokenValidateOperation();
+// validateOperation.getTokenValidators().add(new SAMLTokenValidator());
+// validateOperation.setStsProperties(props);
+//
+// SecurityTokenServiceProvider sts = new SecurityTokenServiceProvider();
+// sts.setIssueOperation(issueOperation);
+// sts.setValidateOperation(validateOperation);
+//
+// //Publish STS through Endpoint API
+// stsEndpoint = Endpoint.publish(stsURL, sts);
+// }
+//
+// @Override
+// protected void tearDown() throws Exception {
+// if (stsEndpoint != null) {
+// stsEndpoint.stop();
+// }
+// super.tearDown();
+// }
+
+ public void test() throws Exception
+ {
+ Bus bus = BusFactory.newInstance().createBus();
+ try
+ {
+ BusFactory.setThreadDefaultBus(bus);
+
+ QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy", "SecurityService");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ ServiceIface proxy = (ServiceIface) service.getPort(ServiceIface.class);
+ setupWsse(proxy, bus);
+ assertEquals("WS-Trust Hello World!", proxy.sayHello());
+ }
+ finally
+ {
+ 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/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/META-INF/clientKeystore.properties
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/META-INF/clientKeystore.properties (rev 0)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/META-INF/clientKeystore.properties 2012-02-09 15:57:08 UTC (rev 15626)
@@ -0,0 +1,24 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=cspass
+org.apache.ws.security.crypto.merlin.keystore.alias=myclientkey
+org.apache.ws.security.crypto.merlin.keystore.file=META-INF/clientstore.jks
+
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/META-INF/clientstore.jks
===================================================================
(Binary files differ)
Property changes on: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/META-INF/clientstore.jks
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jboss-web.xml
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jboss-web.xml (rev 0)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jboss-web.xml 2012-02-09 15:57:08 UTC (rev 15626)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <security-domain>java:/jaas/JBossWS-trust-sts</security-domain>
+</jboss-web>
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-roles.properties
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-roles.properties (rev 0)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-roles.properties 2012-02-09 15:57:08 UTC (rev 15626)
@@ -0,0 +1,2 @@
+# A sample roles.properties file for use with the UsersRolesLoginModule
+alice=friend
\ No newline at end of file
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-users.properties
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-users.properties (rev 0)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-users.properties 2012-02-09 15:57:08 UTC (rev 15626)
@@ -0,0 +1,2 @@
+# A sample users.properties file for use with the UsersRolesLoginModule
+alice=clarinet
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/serviceKeystore.properties
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/serviceKeystore.properties (rev 0)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/serviceKeystore.properties 2012-02-09 15:57:08 UTC (rev 15626)
@@ -0,0 +1,24 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=sspass
+org.apache.ws.security.crypto.merlin.keystore.alias=myservicekey
+org.apache.ws.security.crypto.merlin.keystore.file=servicestore.jks
+
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/servicestore.jks
===================================================================
(Binary files differ)
Property changes on: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/servicestore.jks
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/stsKeystore.properties
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/stsKeystore.properties (rev 0)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/stsKeystore.properties 2012-02-09 15:57:08 UTC (rev 15626)
@@ -0,0 +1,23 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=stsspass
+org.apache.ws.security.crypto.merlin.keystore.file=stsstore.jks
+
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/stsstore.jks
===================================================================
(Binary files differ)
Property changes on: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/stsstore.jks
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/SecurityService.wsdl (rev 0)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/SecurityService.wsdl 2012-02-09 15:57:08 UTC (rev 15626)
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<definitions targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy" name="SecurityService"
+ xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..."
+ xmlns:wsaws="http://www.w3.org/2005/08/addressing"
+ xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
+ xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512">
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy" schemaLocation="SecurityService_schema1.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <portType name="ServiceIface">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="SecurityServicePortBinding" type="tns:ServiceIface">
+ <wsp:PolicyReference URI="#AsymmetricSAML2Policy" />
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference URI="#Input_Policy" />
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference URI="#Output_Policy" />
+ </output>
+ </operation>
+ </binding>
+ <service name="SecurityService">
+ <port name="SecurityServicePort" binding="tns:SecurityServicePortBinding">
+ <soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-trust"/>
+ </port>
+ </service>
+
+ <wsp:Policy wsu:Id="AsymmetricSAML2Policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <wsam:Addressing wsp:Optional="false">
+ <wsp:Policy />
+ </wsam:Addressing>
+ <sp:AsymmetricBinding>
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:IssuedToken
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Al...">
+ <sp:RequestSecurityTokenTemplate>
+ <t:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</t:TokenType>
+ <t:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/PublicKey</t:KeyType>
+ </sp:RequestSecurityTokenTemplate>
+ <wsp:Policy>
+ <sp:RequireInternalReference />
+ </wsp:Policy>
+ <sp:Issuer>
+ <wsaws:Address>http://localhost:8080/jaxws-samples-wsse-policy-trust-sts
+ </wsaws:Address>
+ </sp:Issuer>
+ </sp:IssuedToken>
+ </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 />
+ <sp:RequireIssuerSerialReference />
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Lax />
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp />
+ <sp:OnlySignEntireHeadersAndBody />
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256 />
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss11>
+ <wsp:Policy>
+ <sp:MustSupportRefIssuerSerial />
+ <sp:MustSupportRefThumbprint />
+ <sp:MustSupportRefEncryptedKey />
+ </wsp:Policy>
+ </sp:Wss11>
+ <sp:Trust13>
+ <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:EncryptedParts>
+ <sp:Body />
+ </sp:EncryptedParts>
+ <sp:SignedParts>
+ <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>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+ <wsp:Policy wsu:Id="Output_Policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:EncryptedParts>
+ <sp:Body />
+ </sp:EncryptedParts>
+ <sp:SignedParts>
+ <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>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</definitions>
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/SecurityService_schema1.xsd
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/SecurityService_schema1.xsd (rev 0)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/SecurityService_schema1.xsd 2012-02-09 15:57:08 UTC (rev 15626)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xs:schema version="1.0" targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy" xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="tns:sayHello"/>
+
+ <xs:element name="sayHelloResponse" type="tns:sayHelloResponse"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence/>
+ </xs:complexType>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
Added: stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/ws-trust-1.4-service.wsdl
===================================================================
--- stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/ws-trust-1.4-service.wsdl (rev 0)
+++ stack/cxf/branches/wstrust/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/ws-trust-1.4-service.wsdl 2012-02-09 15:57:08 UTC (rev 15626)
@@ -0,0 +1,313 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions
+ targetNamespace="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
+ xmlns:tns="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
+ xmlns:wstrust="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsap10="http://www.w3.org/2006/05/addressing/wsdl"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..."
+ xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
+ >
+
+ <wsdl:types>
+ <xs:schema elementFormDefault="qualified" targetNamespace='http://docs.oasis-open.org/ws-sx/ws-trust/200512'>
+
+ <xs:element name='RequestSecurityToken' type='wst:AbstractRequestSecurityTokenType' />
+ <xs:element name='RequestSecurityTokenResponse' type='wst:AbstractRequestSecurityTokenType' />
+
+ <xs:complexType name='AbstractRequestSecurityTokenType' >
+ <xs:sequence>
+ <xs:any namespace='##any' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
+ </xs:sequence>
+ <xs:attribute name='Context' type='xs:anyURI' use='optional' />
+ <xs:anyAttribute namespace='##other' processContents='lax' />
+ </xs:complexType>
+ <xs:element name='RequestSecurityTokenCollection' type='wst:RequestSecurityTokenCollectionType' />
+ <xs:complexType name='RequestSecurityTokenCollectionType' >
+ <xs:sequence>
+ <xs:element name='RequestSecurityToken' type='wst:AbstractRequestSecurityTokenType' minOccurs='2' maxOccurs='unbounded'/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name='RequestSecurityTokenResponseCollection' type='wst:RequestSecurityTokenResponseCollectionType' />
+ <xs:complexType name='RequestSecurityTokenResponseCollectionType' >
+ <xs:sequence>
+ <xs:element ref='wst:RequestSecurityTokenResponse' minOccurs='1' maxOccurs='unbounded' />
+ </xs:sequence>
+ <xs:anyAttribute namespace='##other' processContents='lax' />
+ </xs:complexType>
+
+ </xs:schema>
+ </wsdl:types>
+
+ <!-- WS-Trust defines the following GEDs -->
+ <wsdl:message name="RequestSecurityTokenMsg">
+ <wsdl:part name="request" element="wst:RequestSecurityToken" />
+ </wsdl:message>
+ <wsdl:message name="RequestSecurityTokenResponseMsg">
+ <wsdl:part name="response"
+ element="wst:RequestSecurityTokenResponse" />
+ </wsdl:message>
+ <wsdl:message name="RequestSecurityTokenCollectionMsg">
+ <wsdl:part name="requestCollection"
+ element="wst:RequestSecurityTokenCollection"/>
+ </wsdl:message>
+ <wsdl:message name="RequestSecurityTokenResponseCollectionMsg">
+ <wsdl:part name="responseCollection"
+ element="wst:RequestSecurityTokenResponseCollection"/>
+ </wsdl:message>
+
+ <!-- This portType an example of a Requestor (or other) endpoint that
+ Accepts SOAP-based challenges from a Security Token Service -->
+ <wsdl:portType name="WSSecurityRequestor">
+ <wsdl:operation name="Challenge">
+ <wsdl:input message="tns:RequestSecurityTokenResponseMsg"/>
+ <wsdl:output message="tns:RequestSecurityTokenResponseMsg"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <!-- This portType is an example of an STS supporting full protocol -->
+ <wsdl:portType name="STS">
+ <wsdl:operation name="Cancel">
+ <wsdl:input wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Cancel" message="tns:RequestSecurityTokenMsg"/>
+ <wsdl:output wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTR/CancelFinal" message="tns:RequestSecurityTokenResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="Issue">
+ <wsdl:input wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue" message="tns:RequestSecurityTokenMsg"/>
+ <wsdl:output wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTRC/IssueFinal" message="tns:RequestSecurityTokenResponseCollectionMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="Renew">
+ <wsdl:input wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Renew" message="tns:RequestSecurityTokenMsg"/>
+ <wsdl:output wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTR/RenewFinal" message="tns:RequestSecurityTokenResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="Validate">
+ <wsdl:input wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Validate" message="tns:RequestSecurityTokenMsg"/>
+ <wsdl:output wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTR/ValidateFinal" message="tns:RequestSecurityTokenResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="KeyExchangeToken">
+ <wsdl:input wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/KET" message="tns:RequestSecurityTokenMsg"/>
+ <wsdl:output wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTR/KETFinal" message="tns:RequestSecurityTokenResponseMsg"/>
+ </wsdl:operation>
+ <wsdl:operation name="RequestCollection">
+ <wsdl:input message="tns:RequestSecurityTokenCollectionMsg"/>
+ <wsdl:output message="tns:RequestSecurityTokenResponseCollectionMsg"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <!-- This portType is an example of an endpoint that accepts
+ Unsolicited RequestSecurityTokenResponse messages -->
+ <wsdl:portType name="SecurityTokenResponseService">
+ <wsdl:operation name="RequestSecurityTokenResponse">
+ <wsdl:input message="tns:RequestSecurityTokenResponseMsg"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="UT_Binding" type="wstrust:STS">
+ <wsp:PolicyReference URI="#UT_policy" />
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="Issue">
+ <soap:operation
+ soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue" />
+ <wsdl:input>
+ <wsp:PolicyReference
+ URI="#Input_policy" />
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <wsp:PolicyReference
+ URI="#Output_policy" />
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="Validate">
+ <soap:operation
+ soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Validate" />
+ <wsdl:input>
+ <wsp:PolicyReference
+ URI="#Input_policy" />
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <wsp:PolicyReference
+ URI="#Output_policy" />
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="Cancel">
+ <soap:operation
+ soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Cancel" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="Renew">
+ <soap:operation
+ soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Renew" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="KeyExchangeToken">
+ <soap:operation
+ soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/KeyExchangeToken" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="RequestCollection">
+ <soap:operation
+ soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/RequestCollection" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="SecurityTokenService">
+ <wsdl:port name="UT_Port" binding="tns:UT_Binding">
+ <soap:address location="http://localhost:8080/SecurityTokenService/UT" />
+ </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/200702/IncludeToken/Never">
+ <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/200702/IncludeToken/Al...">
+ <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>
12 years, 11 months
JBossWS SVN: r15625 - stack/cxf/branches/wstrust/modules/server/src/main/java/org/jboss/wsf/stack/cxf.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-02-09 10:56:08 -0500 (Thu, 09 Feb 2012)
New Revision: 15625
Modified:
stack/cxf/branches/wstrust/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java
Log:
Removing useless import
Modified: stack/cxf/branches/wstrust/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java
===================================================================
--- stack/cxf/branches/wstrust/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java 2012-02-09 15:55:06 UTC (rev 15624)
+++ stack/cxf/branches/wstrust/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java 2012-02-09 15:56:08 UTC (rev 15625)
@@ -37,7 +37,6 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusException;
-import org.apache.cxf.frontend.WSDLGetInterceptor;
import org.apache.cxf.frontend.WSDLGetUtils;
import org.apache.cxf.service.model.EndpointInfo;
import org.apache.cxf.transport.DestinationFactory;
12 years, 11 months
JBossWS SVN: r15624 - in stack/cxf/branches/wstrust/modules/resources/src/main/resources/modules/jboss710/org: opensaml and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-02-09 10:55:06 -0500 (Thu, 09 Feb 2012)
New Revision: 15624
Added:
stack/cxf/branches/wstrust/modules/resources/src/main/resources/modules/jboss710/org/opensaml/
stack/cxf/branches/wstrust/modules/resources/src/main/resources/modules/jboss710/org/opensaml/main/
stack/cxf/branches/wstrust/modules/resources/src/main/resources/modules/jboss710/org/opensaml/main/module.xml
Log:
Adding OpenSAML
Added: stack/cxf/branches/wstrust/modules/resources/src/main/resources/modules/jboss710/org/opensaml/main/module.xml
===================================================================
--- stack/cxf/branches/wstrust/modules/resources/src/main/resources/modules/jboss710/org/opensaml/main/module.xml (rev 0)
+++ stack/cxf/branches/wstrust/modules/resources/src/main/resources/modules/jboss710/org/opensaml/main/module.xml 2012-02-09 15:55:06 UTC (rev 15624)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2012, Red Hat, Inc., 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.1" name="org.opensaml">
+
+ <resources>
+ <!-- Insert resources here -->
+ </resources>
+
+ <dependencies>
+ <module name="javax.api"/>
+ <module name="org.slf4j"/>
+ <module name="org.apache.santuario.xmlsec"/>
+ </dependencies>
+</module>
12 years, 11 months
JBossWS SVN: r15623 - in stack/cxf/branches/wstrust/modules: resources/src/main/resources/modules/jboss710/org/apache/cxf/main and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-02-09 10:54:31 -0500 (Thu, 09 Feb 2012)
New Revision: 15623
Modified:
stack/cxf/branches/wstrust/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/cxf/branches/wstrust/modules/resources/src/main/resources/modules/jboss710/org/apache/cxf/main/module.xml
stack/cxf/branches/wstrust/modules/resources/src/main/resources/modules/jboss710/org/apache/ws/security/main/module.xml
stack/cxf/branches/wstrust/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
Log:
Adding OpenSAML
Modified: stack/cxf/branches/wstrust/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/branches/wstrust/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-02-09 13:59:32 UTC (rev 15622)
+++ stack/cxf/branches/wstrust/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-02-09 15:54:31 UTC (rev 15623)
@@ -47,6 +47,9 @@
<include>com.sun.xml.fastinfoset:FastInfoset:jar</include>
<include>org.apache.ws.security:wss4j:jar</include>
<include>org.apache.santuario:xmlsec:jar</include>
+ <include>org.opensaml:open*:jar</include>
+ <include>org.opensaml:xmltooling:jar</include>
+ <include>joda-time:joda-time:jar</include>
<include>asm:asm:jar</include>
<include>apache-velocity:velocity:jar</include>
<include>commons-collections:commons-collections:jar</include>
Modified: stack/cxf/branches/wstrust/modules/resources/src/main/resources/modules/jboss710/org/apache/cxf/main/module.xml
===================================================================
--- stack/cxf/branches/wstrust/modules/resources/src/main/resources/modules/jboss710/org/apache/cxf/main/module.xml 2012-02-09 13:59:32 UTC (rev 15622)
+++ stack/cxf/branches/wstrust/modules/resources/src/main/resources/modules/jboss710/org/apache/cxf/main/module.xml 2012-02-09 15:54:31 UTC (rev 15623)
@@ -49,6 +49,7 @@
<module name="org.apache.ws.xmlschema" />
<module name="org.apache.ws.security" />
<module name="org.apache.santuario.xmlsec" />
+ <module name="org.opensaml" />
<module name="org.springframework.spring" optional="true"/>
</dependencies>
</module>
Modified: stack/cxf/branches/wstrust/modules/resources/src/main/resources/modules/jboss710/org/apache/ws/security/main/module.xml
===================================================================
--- stack/cxf/branches/wstrust/modules/resources/src/main/resources/modules/jboss710/org/apache/ws/security/main/module.xml 2012-02-09 13:59:32 UTC (rev 15622)
+++ stack/cxf/branches/wstrust/modules/resources/src/main/resources/modules/jboss710/org/apache/ws/security/main/module.xml 2012-02-09 15:54:31 UTC (rev 15623)
@@ -34,5 +34,6 @@
<module name="org.apache.commons.logging" />
<module name="org.apache.santuario.xmlsec" />
<module name="org.apache.xalan" />
+ <module name="org.opensaml" />
</dependencies>
</module>
Modified: stack/cxf/branches/wstrust/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/cxf/branches/wstrust/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2012-02-09 13:59:32 UTC (rev 15622)
+++ stack/cxf/branches/wstrust/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2012-02-09 15:54:31 UTC (rev 15623)
@@ -123,6 +123,14 @@
<include name="**/xmlschema-core.jar"/>
</fileset>
</copy>
+ <copy todir="@{targetdir}/org/opensaml/main" flatten="false" overwrite="true">
+ <fileset dir="@{thirdpartydir}/lib">
+ <include name="**/opensaml.jar"/>
+ <include name="**/openws.jar"/>
+ <include name="**/joda-time.jar"/>
+ <include name="**/xmltooling.jar"/>
+ </fileset>
+ </copy>
<copy todir="@{targetdir}/org/jboss/as/webservices/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
<include name="**/jbossws-cxf-resources.jar"/>
12 years, 11 months
JBossWS SVN: r15622 - stack/cxf/branches/wstrust/modules/server/src/main/java/org/jboss/wsf/stack/cxf.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-02-09 08:59:32 -0500 (Thu, 09 Feb 2012)
New Revision: 15622
Modified:
stack/cxf/branches/wstrust/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java
Log:
svn merge -r 15620:15621 https://svn.jboss.org/repos/jbossws/stack/cxf/trunk .
Modified: stack/cxf/branches/wstrust/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java
===================================================================
--- stack/cxf/branches/wstrust/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java 2012-02-09 13:57:14 UTC (rev 15621)
+++ stack/cxf/branches/wstrust/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java 2012-02-09 13:59:32 UTC (rev 15622)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * 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.
*
@@ -24,8 +24,8 @@
import javax.xml.ws.handler.MessageContext;
import org.apache.cxf.jaxws.context.WebServiceContextImpl;
-import org.jboss.ws.common.invocation.WebServiceContextAdapter;
import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
+import org.jboss.wsf.spi.invocation.WebServiceContextDelegate;
import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
/**
@@ -39,6 +39,6 @@
@Override
public ExtensibleWebServiceContext newWebServiceContext(MessageContext messageContext)
{
- return new WebServiceContextAdapter(new WebServiceContextImpl(messageContext));
+ return new WebServiceContextDelegate(new WebServiceContextImpl(messageContext));
}
}
12 years, 11 months
JBossWS SVN: r15621 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-02-09 08:57:14 -0500 (Thu, 09 Feb 2012)
New Revision: 15621
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java
Log:
[JBWS-3431] Use WebServiceContextDelegate wrapper instead of the WebServiceContextAdapter
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java 2012-02-09 13:45:30 UTC (rev 15620)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java 2012-02-09 13:57:14 UTC (rev 15621)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * 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.
*
@@ -24,8 +24,8 @@
import javax.xml.ws.handler.MessageContext;
import org.apache.cxf.jaxws.context.WebServiceContextImpl;
-import org.jboss.ws.common.invocation.WebServiceContextAdapter;
import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
+import org.jboss.wsf.spi.invocation.WebServiceContextDelegate;
import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
/**
@@ -39,6 +39,6 @@
@Override
public ExtensibleWebServiceContext newWebServiceContext(MessageContext messageContext)
{
- return new WebServiceContextAdapter(new WebServiceContextImpl(messageContext));
+ return new WebServiceContextDelegate(new WebServiceContextImpl(messageContext));
}
}
12 years, 11 months