JBossWS SVN: r16712 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-12 06:57:03 -0400 (Wed, 12 Sep 2012)
New Revision: 16712
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3405] excluding test on AS 7.1.0
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2012-09-12 09:58:10 UTC (rev 16711)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2012-09-12 10:57:03 UTC (rev 16712)
@@ -653,6 +653,7 @@
<exclude>org/jboss/test/ws/jaxws/samples/wssePolicy/UsernameTestCase.*</exclude>
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernameOverTransportTestCase.*</exclude>
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples21xTestCase.*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.*</exclude>
<!--# [CXF-1519] Explicitly set the namespace of a WebFault-->
<exclude>org/jboss/test/ws/jaxws/jbws1904/**</exclude>
12 years, 4 months
JBossWS SVN: r16711 - shared-testsuite/trunk/testsuite/src/test/ant-import.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-12 05:58:10 -0400 (Wed, 12 Sep 2012)
New Revision: 16711
Modified:
shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml
Log:
[JBWS-3405] Adding joda-time jar to bin distro client classpath
Modified: shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml 2012-09-12 09:53:25 UTC (rev 16710)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml 2012-09-12 09:58:10 UTC (rev 16711)
@@ -271,6 +271,9 @@
<fileset dir="${jboss.home}/modules/org/jboss/xb/main/">
<include name="jbossxb-*.jar"/>
</fileset>
+ <fileset dir="${jboss.home}/modules/org/joda/time/main/">
+ <include name="joda-time-*.jar"/>
+ </fileset>
<fileset dir="${jboss.home}/modules/org/apache/xalan/main/">
<include name="serializer-*.jar"/>
<include name="xalan-*.jar"/>
@@ -423,6 +426,9 @@
<fileset dir="${jboss.home}/modules/org/jboss/xb/main/">
<include name="jbossxb-*.jar"/>
</fileset>
+ <fileset dir="${jboss.home}/modules/org/joda/time/main/">
+ <include name="joda-time-*.jar"/>
+ </fileset>
<fileset dir="${jboss.home}/modules/org/apache/xalan/main/">
<include name="serializer-*.jar"/>
<include name="xalan-*.jar"/>
12 years, 4 months
JBossWS SVN: r16710 - shared-testsuite/trunk/testsuite/src/test/ant-import.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-12 05:53:25 -0400 (Wed, 12 Sep 2012)
New Revision: 16710
Modified:
shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml
Log:
[JBWS-3405][JBWS-3446] Adding client.keystore and modifying truststore to allow for SSL mutual authentication scenarios (https client auth on server side)
Modified: shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml 2012-09-11 16:35:26 UTC (rev 16709)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml 2012-09-12 09:53:25 UTC (rev 16710)
@@ -591,6 +591,9 @@
<sysproperty key="javax.net.ssl.trustStore" value="${tests.output.dir}/test-classes/test.truststore"/>
<sysproperty key="javax.net.ssl.trustStorePassword" value="changeit"/>
<sysproperty key="javax.net.ssl.trustStoreType" value="jks"/>
+ <sysproperty key="javax.net.ssl.keyStore" value="${tests.output.dir}/test-classes/client.keystore"/>
+ <sysproperty key="javax.net.ssl.keyStorePassword" value="changeit"/>
+ <sysproperty key="javax.net.ssl.keyStoreType" value="jks"/>
<sysproperty key="org.jboss.security.ignoreHttpsHost" value="true"/>
<sysproperty key="java.security.policy" value="${tests.output.dir}/test-classes/tst.policy"/>
<sysproperty key="jboss.home" value="${jboss.home}"/>
@@ -603,6 +606,7 @@
<sysproperty key="org.jboss.ws.testsuite.securityDomain.users.propfile" value="${tests.output.dir}/test-classes/jbossws-users.properties"/>
<sysproperty key="org.jboss.ws.testsuite.securityDomain.roles.propfile" value="${tests.output.dir}/test-classes/jbossws-roles.properties"/>
<sysproperty key="org.jboss.ws.testsuite.server.keystore" value="${tests.output.dir}/test-classes/test.keystore"/>
+ <sysproperty key="org.jboss.ws.testsuite.server.truststore" value="${tests.output.dir}/test-classes/test.truststore"/>
<sysproperty key="test.archive.directory" value="${tests.output.dir}/test-libs"/>
<sysproperty key="test.classes.directory" value="${tests.output.dir}/test-classes"/>
<sysproperty key="test.resources.directory" value="${tests.output.dir}/test-resources"/>
@@ -645,6 +649,9 @@
<sysproperty key="javax.net.ssl.trustStore" value="${tests.output.dir}/test-classes/test.truststore"/>
<sysproperty key="javax.net.ssl.trustStorePassword" value="changeit"/>
<sysproperty key="javax.net.ssl.trustStoreType" value="jks"/>
+ <sysproperty key="javax.net.ssl.keyStore" value="${tests.output.dir}/test-classes/client.keystore"/>
+ <sysproperty key="javax.net.ssl.keyStorePassword" value="changeit"/>
+ <sysproperty key="javax.net.ssl.keyStoreType" value="jks"/>
<sysproperty key="org.jboss.security.ignoreHttpsHost" value="true"/>
<sysproperty key="java.security.policy" value="${tests.output.dir}/test-classes/tst.policy"/>
<sysproperty key="jboss.home" value="${jboss.home}"/>
@@ -657,6 +664,7 @@
<sysproperty key="org.jboss.ws.testsuite.securityDomain.users.propfile" value="${tests.output.dir}/test-classes/jbossws-users.properties"/>
<sysproperty key="org.jboss.ws.testsuite.securityDomain.roles.propfile" value="${tests.output.dir}/test-classes/jbossws-roles.properties"/>
<sysproperty key="org.jboss.ws.testsuite.server.keystore" value="${tests.output.dir}/test-classes/test.keystore"/>
+ <sysproperty key="org.jboss.ws.testsuite.server.truststore" value="${tests.output.dir}/test-classes/test.truststore"/>
<sysproperty key="test.archive.directory" value="${tests.output.dir}/test-libs"/>
<sysproperty key="test.classes.directory" value="${tests.output.dir}/test-classes"/>
<sysproperty key="test.resources.directory" value="${tests.output.dir}/test-resources"/>
12 years, 4 months
JBossWS SVN: r16709 - in stack/cxf/trunk/modules/testsuite/cxf-tests: src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-11 12:35:26 -0400 (Tue, 11 Sep 2012)
New Revision: 16709
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SamlCallbackHandler.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2311Impl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2312Impl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2313Impl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService23x.wsdl
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml
Log:
[JBWS-3405] Adding some WS-SecurityPolicy Examples 1.0 2.3.x testcases (SAML 1.1 Bearer, Sender-Vouches, Holder-of-Key)
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-09-11 16:04:36 UTC (rev 16708)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml 2012-09-11 16:35:26 UTC (rev 16709)
@@ -166,6 +166,28 @@
</manifest>
</war>
+ <!-- jaxws-samples-wsse-policy-oasis-23x -->
+ <war
+ warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-oasis-23x.war" needxmlfile='false'>
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/ServiceIface.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service23*Impl.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/Say*.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/KeystorePasswordCallback.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/oasis/WEB-INF">
+ <include name="wsdl/*.xsd"/>
+ <include name="wsdl/SecurityService23x.wsdl"/>
+ </webinf>
+ <zipfileset dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/oasis/WEB-INF" prefix="WEB-INF/classes">
+ <include name="bob.jks" />
+ <include name="bob.properties" />
+ </zipfileset>
+ <manifest>
+ <attribute name="Dependencies" value="org.apache.ws.security,org.apache.cxf"/>
+ </manifest>
+ </war>
+
<!-- jaxws-samples-wsse-policy-oasis-client -->
<jar destfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-oasis-client.jar">
<metainf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/oasis/META-INF">
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SamlCallbackHandler.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SamlCallbackHandler.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SamlCallbackHandler.java 2012-09-11 16:35:26 UTC (rev 16709)
@@ -0,0 +1,122 @@
+package org.jboss.test.ws.jaxws.samples.wsse.policy.oasis;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.cert.X509Certificate;
+import java.util.Collections;
+import java.util.Properties;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.components.crypto.Crypto;
+import org.apache.ws.security.components.crypto.CryptoFactory;
+import org.apache.ws.security.components.crypto.CryptoType;
+import org.apache.ws.security.saml.ext.SAMLCallback;
+import org.apache.ws.security.saml.ext.bean.AttributeBean;
+import org.apache.ws.security.saml.ext.bean.AttributeStatementBean;
+import org.apache.ws.security.saml.ext.bean.KeyInfoBean;
+import org.apache.ws.security.saml.ext.bean.KeyInfoBean.CERT_IDENTIFIER;
+import org.apache.ws.security.saml.ext.bean.SubjectBean;
+import org.apache.ws.security.saml.ext.builder.SAML1Constants;
+import org.apache.ws.security.saml.ext.builder.SAML2Constants;
+import org.opensaml.common.SAMLVersion;
+
+public class SamlCallbackHandler implements CallbackHandler
+{
+ private String confirmationMethod = SAML2Constants.CONF_BEARER;
+
+ private boolean saml2;
+
+ public SamlCallbackHandler()
+ {
+ }
+
+ public void setConfirmationMethod(String confirmationMethod)
+ {
+ this.confirmationMethod = confirmationMethod;
+ }
+
+ public void setSaml2(boolean isSaml2)
+ {
+ saml2 = isSaml2;
+ }
+
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
+ {
+ for (int i = 0; i < callbacks.length; i++)
+ {
+ if (callbacks[i] instanceof SAMLCallback)
+ {
+ SAMLCallback callback = (SAMLCallback) callbacks[i];
+ if (saml2)
+ {
+ callback.setSamlVersion(SAMLVersion.VERSION_20);
+ }
+ callback.setIssuer("sts");
+ String subjectName = "uid=sts-client,o=jbws-cxf-sts.com";
+ String subjectQualifier = "www.jbws-cxf-sts.org";
+
+ SubjectBean subjectBean = new SubjectBean(subjectName, subjectQualifier, confirmationMethod);
+ if (SAML2Constants.CONF_HOLDER_KEY.equals(confirmationMethod)
+ || SAML1Constants.CONF_HOLDER_KEY.equals(confirmationMethod))
+ {
+ try
+ {
+ KeyInfoBean keyInfo = createKeyInfo();
+ subjectBean.setKeyInfo(keyInfo);
+ }
+ catch (Exception ex)
+ {
+ throw new IOException("Problem creating KeyInfo: " + ex.getMessage());
+ }
+ }
+
+ callback.setSubject(subjectBean);
+
+ AttributeStatementBean attrBean = new AttributeStatementBean();
+ attrBean.setSubject(subjectBean);
+
+ AttributeBean attributeBean = new AttributeBean();
+ if (saml2)
+ {
+ attributeBean.setQualifiedName("subject-role");
+ }
+ else
+ {
+ attributeBean.setSimpleName("subject-role");
+ attributeBean.setQualifiedName("http://custom-ns");
+ }
+ attributeBean.setAttributeValues(Collections.singletonList("system-user"));
+ attrBean.setSamlAttributes(Collections.singletonList(attributeBean));
+ callback.setAttributeStatementData(Collections.singletonList(attrBean));
+ }
+ }
+ }
+
+ protected KeyInfoBean createKeyInfo() throws Exception
+ {
+ InputStream is = Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties").openStream();
+ Properties props = new Properties();
+ try
+ {
+ props.load(is);
+ }
+ finally
+ {
+ is.close();
+ }
+ Crypto crypto = CryptoFactory.getInstance(props);
+ CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ALIAS);
+ cryptoType.setAlias("alice");
+ X509Certificate[] certs = crypto.getX509Certificates(cryptoType);
+
+ KeyInfoBean keyInfo = new KeyInfoBean();
+ keyInfo.setCertificate(certs[0]);
+ keyInfo.setCertIdentifer(CERT_IDENTIFIER.X509_CERT);
+
+ return keyInfo;
+ }
+
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2311Impl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2311Impl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2311Impl.java 2012-09-11 16:35:26 UTC (rev 16709)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.oasis;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+import org.jboss.ws.api.annotation.WebContext;
+
+@WebService
+(
+ portName = "SecurityService2311Port",
+ serviceName = "SecurityService",
+ wsdlLocation = "WEB-INF/wsdl/SecurityService23x.wsdl",
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples",
+ endpointInterface = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServiceIface"
+)
+@Stateless
+@WebContext(urlPattern = "SecurityService2311")
+public class Service2311Impl implements ServiceIface
+{
+ public String sayHello()
+ {
+ return "Hello - (WSS1.0) SAML1.1 Assertion (Bearer)";
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2312Impl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2312Impl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2312Impl.java 2012-09-11 16:35:26 UTC (rev 16709)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.oasis;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+import org.jboss.ws.api.annotation.WebContext;
+
+@WebService
+(
+ portName = "SecurityService2312Port",
+ serviceName = "SecurityService",
+ wsdlLocation = "WEB-INF/wsdl/SecurityService23x.wsdl",
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples",
+ endpointInterface = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServiceIface"
+)
+@Stateless
+@WebContext(urlPattern = "SecurityService2312", transportGuarantee="CONFIDENTIAL")
+public class Service2312Impl implements ServiceIface
+{
+ public String sayHello()
+ {
+ return "Hello - (WSS1.0) SAML1.1 Assertion (Sender Vouches) over SSL";
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2313Impl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2313Impl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2313Impl.java 2012-09-11 16:35:26 UTC (rev 16709)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.oasis;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+import org.apache.cxf.annotations.EndpointProperties;
+import org.apache.cxf.annotations.EndpointProperty;
+import org.jboss.ws.api.annotation.WebContext;
+
+@WebService
+(
+ portName = "SecurityService2313Port",
+ serviceName = "SecurityService",
+ wsdlLocation = "WEB-INF/wsdl/SecurityService23x.wsdl",
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples",
+ endpointInterface = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServiceIface"
+)
+@EndpointProperties(value = {
+ @EndpointProperty(key = "ws-security.signature.properties", value = "bob.properties"),
+ @EndpointProperty(key = "ws-security.signature.username", value = "bob"),
+ @EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.KeystorePasswordCallback")
+ }
+)
+@Stateless
+@WebContext(urlPattern = "SecurityService2313", transportGuarantee="CONFIDENTIAL")
+public class Service2313Impl implements ServiceIface
+{
+ public String sayHello()
+ {
+ return "Hello - (WSS1.0) SAML1.1 Assertion (HK) over SSL";
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java 2012-09-11 16:35:26 UTC (rev 16709)
@@ -0,0 +1,123 @@
+/*
+ * 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.oasis;
+
+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.ws.security.SecurityConstants;
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * WS-Security Policy examples
+ *
+ * From OASIS WS-SecurityPolicy Examples Version 1.0
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 10-Sep-2012
+ */
+public final class WSSecurityPolicyExamples23xTestCase extends JBossWSTest
+{
+ private final String NS = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples";
+ private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-oasis-23x/";
+ private final QName serviceName = new QName(NS, "SecurityService");
+
+ public static Test suite()
+ {
+ /** System properties - currently set at testsuite start time
+ System.setProperty("javax.net.ssl.trustStore", "my.truststore");
+ System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
+ System.setProperty("javax.net.ssl.trustStoreType", "jks");
+ System.setProperty("javax.net.ssl.keyStore", "my.keystore");
+ System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
+ System.setProperty("javax.net.ssl.keyStoreType", "jks");
+ System.setProperty("org.jboss.security.ignoreHttpsHost", "true");
+ */
+ JBossWSCXFTestSetup setup = new JBossWSCXFTestSetup(WSSecurityPolicyExamples23xTestCase.class,
+ "jaxws-samples-wsse-policy-oasis-23x.war,jaxws-samples-wsse-policy-oasis-client.jar");
+ Map<String, String> sslOptions = new HashMap<String, String>();
+ sslOptions.put("certificate-key-file", System.getProperty("org.jboss.ws.testsuite.server.keystore"));
+ sslOptions.put("password", "changeit");
+ sslOptions.put("verify-client", "true"); //enable SSL mutual authentication (https client cert is checked on server side)
+ sslOptions.put("key-alias", "tomcat");
+ sslOptions.put("ca-certificate-file", System.getProperty("org.jboss.ws.testsuite.server.truststore"));
+ sslOptions.put("ca-certificate-password", "changeit");
+ setup.setHttpsConnectorRequirement(sslOptions);
+ return setup;
+ }
+
+ /**
+ * 2.3.1.1 (WSS1.0) SAML1.1 Assertion (Bearer)
+ *
+ * @throws Exception
+ */
+ public void test2311() throws Exception
+ {
+ Service service = Service.create(new URL(serviceURL + "SecurityService2311?wsdl"), serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService2311Port"), ServiceIface.class);
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SAML_CALLBACK_HANDLER, new SamlCallbackHandler());
+ assertTrue(proxy.sayHello().equals("Hello - (WSS1.0) SAML1.1 Assertion (Bearer)"));
+ }
+
+ /**
+ * 2.3.1.2 (WSS1.0) SAML1.1 Assertion (Sender Vouches) over SSL
+ *
+ * @throws Exception
+ */
+ public void test2312() throws Exception
+ {
+ Service service = Service.create(new URL(serviceURL + "SecurityService2312?wsdl"), serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService2312Port"), ServiceIface.class);
+ SamlCallbackHandler cbh = new SamlCallbackHandler();
+ cbh.setConfirmationMethod("urn:oasis:names:tc:SAML:1.0:cm:sender-vouches");
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SAML_CALLBACK_HANDLER, cbh);
+ assertTrue(proxy.sayHello().equals("Hello - (WSS1.0) SAML1.1 Assertion (Sender Vouches) over SSL"));
+ }
+
+ /**
+ * 2.3.1.3 (WSS1.0) SAML1.1 Assertion (HK) over SSL
+ *
+ * @throws Exception
+ */
+ public void test2313() throws Exception
+ {
+ Service service = Service.create(new URL(serviceURL + "SecurityService2313?wsdl"), serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService2313Port"), ServiceIface.class);
+ SamlCallbackHandler cbh = new SamlCallbackHandler();
+ cbh.setConfirmationMethod("urn:oasis:names:tc:SAML:1.0:cm:holder-of-key");
+ ((BindingProvider) proxy).getRequestContext().put(SecurityConstants.SAML_CALLBACK_HANDLER, cbh);
+ ((BindingProvider) proxy).getRequestContext().put(SecurityConstants.SIGNATURE_PROPERTIES,
+ Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SIGNATURE_USERNAME, "alice");
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SELF_SIGN_SAML_ASSERTION, "true");
+ assertTrue(proxy.sayHello().equals("Hello - (WSS1.0) SAML1.1 Assertion (HK) over SSL"));
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService23x.wsdl
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService23x.wsdl (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService23x.wsdl 2012-09-11 16:35:26 UTC (rev 16709)
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="SecurityService"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples"
+ xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ 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:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
+ xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
+ targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples">
+ <wsdl:types>
+ <xsd:schema>
+ <xsd:import namespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples" schemaLocation="SecurityService_schema1.xsd"/>
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="sayHello">
+ <wsdl:part name="parameters" element="tns:sayHello"/>
+ </wsdl:message>
+ <wsdl:message name="sayHelloResponse">
+ <wsdl:part name="parameters" element="tns:sayHelloResponse"/>
+ </wsdl:message>
+ <wsdl:portType name="ServiceIface">
+ <wsdl:operation name="sayHello">
+ <wsdl:input message="tns:sayHello"/>
+ <wsdl:output message="tns:sayHelloResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="SecurityService2311PortBinding" type="tns:ServiceIface">
+ <wsp:PolicyReference URI="#SecurityService2311_policy"/>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <wsdl:operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="SecurityService2312PortBinding" type="tns:ServiceIface">
+ <wsp:PolicyReference URI="#SecurityService2312_policy"/>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <wsdl:operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="SecurityService2313PortBinding" type="tns:ServiceIface">
+ <wsp:PolicyReference URI="#SecurityService2313_policy"/>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <wsdl:operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="SecurityService">
+ <wsdl:port name="SecurityService2311Port" binding="tns:SecurityService2311PortBinding">
+ <soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-oasis/SecurityService2311"/>
+ </wsdl:port>
+ <wsdl:port name="SecurityService2312Port" binding="tns:SecurityService2312PortBinding">
+ <soap:address location="https://@jboss.bind.address@:8443/jaxws-samples-wsse-policy-oasis/SecurityService2312"/>
+ </wsdl:port>
+ <wsdl:port name="SecurityService2313Port" binding="tns:SecurityService2313PortBinding">
+ <soap:address location="https://@jboss.bind.address@:8443/jaxws-samples-wsse-policy-oasis/SecurityService2313"/>
+ </wsdl:port>
+ </wsdl:service>
+ <!-- 2.3.1.1 (WSS1.0) SAML1.1 Assertion (Bearer) -->
+ <wsp:Policy wsu:Id="SecurityService2311_policy">
+ <sp:SupportingTokens>
+ <wsp:Policy>
+ <sp:SamlToken
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Al...">
+ <wsp:Policy>
+ <sp:WssSamlV11Token10/>
+ </wsp:Policy>
+ </sp:SamlToken>
+ </wsp:Policy>
+ </sp:SupportingTokens>
+ </wsp:Policy>
+ <!-- 2.3.1.2 (WSS1.0) SAML1.1 Assertion (Sender Vouches) over SSL -->
+ <wsp:Policy wsu:Id="SecurityService2312_policy">
+ <sp:TransportBinding>
+ <wsp:Policy>
+ <sp:TransportToken>
+ <wsp:Policy>
+ <sp:HttpsToken>
+ <wsp:Policy>
+ <sp:RequireClientCertificate/>
+ </wsp:Policy>
+ </sp:HttpsToken>
+ </wsp:Policy>
+ </sp:TransportToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256 />
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict />
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp />
+ </wsp:Policy>
+ </sp:TransportBinding>
+ <sp:SignedSupportingTokens>
+ <wsp:Policy>
+ <sp:SamlToken
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Al...">
+ <wsp:Policy>
+ <sp:WssSamlV11Token10/>
+ </wsp:Policy>
+ </sp:SamlToken>
+ </wsp:Policy>
+ </sp:SignedSupportingTokens>
+ </wsp:Policy>
+ <!-- 2.3.1.3 (WSS1.0) SAML1.1 Assertion (HK) over SSL -->
+ <wsp:Policy wsu:Id="SecurityService2313_policy">
+ <sp:TransportBinding>
+ <wsp:Policy>
+ <sp:TransportToken>
+ <wsp:Policy>
+ <sp:HttpsToken>
+ <wsp:Policy>
+ <sp:RequireClientCertificate/>
+ </wsp:Policy>
+ </sp:HttpsToken>
+ </wsp:Policy>
+ </sp:TransportToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128 />
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict />
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp />
+ </wsp:Policy>
+ </sp:TransportBinding>
+ <sp:SignedEndorsingSupportingTokens>
+ <wsp:Policy>
+ <sp:SamlToken
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Al...">
+ <wsp:Policy>
+ <sp:WssSamlV11Token10/>
+ </wsp:Policy>
+ </sp:SamlToken>
+ </wsp:Policy>
+ </sp:SignedEndorsingSupportingTokens>
+ </wsp:Policy>
+</wsdl:definitions>
\ No newline at end of file
12 years, 4 months
JBossWS SVN: r16708 - stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-11 12:04:36 -0400 (Tue, 11 Sep 2012)
New Revision: 16708
Added:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/client.keystore
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/test.keystore
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/test.truststore
Log:
[JBWS-3405][JBWS-3446] copying files into shared testsuite too
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/client.keystore
===================================================================
(Binary files differ)
Property changes on: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/client.keystore
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/test.keystore
===================================================================
(Binary files differ)
Property changes on: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/test.keystore
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/test.truststore
===================================================================
(Binary files differ)
Property changes on: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/test.truststore
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
12 years, 4 months
JBossWS SVN: r16707 - in stack/cxf/trunk/modules/testsuite: cxf-spring-tests/src/test/etc and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-11 11:34:47 -0400 (Tue, 11 Sep 2012)
New Revision: 16707
Added:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/client.keystore
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/client.keystore
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/test.truststore
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/test.truststore
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3405][JBWS-3446] Adding client.keystore and modifying truststore to allow for SSL mutual authentication scenarios (https client auth on server side)
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/client.keystore
===================================================================
(Binary files differ)
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/client.keystore
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/test.truststore
===================================================================
(Binary files differ)
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/client.keystore
===================================================================
(Binary files differ)
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/client.keystore
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/test.truststore
===================================================================
(Binary files differ)
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2012-09-11 11:47:10 UTC (rev 16706)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2012-09-11 15:34:47 UTC (rev 16707)
@@ -290,6 +290,18 @@
<value>jks</value>
</property>
<property>
+ <name>javax.net.ssl.keyStore</name>
+ <value>${project.build.directory}/test-classes/client.keystore</value>
+ </property>
+ <property>
+ <name>javax.net.ssl.keyStorePassword</name>
+ <value>changeit</value>
+ </property>
+ <property>
+ <name>javax.net.ssl.keyStoreType</name>
+ <value>jks</value>
+ </property>
+ <property>
<name>org.jboss.security.ignoreHttpsHost</name>
<value>true</value>
</property>
@@ -326,6 +338,10 @@
<value>${project.build.directory}/test-classes/test.keystore</value>
</property>
<property>
+ <name>org.jboss.ws.testsuite.server.truststore</name>
+ <value>${project.build.directory}/test-classes/test.truststore</value>
+ </property>
+ <property>
<name>test.archive.directory</name>
<value>${test.archive.directory}</value>
</property>
@@ -391,6 +407,18 @@
<value>jks</value>
</property>
<property>
+ <name>javax.net.ssl.keyStore</name>
+ <value>${project.build.directory}/test-classes/client.keystore</value>
+ </property>
+ <property>
+ <name>javax.net.ssl.keyStorePassword</name>
+ <value>changeit</value>
+ </property>
+ <property>
+ <name>javax.net.ssl.keyStoreType</name>
+ <value>jks</value>
+ </property>
+ <property>
<name>org.jboss.security.ignoreHttpsHost</name>
<value>true</value>
</property>
@@ -427,6 +455,10 @@
<value>${project.build.directory}/test-classes/test.keystore</value>
</property>
<property>
+ <name>org.jboss.ws.testsuite.server.truststore</name>
+ <value>${project.build.directory}/test-classes/test.truststore</value>
+ </property>
+ <property>
<name>test.archive.directory</name>
<value>${test.archive.directory}</value>
</property>
12 years, 4 months
JBossWS SVN: r16706 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-11 07:47:10 -0400 (Tue, 11 Sep 2012)
New Revision: 16706
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3405] Excluding 21x tests on AS 7.1.0 due to missing https configuration
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2012-09-11 10:12:17 UTC (rev 16705)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2012-09-11 11:47:10 UTC (rev 16706)
@@ -617,9 +617,10 @@
<configuration>
<argLine>${surefire.jvm.args} ${surefire.jvm.management.args} ${surefire.default-mgmt-serurity.args} -Djava.endorsed.dirs=${project.build.directory}/endorsed</argLine>
<excludes>
- <!--# UsernameTestCase requires trustore in jboss-web tomcat configuration-->
+ <!--# TestCases requiring trustore in jboss-web tomcat configuration-->
<exclude>org/jboss/test/ws/jaxws/samples/wssePolicy/UsernameTestCase.*</exclude>
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernameOverTransportTestCase.*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples21xTestCase.*</exclude>
<!--# [CXF-1519] Explicitly set the namespace of a WebFault-->
<exclude>org/jboss/test/ws/jaxws/jbws1904/**</exclude>
12 years, 4 months
JBossWS SVN: r16705 - hudson/trunk/scripts.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-11 06:12:17 -0400 (Tue, 11 Sep 2012)
New Revision: 16705
Modified:
hudson/trunk/scripts/jbossws-qa.sh
Log:
Check for boot.log existence before copying
Modified: hudson/trunk/scripts/jbossws-qa.sh
===================================================================
--- hudson/trunk/scripts/jbossws-qa.sh 2012-09-10 12:58:10 UTC (rev 16704)
+++ hudson/trunk/scripts/jbossws-qa.sh 2012-09-11 10:12:17 UTC (rev 16705)
@@ -38,7 +38,9 @@
}
copyJBossLogs() {
- cp $JBOSS_HOME/standalone/log/boot.log $WORKSPACE/jboss-boot.log
+ if [ -e $JBOSS_HOME/standalone/log/boot.log ]; then
+ cp $JBOSS_HOME/standalone/log/boot.log $WORKSPACE/jboss-boot.log
+ fi
cp $JBOSS_HOME/standalone/log/server.log $WORKSPACE/jboss-server.log
}
12 years, 4 months
JBossWS SVN: r16704 - in stack/cxf/trunk/modules/testsuite/cxf-tests: src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-10 08:58:10 -0400 (Mon, 10 Sep 2012)
New Revision: 16704
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/ServerUsernamePasswordCallback.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2111Impl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2112Impl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2113Impl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2121Impl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service213Impl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service214Impl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/UsernamePasswordCallback.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples21xTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService21x.wsdl
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/oasis/WSSecurityPolicyExamples22xTestCase.java
Log:
[JBWS-3405] Adding WS-SecurityPolicy Examples 1.0 (most of 2.1.x) testcases
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-09-10 09:07:07 UTC (rev 16703)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml 2012-09-10 12:58:10 UTC (rev 16704)
@@ -122,17 +122,40 @@
</manifest>
</war>
+ <!-- jaxws-samples-wsse-policy-oasis-21x -->
+ <war
+ warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-oasis-21x.war" needxmlfile='false'>
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/ServiceIface.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service21*Impl.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/Say*.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/ServerUsernamePasswordCallback.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/oasis/WEB-INF">
+ <include name="wsdl/*.xsd"/>
+ <include name="wsdl/SecurityService21x.wsdl"/>
+ </webinf>
+ <zipfileset dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/oasis/WEB-INF" prefix="WEB-INF/classes">
+ <include name="bob.jks" />
+ <include name="bob.properties" />
+ </zipfileset>
+ <manifest>
+ <attribute name="Dependencies" value="org.apache.ws.security,org.apache.cxf"/>
+ </manifest>
+ </war>
+
<!-- jaxws-samples-wsse-policy-oasis-22x -->
<war
warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-oasis-22x.war" needxmlfile='false'>
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/ServiceIface.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service*Impl.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service22*Impl.class"/>
<include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/Say*.class"/>
<include name="org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/KeystorePasswordCallback.class"/>
</classes>
<webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/oasis/WEB-INF">
- <include name="wsdl/*"/>
+ <include name="wsdl/*.xsd"/>
+ <include name="wsdl/SecurityService.wsdl"/>
</webinf>
<zipfileset dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/oasis/WEB-INF" prefix="WEB-INF/classes">
<include name="bob.jks" />
@@ -143,8 +166,8 @@
</manifest>
</war>
- <!-- jaxws-samples-wsse-policy-oasis-22x-client -->
- <jar destfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-oasis-22x-client.jar">
+ <!-- jaxws-samples-wsse-policy-oasis-client -->
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-oasis-client.jar">
<metainf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/oasis/META-INF">
<include name="alice.properties" />
<include name="alice.jks" />
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/ServerUsernamePasswordCallback.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/ServerUsernamePasswordCallback.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/ServerUsernamePasswordCallback.java 2012-09-10 12:58:10 UTC (rev 16704)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.oasis;
+
+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 ServerUsernamePasswordCallback implements CallbackHandler
+{
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
+ {
+ WSPasswordCallback pc = (WSPasswordCallback)callbacks[0];
+ final String id = pc.getIdentifier();
+ if ("kermit".equals(id))
+ pc.setPassword("thefrog");
+ else if ("alice".equals(id) || "bob".equals(id))
+ pc.setPassword("password");
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2111Impl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2111Impl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2111Impl.java 2012-09-10 12:58:10 UTC (rev 16704)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.oasis;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+import org.apache.cxf.annotations.EndpointProperties;
+import org.apache.cxf.annotations.EndpointProperty;
+import org.jboss.ws.api.annotation.WebContext;
+
+@WebService
+(
+ portName = "SecurityService2111Port",
+ serviceName = "SecurityService",
+ wsdlLocation = "WEB-INF/wsdl/SecurityService21x.wsdl",
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples",
+ endpointInterface = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServiceIface"
+)
+@EndpointProperties(value = {
+ @EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServerUsernamePasswordCallback")
+ }
+)
+@Stateless
+@WebContext(urlPattern = "SecurityService2111")
+public class Service2111Impl implements ServiceIface
+{
+ public String sayHello()
+ {
+ return "Hello - UsernameToken with plain text password";
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2112Impl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2112Impl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2112Impl.java 2012-09-10 12:58:10 UTC (rev 16704)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.oasis;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+import org.apache.cxf.annotations.EndpointProperties;
+import org.apache.cxf.annotations.EndpointProperty;
+import org.jboss.ws.api.annotation.WebContext;
+
+@WebService
+(
+ portName = "SecurityService2112Port",
+ serviceName = "SecurityService",
+ wsdlLocation = "WEB-INF/wsdl/SecurityService21x.wsdl",
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples",
+ endpointInterface = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServiceIface"
+)
+@EndpointProperties(value = {
+ @EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServerUsernamePasswordCallback")
+ }
+)
+@Stateless
+@WebContext(urlPattern = "SecurityService2112")
+public class Service2112Impl implements ServiceIface
+{
+ public String sayHello()
+ {
+ return "Hello - UsernameToken without password";
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2113Impl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2113Impl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2113Impl.java 2012-09-10 12:58:10 UTC (rev 16704)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.oasis;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+import org.apache.cxf.annotations.EndpointProperties;
+import org.apache.cxf.annotations.EndpointProperty;
+import org.jboss.ws.api.annotation.WebContext;
+
+@WebService
+(
+ portName = "SecurityService2113Port",
+ serviceName = "SecurityService",
+ wsdlLocation = "WEB-INF/wsdl/SecurityService21x.wsdl",
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples",
+ endpointInterface = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServiceIface"
+)
+@EndpointProperties(value = {
+ @EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServerUsernamePasswordCallback")
+ }
+)
+@Stateless
+@WebContext(urlPattern = "SecurityService2113")
+public class Service2113Impl implements ServiceIface
+{
+ public String sayHello()
+ {
+ return "Hello - UsernameToken with timestamp, nonce and password hash";
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2121Impl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2121Impl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2121Impl.java 2012-09-10 12:58:10 UTC (rev 16704)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.oasis;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+import org.apache.cxf.annotations.EndpointProperties;
+import org.apache.cxf.annotations.EndpointProperty;
+import org.jboss.ws.api.annotation.WebContext;
+
+@WebService
+(
+ portName = "SecurityService2121Port",
+ serviceName = "SecurityService",
+ wsdlLocation = "WEB-INF/wsdl/SecurityService21x.wsdl",
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples",
+ endpointInterface = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServiceIface"
+)
+@EndpointProperties(value = {
+ @EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServerUsernamePasswordCallback")
+ }
+)
+@Stateless
+@WebContext(urlPattern = "SecurityService2121", transportGuarantee="CONFIDENTIAL")
+public class Service2121Impl implements ServiceIface
+{
+ public String sayHello()
+ {
+ return "Hello - UsernameToken as supporting token";
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service213Impl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service213Impl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service213Impl.java 2012-09-10 12:58:10 UTC (rev 16704)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.oasis;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+import org.apache.cxf.annotations.EndpointProperties;
+import org.apache.cxf.annotations.EndpointProperty;
+import org.jboss.ws.api.annotation.WebContext;
+
+@WebService
+(
+ portName = "SecurityService213Port",
+ serviceName = "SecurityService",
+ wsdlLocation = "WEB-INF/wsdl/SecurityService21x.wsdl",
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples",
+ endpointInterface = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServiceIface"
+)
+@EndpointProperties(value = {
+ @EndpointProperty(key = "ws-security.signature.properties", value = "bob.properties"),
+ @EndpointProperty(key = "ws-security.encryption.properties", value = "bob.properties"),
+ @EndpointProperty(key = "ws-security.signature.username", value = "bob"),
+ @EndpointProperty(key = "ws-security.encryption.username", value = "useReqSigCert"),
+ @EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServerUsernamePasswordCallback")
+ }
+)
+@Stateless
+@WebContext(urlPattern = "SecurityService213")
+public class Service213Impl implements ServiceIface
+{
+ public String sayHello()
+ {
+ return "Hello - (WSS 1.0) UsernameToken with Mutual X.509v3 Authentication, Sign, Encrypt";
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service214Impl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service214Impl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service214Impl.java 2012-09-10 12:58:10 UTC (rev 16704)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.oasis;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+import org.apache.cxf.annotations.EndpointProperties;
+import org.apache.cxf.annotations.EndpointProperty;
+import org.jboss.ws.api.annotation.WebContext;
+
+@WebService
+(
+ portName = "SecurityService214Port",
+ serviceName = "SecurityService",
+ wsdlLocation = "WEB-INF/wsdl/SecurityService21x.wsdl",
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples",
+ endpointInterface = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServiceIface"
+)
+@EndpointProperties(value = {
+ @EndpointProperty(key = "ws-security.signature.properties", value = "bob.properties"),
+ @EndpointProperty(key = "ws-security.encryption.properties", value = "bob.properties"),
+ @EndpointProperty(key = "ws-security.signature.username", value = "bob"),
+ @EndpointProperty(key = "ws-security.encryption.username", value = "useReqSigCert"),
+ @EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServerUsernamePasswordCallback")
+ }
+)
+@Stateless
+@WebContext(urlPattern = "SecurityService214")
+public class Service214Impl implements ServiceIface
+{
+ public String sayHello()
+ {
+ return "Hello - (WSS 1.1) User Name with Certificates, Sign, Encrypt";
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/UsernamePasswordCallback.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/UsernamePasswordCallback.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/UsernamePasswordCallback.java 2012-09-10 12:58:10 UTC (rev 16704)
@@ -0,0 +1,44 @@
+/*
+ * 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.oasis;
+
+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 UsernamePasswordCallback implements CallbackHandler
+{
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
+ {
+ WSPasswordCallback pc = (WSPasswordCallback)callbacks[0];
+ final String id = pc.getIdentifier();
+ if ("kermit".equals(id))
+ pc.setPassword("thefrog");
+ else if ("alice".equals(id) || "bob".equals(id))
+ pc.setPassword("password");
+ else
+ pc.setPassword("wrong password");
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples21xTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples21xTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples21xTestCase.java 2012-09-10 12:58:10 UTC (rev 16704)
@@ -0,0 +1,159 @@
+/*
+ * 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.oasis;
+
+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.ws.security.SecurityConstants;
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * WS-Security Policy examples
+ *
+ * From OASIS WS-SecurityPolicy Examples Version 1.0
+ * http://docs.oasis-open.org/ws-sx/security-policy/examples/ws-sp-usecases-...
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 10-Sep-2012
+ */
+public final class WSSecurityPolicyExamples21xTestCase extends JBossWSTest
+{
+ private final String NS = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples";
+ private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-oasis-21x/";
+ private final QName serviceName = new QName(NS, "SecurityService");
+
+ public static Test suite()
+ {
+ /** System properties - currently set at testsuite start time
+ System.setProperty("javax.net.ssl.trustStore", "my.truststore");
+ System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
+ System.setProperty("javax.net.ssl.trustStoreType", "jks");
+ System.setProperty("org.jboss.security.ignoreHttpsHost", "true");
+ */
+ JBossWSCXFTestSetup setup = new JBossWSCXFTestSetup(WSSecurityPolicyExamples21xTestCase.class,
+ "jaxws-samples-wsse-policy-oasis-21x.war,jaxws-samples-wsse-policy-oasis-client.jar");
+ Map<String, String> sslOptions = new HashMap<String, String>();
+ sslOptions.put("certificate-key-file", System.getProperty("org.jboss.ws.testsuite.server.keystore"));
+ sslOptions.put("password", "changeit");
+ sslOptions.put("verify-client", "false");
+ sslOptions.put("key-alias", "tomcat");
+ setup.setHttpsConnectorRequirement(sslOptions);
+ return setup;
+ }
+
+ /**
+ * 2.1.1.1 UsernameToken with plain text password
+ *
+ * @throws Exception
+ */
+ public void test2111() throws Exception
+ {
+ Service service = Service.create(new URL(serviceURL + "SecurityService2111?wsdl"), serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService2111Port"), ServiceIface.class);
+ setupWsse(proxy);
+ assertTrue(proxy.sayHello().equals("Hello - UsernameToken with plain text password"));
+ }
+
+ /**
+ * 2.1.1.2 UsernameToken without password
+ *
+ * @throws Exception
+ */
+ public void test2112() throws Exception
+ {
+ Service service = Service.create(new URL(serviceURL + "SecurityService2112?wsdl"), serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService2112Port"), ServiceIface.class);
+ setupWsse(proxy);
+ assertTrue(proxy.sayHello().equals("Hello - UsernameToken without password"));
+ }
+
+ /**
+ * 2.1.1.3 UsernameToken with timestamp, nonce and password hash
+ *
+ * @throws Exception
+ */
+ public void test2113() throws Exception
+ {
+ Service service = Service.create(new URL(serviceURL + "SecurityService2113?wsdl"), serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService2113Port"), ServiceIface.class);
+ setupWsse(proxy);
+ assertTrue(proxy.sayHello().equals("Hello - UsernameToken with timestamp, nonce and password hash"));
+ }
+
+ /**
+ * 2.1.2.1 UsernameToken as supporting token
+ *
+ * @throws Exception
+ */
+ public void test2121() throws Exception
+ {
+ Service service = Service.create(new URL(serviceURL + "SecurityService2121?wsdl"), serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService2121Port"), ServiceIface.class);
+ setupWsse(proxy);
+ assertTrue(proxy.sayHello().equals("Hello - UsernameToken as supporting token"));
+ }
+
+ /**
+ * 2.1.3 (WSS 1.0) UsernameToken with Mutual X.509v3 Authentication, Sign, Encrypt
+ *
+ * @throws Exception
+ */
+ public void test213() throws Exception
+ {
+ Service service = Service.create(new URL(serviceURL + "SecurityService213?wsdl"), serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService213Port"), ServiceIface.class);
+ setupWsse(proxy);
+ assertTrue(proxy.sayHello().equals("Hello - (WSS 1.0) UsernameToken with Mutual X.509v3 Authentication, Sign, Encrypt"));
+ }
+
+ /**
+ * 2.1.4 (WSS 1.1) User Name with Certificates, Sign, Encrypt
+ *
+ * @throws Exception
+ */
+ public void test214() throws Exception
+ {
+ Service service = Service.create(new URL(serviceURL + "SecurityService214?wsdl"), serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService214Port"), ServiceIface.class);
+ setupWsse(proxy);
+ assertTrue(proxy.sayHello().equals("Hello - (WSS 1.1) User Name with Certificates, Sign, Encrypt"));
+ }
+
+ private void setupWsse(ServiceIface proxy)
+ {
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.USERNAME, "kermit");
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, new UsernamePasswordCallback());
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SIGNATURE_USERNAME, "alice");
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+ }
+}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples22xTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples22xTestCase.java 2012-09-10 09:07:07 UTC (rev 16703)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples22xTestCase.java 2012-09-10 12:58:10 UTC (rev 16704)
@@ -51,7 +51,7 @@
public static Test suite()
{
return new JBossWSCXFTestSetup(WSSecurityPolicyExamples22xTestCase.class,
- "jaxws-samples-wsse-policy-oasis-22x.war,jaxws-samples-wsse-policy-oasis-22x-client.jar");
+ "jaxws-samples-wsse-policy-oasis-22x.war,jaxws-samples-wsse-policy-oasis-client.jar");
}
/**
@@ -73,7 +73,6 @@
/**
* 2.2.2 (WSS1.0) Mutual Authentication with X.509 Certificates, Sign, Encrypt
*
- * This scenario is based on WSS Interop, Scenario 3, Web Services Security: Interop 1, Draft 06, Editor, Hal Lockhart, BEA Systems
* This use case corresponds to the situation where both parties have X.509v3 certificates (and public-private key pairs).
* The requestor wishes to identify itself to the service using its X.509 credential (strong authentication).
* The message exchange needs to be integrity protected and encrypted as well. The difference from previous use case is
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService21x.wsdl
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService21x.wsdl (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService21x.wsdl 2012-09-10 12:58:10 UTC (rev 16704)
@@ -0,0 +1,345 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="SecurityService"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples"
+ xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ 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:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
+ xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
+ targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples">
+ <wsdl:types>
+ <xsd:schema>
+ <xsd:import namespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy/oasis-samples" schemaLocation="SecurityService_schema1.xsd"/>
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="sayHello">
+ <wsdl:part name="parameters" element="tns:sayHello"/>
+ </wsdl:message>
+ <wsdl:message name="sayHelloResponse">
+ <wsdl:part name="parameters" element="tns:sayHelloResponse"/>
+ </wsdl:message>
+ <wsdl:portType name="ServiceIface">
+ <wsdl:operation name="sayHello">
+ <wsdl:input message="tns:sayHello"/>
+ <wsdl:output message="tns:sayHelloResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="SecurityService2111PortBinding" type="tns:ServiceIface">
+ <wsp:PolicyReference URI="#SecurityService2111Policy"/>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <wsdl:operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="SecurityService2112PortBinding" type="tns:ServiceIface">
+ <wsp:PolicyReference URI="#SecurityService2112Policy"/>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <wsdl:operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="SecurityService2113PortBinding" type="tns:ServiceIface">
+ <wsp:PolicyReference URI="#SecurityService2113Policy"/>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <wsdl:operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="SecurityService2121PortBinding" type="tns:ServiceIface">
+ <wsp:PolicyReference URI="#SecurityService2121Policy"/>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <wsdl:operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="SecurityService213PortBinding" type="tns:ServiceIface">
+ <wsp:PolicyReference URI="#SecurityService213Policy"/>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <wsdl:operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference URI="#SecurityService_Input_Policy"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference URI="#SecurityService_Output_Policy"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="SecurityService214PortBinding" type="tns:ServiceIface">
+ <wsp:PolicyReference URI="#SecurityService214Policy"/>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <wsdl:operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference URI="#SecurityService_Input_Policy"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference URI="#SecurityService_Output_Policy"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="SecurityService">
+ <wsdl:port name="SecurityService2111Port" binding="tns:SecurityService2111PortBinding">
+ <soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-oasis/SecurityService2111"/>
+ </wsdl:port>
+ <wsdl:port name="SecurityService2112Port" binding="tns:SecurityService2112PortBinding">
+ <soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-oasis/SecurityService2112"/>
+ </wsdl:port>
+ <wsdl:port name="SecurityService2113Port" binding="tns:SecurityService2113PortBinding">
+ <soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-oasis/SecurityService2113"/>
+ </wsdl:port>
+ <wsdl:port name="SecurityService2121Port" binding="tns:SecurityService2121PortBinding">
+ <soap:address location="https://@jboss.bind.address@:8443/jaxws-samples-wsse-policy-oasis/SecurityService2121"/>
+ </wsdl:port>
+ <wsdl:port name="SecurityService213Port" binding="tns:SecurityService213PortBinding">
+ <soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-oasis/SecurityService213"/>
+ </wsdl:port>
+ <wsdl:port name="SecurityService214Port" binding="tns:SecurityService214PortBinding">
+ <soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-oasis/SecurityService214"/>
+ </wsdl:port>
+ </wsdl:service>
+
+
+ <!-- 2.1.1.1 UsernameToken with plain text password -->
+ <wsp:Policy wsu:Id="SecurityService2111Policy">
+ <sp:SupportingTokens>
+ <wsp:Policy>
+ <sp:UsernameToken
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Al...">
+ <wsp:Policy/>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:SupportingTokens>
+ </wsp:Policy>
+
+ <!-- 2.1.1.2 UsernameToken without password -->
+ <wsp:Policy wsu:Id="SecurityService2112Policy">
+ <sp:SupportingTokens>
+ <wsp:Policy>
+ <sp:UsernameToken
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Al...">
+ <wsp:Policy>
+ <sp:NoPassword/>
+ </wsp:Policy>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:SupportingTokens>
+ </wsp:Policy>
+
+ <!-- 2.1.1.3 UsernameToken with timestamp, nonce and password hash -->
+ <wsp:Policy wsu:Id="SecurityService2113Policy">
+ <sp:SupportingTokens>
+ <wsp:Policy>
+ <sp:UsernameToken
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Al...">
+ <wsp:Policy>
+ <sp:HashPassword/>
+ </wsp:Policy>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:SupportingTokens>
+ </wsp:Policy>
+
+ <!-- 2.1.2.1 UsernameToken as supporting token -->
+ <wsp:Policy wsu:Id="SecurityService2121Policy">
+ <sp:TransportBinding>
+ <wsp:Policy>
+ <sp:TransportToken>
+ <wsp:Policy>
+ <sp:HttpsToken>
+ <wsp:Policy/>
+ </sp:HttpsToken>
+ </wsp:Policy>
+ </sp:TransportToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128 />
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict />
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp />
+ </wsp:Policy>
+ </sp:TransportBinding>
+ <sp:SupportingTokens>
+ <wsp:Policy>
+ <sp:UsernameToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Al...">
+ <wsp:Policy/>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:SupportingTokens>
+ </wsp:Policy>
+
+ <!-- 2.1.3 (WSS 1.0) UsernameToken with Mutual X.509v3 Authentication, Sign, Encrypt -->
+ <wsp:Policy wsu:Id="SecurityService213Policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding>
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Al...">
+ <wsp:Policy>
+ <sp:WssX509V3Token10 />
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10 />
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10>
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedEncryptedSupportingTokens>
+ <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:SignedEncryptedSupportingTokens>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+ <!-- 2.1.4 (WSS 1.1), User Name with Certificates, Sign, Encrypt -->
+ <wsp:Policy wsu:Id="SecurityService214Policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SymmetricBinding>
+ <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:RequireThumbprintReference />
+ <sp:WssX509V3Token11/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:ProtectionToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:SymmetricBinding>
+ <sp:SignedEncryptedSupportingTokens>
+ <wsp:Policy>
+ <sp:UsernameToken
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Al...">
+ <wsp:Policy>
+ <sp:WssUsernameToken11/>
+ </wsp:Policy>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:SignedEncryptedSupportingTokens>
+ <sp:Wss11>
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ <sp:MustSupportRefThumbprint/>
+ <sp:MustSupportRefEncryptedKey/>
+ </wsp:Policy>
+ </sp:Wss11>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+
+ <wsp:Policy wsu:Id="SecurityService_Input_Policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:EncryptedParts>
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <sp:SignedParts>
+ <sp:Body/>
+ </sp:SignedParts>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="SecurityService_Output_Policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:EncryptedParts>
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <sp:SignedParts>
+ <sp:Body/>
+ </sp:SignedParts>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+</wsdl:definitions>
\ No newline at end of file
12 years, 4 months
JBossWS SVN: r16703 - stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/resources.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-10 05:07:07 -0400 (Mon, 10 Sep 2012)
New Revision: 16703
Modified:
stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/resources/jbossws-installer-macros.xml
Log:
Endorse jaxws-api.jar
Modified: stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2012-09-10 08:56:21 UTC (rev 16702)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2012-09-10 09:07:07 UTC (rev 16703)
@@ -62,6 +62,7 @@
<patternset id="jbossws.lib.endorsed.patternset">
<include name="**/jaxb-api.jar"/>
+ <include name="**/jaxws-api.jar"/> <!-- Required due to JDK7 shipping with JAXWS 2.2, while we need JAXWS 2.1 API level on EAP 5.x -->
<include name="**/jbossws-cxf-factories.jar"/>
</patternset>
Modified: stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/resources/jbossws-installer-macros.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/resources/jbossws-installer-macros.xml 2012-09-10 08:56:21 UTC (rev 16702)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/resources/src/main/resources/resources/jbossws-installer-macros.xml 2012-09-10 09:07:07 UTC (rev 16703)
@@ -56,6 +56,7 @@
<patternset id="jbossws.lib.endorsed.patternset">
<include name="**/jbossws-cxf-factories.jar"/>
+ <include name="**/jaxws-api.jar"/> <!-- Required due to JDK7 shipping with JAXWS 2.2, while we need JAXWS 2.1 API level on EAP 5.x -->
</patternset>
<patternset id="jbossws.server.lib.patternset">
12 years, 4 months