JBossWS SVN: r19106 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-11-14 03:57:00 -0500 (Fri, 14 Nov 2014)
New Revision: 19106
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3813] Temporarly excluding test, while waiting for the CXF-4242
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2014-11-13 23:05:38 UTC (rev 19105)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2014-11-14 08:57:00 UTC (rev 19106)
@@ -689,6 +689,9 @@
<!-- # [JBWS-3620] Authentication failures w/ Undertow -->
<exclude>org/jboss/test/ws/jaxws/cxf/httpauth/HelloDigestTestCase*</exclude>
+ <!-- # [JBWS-3813] Add exception name to faultstring/detail/stackTrace -->
+ <exclude>org/jboss/test/ws/jaxws/cxf/jbws3813/*TestCase*</exclude>
+
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
</excludes>
@@ -768,6 +771,9 @@
<!-- # [JBWS-3620] Authentication failures w/ Undertow -->
<exclude>org/jboss/test/ws/jaxws/cxf/httpauth/HelloDigestTestCase*</exclude>
+ <!-- # [JBWS-3813] Add exception name to faultstring/detail/stackTrace -->
+ <exclude>org/jboss/test/ws/jaxws/cxf/jbws3813/*TestCase*</exclude>
+
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
</excludes>
@@ -848,6 +854,9 @@
<!-- # [JBWS-3620] Authentication failures w/ Undertow -->
<exclude>org/jboss/test/ws/jaxws/cxf/httpauth/HelloDigestTestCase*</exclude>
+ <!-- # [JBWS-3813] Add exception name to faultstring/detail/stackTrace -->
+ <exclude>org/jboss/test/ws/jaxws/cxf/jbws3813/*TestCase*</exclude>
+
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
</excludes>
10 years, 1 month
JBossWS SVN: r19105 - stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-11-13 18:05:38 -0500 (Thu, 13 Nov 2014)
New Revision: 19105
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813AnnotationTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813TestCase.java
Log:
[JBWS-3813] Fixing test checks according to CXF-4242 changes
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813AnnotationTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813AnnotationTestCase.java 2014-11-13 09:03:49 UTC (rev 19104)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813AnnotationTestCase.java 2014-11-13 23:05:38 UTC (rev 19105)
@@ -67,7 +67,7 @@
} catch (javax.xml.ws.soap.SOAPFaultException ex) {
String text = ex.getFault().getDetail().getFirstChild().getFirstChild().getTextContent();
assertTrue("stack data not found", text.contains(EndpointTwoImpl.class.getName()));
- assertTrue("Root exception name not found", text.startsWith("java.lang.RuntimeException : my error"));
+ assertTrue("Root exception name not found", text.startsWith("Caused by: java.lang.RuntimeException: my error"));
}
}
}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813TestCase.java 2014-11-13 09:03:49 UTC (rev 19104)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813TestCase.java 2014-11-13 23:05:38 UTC (rev 19105)
@@ -68,7 +68,7 @@
} catch (javax.xml.ws.soap.SOAPFaultException ex) {
String text = ex.getFault().getDetail().getFirstChild().getFirstChild().getTextContent();
assertTrue("stack data not found", text.contains(EndpointOneImpl.class.getName()));
- assertTrue("Root exception name not found", text.startsWith("java.lang.RuntimeException : my error"));
+ assertTrue("Root exception name not found", text.startsWith("Caused by: java.lang.RuntimeException: my error"));
}
}
}
10 years, 1 month
JBossWS SVN: r19104 - in container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices: invocation and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-11-13 04:03:49 -0500 (Thu, 13 Nov 2014)
New Revision: 19104
Modified:
container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/WSMessages.java
container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java
Log:
[JBWS-3839]:excessive ERROR logging on webservices invocation if SoapFault
Modified: container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/WSMessages.java
===================================================================
--- container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/WSMessages.java 2014-11-13 09:00:50 UTC (rev 19103)
+++ container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/WSMessages.java 2014-11-13 09:03:49 UTC (rev 19104)
@@ -148,8 +148,8 @@
@Message(id = 15590, value = "Config %s, %s handler chain %s: doesn't contain handler with name %s")
OperationFailedException missingHandler(String configName, String handlerChainType, String handlerChainId, String handlerName);
- @Message(id = 15594, value = "Method invocation failed with exception: %s")
- String methodInvocationFailed(String message);
+ //@Message(id = 15594, value = "Method invocation failed with exception: %s")
+ //String methodInvocationFailed(String message);
@Message(id = 15595, value = "Unable to get URL for: %s")
DeploymentUnitProcessingException cannotGetURLForDescriptor(@Cause Throwable cause, String resourcePath);
Modified: container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java
===================================================================
--- container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java 2014-11-13 09:00:50 UTC (rev 19103)
+++ container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java 2014-11-13 09:03:49 UTC (rev 19104)
@@ -138,7 +138,6 @@
wsInvocation.setReturnValue(retObj);
}
catch (Throwable t) {
- WSLogger.ROOT_LOGGER.error(MESSAGES.methodInvocationFailed(t.getLocalizedMessage()), t);
handleInvocationException(t);
}
finally {
10 years, 1 month
JBossWS SVN: r19103 - in container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices: invocation and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-11-13 04:00:50 -0500 (Thu, 13 Nov 2014)
New Revision: 19103
Modified:
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/WSMessages.java
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java
Log:
[JBWS-3839]:excessive ERROR logging on webservices invocation if SoapFault
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/WSMessages.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/WSMessages.java 2014-11-12 14:32:41 UTC (rev 19102)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/WSMessages.java 2014-11-13 09:00:50 UTC (rev 19103)
@@ -148,8 +148,8 @@
@Message(id = 15590, value = "Config %s, %s handler chain %s: doesn't contain handler with name %s")
OperationFailedException missingHandler(String configName, String handlerChainType, String handlerChainId, String handlerName);
- @Message(id = 15594, value = "Method invocation failed with exception: %s")
- String methodInvocationFailed(String message);
+ //@Message(id = 15594, value = "Method invocation failed with exception: %s")
+ //String methodInvocationFailed(String message);
@Message(id = 15595, value = "Unable to get URL for: %s")
DeploymentUnitProcessingException cannotGetURLForDescriptor(@Cause Throwable cause, String resourcePath);
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java 2014-11-12 14:32:41 UTC (rev 19102)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java 2014-11-13 09:00:50 UTC (rev 19103)
@@ -138,7 +138,6 @@
wsInvocation.setReturnValue(retObj);
}
catch (Throwable t) {
- WSLogger.ROOT_LOGGER.error(MESSAGES.methodInvocationFailed(t.getLocalizedMessage()), t);
handleInvocationException(t);
}
finally {
10 years, 1 month
JBossWS SVN: r19102 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-11-12 09:32:41 -0500 (Wed, 12 Nov 2014)
New Revision: 19102
Modified:
stack/cxf/trunk/pom.xml
Log:
[JBWS-3849] Move to CXF 3.0.3-SNAPSHOT
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2014-11-12 14:21:57 UTC (rev 19101)
+++ stack/cxf/trunk/pom.xml 2014-11-12 14:32:41 UTC (rev 19102)
@@ -71,7 +71,7 @@
<wildfly810.version>8.1.0.Final</wildfly810.version>
<wildfly900.version>9.0.0.Alpha2-SNAPSHOT</wildfly900.version>
<ejb.api.version>1.0.2.Final</ejb.api.version>
- <cxf.version>3.0.2</cxf.version>
+ <cxf.version>3.0.3-SNAPSHOT</cxf.version>
<cxf.asm.version>3.3.1</cxf.asm.version>
<cxf.xjcplugins.version>3.0.2</cxf.xjcplugins.version>
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
10 years, 1 month
JBossWS SVN: r19101 - stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-11-12 09:21:57 -0500 (Wed, 12 Nov 2014)
New Revision: 19101
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813AnnotationTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813TestCase.java
Log:
[JBWS-3813] Minor fix to the testcase to avoid mislieading failure reports
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813AnnotationTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813AnnotationTestCase.java 2014-11-12 04:51:57 UTC (rev 19100)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813AnnotationTestCase.java 2014-11-12 14:21:57 UTC (rev 19101)
@@ -60,16 +60,14 @@
URL wsdlURL = new URL(endPtAddress + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
EndpointOne proxy = service.getPort(EndpointOne.class);
- boolean isFailed = false;
try
{
proxy.echo("foo");
+ fail("test did not fail as required");
} catch (javax.xml.ws.soap.SOAPFaultException ex) {
String text = ex.getFault().getDetail().getFirstChild().getFirstChild().getTextContent();
- isFailed = text.startsWith("java.lang.RuntimeException : my error");
- assertTrue("stack data not found", isFailed);
- } finally {
- assertTrue("test did not fail as required", isFailed);
+ assertTrue("stack data not found", text.contains(EndpointTwoImpl.class.getName()));
+ assertTrue("Root exception name not found", text.startsWith("java.lang.RuntimeException : my error"));
}
}
}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813TestCase.java 2014-11-12 04:51:57 UTC (rev 19100)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813TestCase.java 2014-11-12 14:21:57 UTC (rev 19101)
@@ -16,20 +16,22 @@
*/
package org.jboss.test.ws.jaxws.cxf.jbws3813;
+import java.io.File;
+import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
import junit.framework.Test;
+
import org.jboss.shrinkwrap.api.asset.FileAsset;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestHelper;
import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
import org.jboss.wsf.test.JBossWSTestSetup;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-import java.io.File;
-import java.net.URL;
-import java.util.LinkedList;
-import java.util.List;
-
public class JBWS3813TestCase extends JBossWSTest
{
public static BaseDeployment<?>[] createDeployments() {
@@ -59,16 +61,14 @@
URL wsdlURL = new URL(endPtAddress + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
EndpointOne proxy = service.getPort(EndpointOne.class);
- boolean isFailed = false;
try
{
proxy.echo("foo");
+ fail("test did not fail as required");
} catch (javax.xml.ws.soap.SOAPFaultException ex) {
String text = ex.getFault().getDetail().getFirstChild().getFirstChild().getTextContent();
- isFailed = text.startsWith("java.lang.RuntimeException : my error");
- assertTrue("stack data not found", isFailed);
- } finally {
- assertTrue("test did not fail as required", isFailed);
+ assertTrue("stack data not found", text.contains(EndpointOneImpl.class.getName()));
+ assertTrue("Root exception name not found", text.startsWith("java.lang.RuntimeException : my error"));
}
}
}
10 years, 1 month
JBossWS SVN: r19100 - in stack/cxf/trunk/modules/testsuite/cxf-tests/src/test: resources/jaxws/cxf/jbws3813/WEB-INF and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: rsearls
Date: 2014-11-11 23:51:57 -0500 (Tue, 11 Nov 2014)
New Revision: 19100
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/EndpointTwoImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813AnnotationTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3813/WEB-INF/webTwo.xml
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813TestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3813/WEB-INF/jaxws-endpoint-config.xml
Log:
[JBWS-3813] added test for property setting by EndpointConfig annotation and correct valid return text.
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/EndpointTwoImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/EndpointTwoImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/EndpointTwoImpl.java 2014-11-12 04:51:57 UTC (rev 19100)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, 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.cxf.jbws3813;
+
+import org.jboss.ws.api.annotation.EndpointConfig;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(name = "EndpointTwo", targetNamespace = "http://org.jboss.ws.jaxws.cxf/jbws3813", serviceName = "ServiceTwo")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@EndpointConfig(configName="MyEndpointTwoImpl", configFile="jaxws-endpoint-config.xml")
+public class EndpointTwoImpl implements EndpointOne
+{
+ @WebMethod
+ public String echo(String input)
+ {
+ throw new RuntimeException("my error");
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813AnnotationTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813AnnotationTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813AnnotationTestCase.java 2014-11-12 04:51:57 UTC (rev 19100)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2013, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed 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.cxf.jbws3813;
+
+import junit.framework.Test;
+import org.jboss.shrinkwrap.api.asset.FileAsset;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import java.io.File;
+import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
+
+public class JBWS3813AnnotationTestCase extends JBossWSTest
+{
+ public static JBossWSTestHelper.BaseDeployment<?>[] createDeployments() {
+ List<JBossWSTestHelper.BaseDeployment<?>> list = new LinkedList<JBossWSTestHelper.BaseDeployment<?>>();
+ list.add(new JBossWSTestHelper.WarDeployment("jaxws-cxf-jbws3813-two.war") { {
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3813.EndpointOne.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3813.EndpointTwoImpl.class)
+ .add(new FileAsset(new File(JBossWSTestHelper.getTestResourcesDir() +
+ "/jaxws/cxf/jbws3813/WEB-INF/jaxws-endpoint-config.xml")),
+ "jaxws-endpoint-config.xml")
+ .add(new FileAsset(new File(JBossWSTestHelper.getTestResourcesDir() +
+ "/jaxws/cxf/jbws3813/WEB-INF/webTwo.xml")),
+ "WEB-INF/web.xml");
+ }
+ });
+ return list.toArray(new JBossWSTestHelper.BaseDeployment<?>[list.size()]);
+ }
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS3813AnnotationTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
+ }
+
+ public void testExceptionFlags() throws Exception {
+ String endPtAddress = "http://" + getServerHost() + ":8080/jaxws-cxf-jbws3813-two/ServiceTwo";
+ QName serviceName = new QName("http://org.jboss.ws.jaxws.cxf/jbws3813", "ServiceTwo");
+ URL wsdlURL = new URL(endPtAddress + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ EndpointOne proxy = service.getPort(EndpointOne.class);
+ boolean isFailed = false;
+ try
+ {
+ proxy.echo("foo");
+ } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+ String text = ex.getFault().getDetail().getFirstChild().getFirstChild().getTextContent();
+ isFailed = text.startsWith("java.lang.RuntimeException : my error");
+ assertTrue("stack data not found", isFailed);
+ } finally {
+ assertTrue("test did not fail as required", isFailed);
+ }
+ }
+}
+
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813TestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3813/JBWS3813TestCase.java 2014-11-12 04:51:57 UTC (rev 19100)
@@ -65,7 +65,7 @@
proxy.echo("foo");
} catch (javax.xml.ws.soap.SOAPFaultException ex) {
String text = ex.getFault().getDetail().getFirstChild().getFirstChild().getTextContent();
- isFailed = text.startsWith("org.jboss.test.ws.jaxws.cxf.jbws3813.EndpointOneImpl!echo!EndpointOneImpl.java!35");
+ isFailed = text.startsWith("java.lang.RuntimeException : my error");
assertTrue("stack data not found", isFailed);
} finally {
assertTrue("test did not fail as required", isFailed);
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3813/WEB-INF/jaxws-endpoint-config.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3813/WEB-INF/jaxws-endpoint-config.xml 2014-11-12 03:59:20 UTC (rev 19099)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3813/WEB-INF/jaxws-endpoint-config.xml 2014-11-12 04:51:57 UTC (rev 19100)
@@ -15,4 +15,16 @@
</property>
</endpoint-config>
+ <endpoint-config>
+ <config-name>MyEndpointTwoImpl</config-name>
+ <property>
+ <property-name>faultStackTraceEnabled</property-name>
+ <property-value>true</property-value>
+ </property>
+ <property>
+ <property-name>exceptionMessageCauseEnabled</property-name>
+ <property-value>true</property-value>
+ </property>
+ </endpoint-config>
+
</jaxws-config>
\ No newline at end of file
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3813/WEB-INF/webTwo.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3813/WEB-INF/webTwo.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3813/WEB-INF/webTwo.xml 2014-11-12 04:51:57 UTC (rev 19100)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
+
+ <servlet>
+ <servlet-name>EpServletTwo</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.cxf.jbws3813.EndpointTwoImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>EpServletTwo</servlet-name>
+ <url-pattern>/ServiceTwo</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
10 years, 1 month
JBossWS SVN: r19099 - in projects/wsi-bp-test/branches/jboss7x: bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/anon and 18 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-11-11 22:59:20 -0500 (Tue, 11 Nov 2014)
New Revision: 19099
Added:
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ClientCallbackHandler.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/STSCallbackHandler.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/SampleSTS.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServerCallbackHandler.java
Removed:
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceIface.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceImpl.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedSignEncryptTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptDeploymentArchives.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/DeploymentArchives.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SAMLValidator.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/DeploymentArchives.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustActAsTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustBearerTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustHolderOfKeyTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustOnBehalfOfTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/actas/
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/bearer/
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/holderofkey/
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/onbehalfof/
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/picketlink/
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/service/
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/shared/
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/sts/
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/stsbearer/
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/stsholderofkey/
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/wsf/test/CryptoHelper.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/META-INF/permissions.xml
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/actasKeystore.properties
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/actasstore.jks
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/bearer/
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/holderofkey/
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/ActAsService.wsdl
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/ActAsService_schema1.xsd
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/BearerService.wsdl
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/BearerService_schema1.xsd
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/HolderOfKeyService.wsdl
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/HolderOfKeyService_schema1.xsd
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/OnBehalfOfService.wsdl
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/OnBehalfOfService_schema1.xsd
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/bearer-ws-trust-1.4-service.wsdl
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/holderofkey-ws-trust-1.4-service.wsdl
Modified:
projects/wsi-bp-test/branches/jboss7x/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/anon/Test1189AnonTestCase.java
projects/wsi-bp-test/branches/jboss7x/bp20-tests/src/test/java/org/jboss/test/ws/jaxws/bp20/wsa/test1189/anon/Test1189AnonTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/pom.xml
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/JavaFirstServiceImpl.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/KeystorePasswordCallback.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/MultipleClientsSignEncryptTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/ServerUsernamePasswordCallback.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptHelper.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernameOverTransportTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernamePasswordCallback.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernameTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/EJBServiceImpl.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationDigestTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationEJBTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameDigestPasswordCallback.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernamePasswordCallback.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/KeystorePasswordCallback.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SamlCallbackHandler.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/ServerUsernamePasswordCallback.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2311Impl.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2321Impl.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/UsernamePasswordCallback.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples21xTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples22xTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/secconv/KeystorePasswordCallback.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/secconv/SecureConversationTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestUtils.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/wsf/test/TestServlet.java
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/jaxws-endpoint-config.xml
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/wsdl/SecurityService.wsdl
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign-encrypt/META-INF/jaxws-client-config.xml
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign/META-INF-server/wsdl/SecurityService.wsdl
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign/WEB-INF/wsdl/SecurityService.wsdl
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jaxws-endpoint-config.xml
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService.wsdl
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/META-INF/clientstore.jks
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-roles.properties
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-users.properties
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/picketlink-sts.xml
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/stsstore.jks
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/web.xml
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/PicketLinkSTS.wsdl
projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/SecurityService.wsdl
projects/wsi-bp-test/branches/jboss7x/pom.xml
Log:
Rollback to r18641 and restore jboss720 profile
Modified: projects/wsi-bp-test/branches/jboss7x/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/anon/Test1189AnonTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/anon/Test1189AnonTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/anon/Test1189AnonTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -34,6 +34,7 @@
import org.apache.cxf.ws.addressing.AttributedURIType;
import org.apache.cxf.ws.addressing.EndpointReferenceType;
import org.apache.cxf.ws.addressing.JAXWSAConstants;
+import org.apache.cxf.ws.addressing.impl.AddressingPropertiesImpl;
import org.jboss.test.ws.jaxws.bp12.common.BP12Test;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
@@ -59,7 +60,7 @@
EndpointReferenceType wsaTo = new EndpointReferenceType();
- AddressingProperties addrProperties = new AddressingProperties();
+ AddressingProperties addrProperties = new AddressingPropertiesImpl();
AttributedURIType epr = new AttributedURIType();
epr.setValue( "http://" + getServerHost() + ":8080/jaxws-bp12test1189-anon/Test1189Anon");
wsaTo.setAddress(epr);
@@ -73,6 +74,7 @@
}
catch (SOAPFaultException e)
{
+ e.printStackTrace();
assertTrue("only anonymous supported error message is expected", e.getMessage().contains("Found non-anonymous address but only anonymous supported"));
}
Modified: projects/wsi-bp-test/branches/jboss7x/bp20-tests/src/test/java/org/jboss/test/ws/jaxws/bp20/wsa/test1189/anon/Test1189AnonTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bp20-tests/src/test/java/org/jboss/test/ws/jaxws/bp20/wsa/test1189/anon/Test1189AnonTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bp20-tests/src/test/java/org/jboss/test/ws/jaxws/bp20/wsa/test1189/anon/Test1189AnonTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -33,6 +33,7 @@
import org.apache.cxf.ws.addressing.AttributedURIType;
import org.apache.cxf.ws.addressing.EndpointReferenceType;
import org.apache.cxf.ws.addressing.JAXWSAConstants;
+import org.apache.cxf.ws.addressing.impl.AddressingPropertiesImpl;
import org.jboss.test.ws.jaxws.bp20.common.BP20Test;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
@@ -58,7 +59,7 @@
EndpointReferenceType wsaTo = new EndpointReferenceType();
- AddressingProperties addrProperties = new AddressingProperties();
+ AddressingProperties addrProperties = new AddressingPropertiesImpl();
AttributedURIType epr = new AttributedURIType();
epr.setValue( "http://" + getServerHost() + ":8080/jaxws-bp20test1189-anon/Test1189Anon");
wsaTo.setAddress(epr);
@@ -72,6 +73,7 @@
}
catch (Exception e)
{
+ e.printStackTrace();
assertTrue("only anonymous supported error message is expected", e.getMessage().contains("Found non-anonymous address but only anonymous supported"));
}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/pom.xml
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/pom.xml 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/pom.xml 2014-11-12 03:59:20 UTC (rev 19099)
@@ -12,19 +12,8 @@
<artifactId>wsi-bp-testsuite</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
- </parent>
- <!-- Properties -->
- <properties>
- <shrinkwrap.version>1.1.3</shrinkwrap.version>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.jboss.shrinkwrap</groupId>
- <artifactId>shrinkwrap-depchain</artifactId>
- <version>${shrinkwrap.version}</version>
- <type>pom</type>
- </dependency>
- </dependencies>
+ </parent>
+
<!-- Profiles -->
<profiles>
<!--
@@ -87,27 +76,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>exclude-integration-tests-BC-related</id>
- <activation>
- <property>
- <name>exclude-integration-tests-BC-related</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes combine.children="append">
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedSignEncryptTestCase*</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceIface.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceIface.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceIface.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,35 +0,0 @@
-/*
- * 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.basic;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-
-@WebService
-(
- targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy"
-)
-public interface AnnotatedServiceIface
-{
- @WebMethod
- String sayHello();
-}
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceImpl.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceImpl.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceImpl.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,53 +0,0 @@
-/*
- * 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.basic;
-
-import javax.jws.WebService;
-
-import org.apache.cxf.annotations.EndpointProperties;
-import org.apache.cxf.annotations.EndpointProperty;
-import org.jboss.ws.api.annotation.PolicySets;
-import org.jboss.wsf.stack.cxf.extensions.policy.Constants;
-
-@WebService(
- portName = "AnnotatedSecurityServicePort",
- serviceName = "AnnotatedSecurityService",
- name = "AnnotatedServiceIface",
- endpointInterface = "org.jboss.test.ws.jaxws.samples.wsse.policy.basic.AnnotatedServiceIface",
- targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy"
-)
-@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 = "alice"),
- @EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback")
- }
-)
-(a)PolicySets(Constants.AsymmetricBinding_X509v1_GCM256OAEP_ProtectTokens_POLICY_SET)
-public class AnnotatedServiceImpl implements AnnotatedServiceIface
-{
- public String sayHello()
- {
- return "Secure Hello World!";
- }
-}
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedSignEncryptTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedSignEncryptTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedSignEncryptTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2013, 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.basic;
-
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-
-import junit.framework.Test;
-
-import org.apache.cxf.message.Message;
-import org.apache.cxf.ws.security.SecurityConstants;
-import org.jboss.ws.common.IOUtils;
-import org.jboss.wsf.test.CryptoHelper;
-import org.jboss.wsf.test.JBossWSCXFTestSetup;
-import org.jboss.wsf.test.JBossWSTest;
-
-/**
- * WS-SecurityPolicy code first dev test
- *
- * @author alessio.soldano(a)jboss.com
- * @since 05-Jun-2013
- */
-public final class AnnotatedSignEncryptTestCase extends JBossWSTest
-{
- private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-sign-encrypt-gcm-code-first/AnnotatedSecurityService";
-
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(AnnotatedSignEncryptTestCase.class, SignEncryptDeploymentArchives.SERVER_GCM_CODEFIRST_WAR + " " + SignEncryptDeploymentArchives.CLIENT_JAR);
- }
-
- public void testWsdl() throws Exception
- {
- URL wsdlURL = new URL(serviceURL + "?wsdl");
- assertTrue(IOUtils.readAndCloseStream(wsdlURL.openStream()).contains("AsymmetricBinding_X509v1_GCM256OAEP_ProtectTokens_binding_policy"));
- }
-
- public void test() throws Exception
- {
- try {
- QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy", "AnnotatedSecurityService");
- URL wsdlURL = new URL(serviceURL + "?wsdl");
- Service service = Service.create(wsdlURL, serviceName);
- AnnotatedServiceIface proxy = (AnnotatedServiceIface)service.getPort(AnnotatedServiceIface.class);
- setupWsse(proxy);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
- ((BindingProvider)proxy).getRequestContext().put(Message.RECEIVE_TIMEOUT, 120000);
- assertEquals("Secure Hello World!", proxy.sayHello());
- } catch (Exception e) {
- throw CryptoHelper.checkAndWrapException(e);
- }
- }
-
- private void setupWsse(AnnotatedServiceIface proxy)
- {
- ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
- ((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: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/JavaFirstServiceImpl.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/JavaFirstServiceImpl.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/JavaFirstServiceImpl.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -23,9 +23,8 @@
import javax.jws.WebService;
-import org.apache.cxf.annotations.EndpointProperties;
-import org.apache.cxf.annotations.EndpointProperty;
import org.apache.cxf.annotations.Policy;
+import org.jboss.ws.api.annotation.EndpointConfig;
@WebService
(
@@ -35,10 +34,7 @@
targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy"
)
@Policy(placement = Policy.Placement.BINDING, uri = "JavaFirstPolicy.xml")
-@EndpointProperties(value = {
- @EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServerUsernamePasswordCallback")
- }
-)
+@EndpointConfig(configFile = "WEB-INF/jaxws-endpoint-config.xml", configName = "Custom WS-Security Endpoint")
public class JavaFirstServiceImpl //Not extending JavaFirstServiceIface for testing purposes only, to avoid having to
//move the @Policy annotation in the interface, which is also used on client side.
{
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/KeystorePasswordCallback.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/KeystorePasswordCallback.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/KeystorePasswordCallback.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -21,23 +21,51 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.basic;
+import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-import org.jboss.wsf.stack.cxf.extensions.security.PasswordCallbackHandler;
+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 KeystorePasswordCallback extends PasswordCallbackHandler
+public class KeystorePasswordCallback implements CallbackHandler
{
+
+ private Map<String, String> passwords = new HashMap<String, String>();
+
public KeystorePasswordCallback()
{
- super(getInitMap());
- }
-
- private static Map<String, String> getInitMap() {
- Map<String, String> passwords = new HashMap<String, String>();
passwords.put("alice", "password");
passwords.put("bob", "password");
passwords.put("john", "password");
- return passwords;
}
+
+ /**
+ * It attempts to get the password from the private
+ * alias/passwords map.
+ */
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
+ {
+ for (int i = 0; i < callbacks.length; i++)
+ {
+ WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+
+ String pass = passwords.get(pc.getIdentifier());
+ if (pass != null)
+ {
+ pc.setPassword(pass);
+ return;
+ }
+ }
+ }
+
+ /**
+ * Add an alias/password pair to the callback mechanism.
+ */
+ public void setAliasPassword(String alias, String password)
+ {
+ passwords.put(alias, password);
+ }
}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/MultipleClientsSignEncryptTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/MultipleClientsSignEncryptTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/MultipleClientsSignEncryptTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -21,10 +21,7 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.basic;
-import java.io.File;
import java.net.URL;
-import java.util.LinkedList;
-import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
@@ -34,11 +31,8 @@
import junit.framework.Test;
import org.apache.cxf.ws.security.SecurityConstants;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
/**
* WS-Security Policy sign & encrypt test case
@@ -51,38 +45,10 @@
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-sign-encrypt-mc/SecurityService";
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.JarDeployment("jaxws-samples-wsse-policy-sign-encrypt-mc-client.jar") { {
- archive
- .addManifest()
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/META-INF/alice.jks"), "alice.jks")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/META-INF/alice.properties"), "alice.properties")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/META-INF/john.jks"), "john.jks")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/META-INF/john.properties"), "john.properties");
- }
- });
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-sign-encrypt-mc.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.MultipleClientsServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/bob2.jks"), "classes/bob2.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/bob2.properties"), "classes/bob2.properties")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl"), "wsdl/SecurityService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/wsdl/SecurityService_schema1.xsd"), "wsdl/SecurityService_schema1.xsd");
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
- }
-
public static Test suite()
{
- return new JBossWSCXFTestSetup(MultipleClientsSignEncryptTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
+ return new JBossWSCXFTestSetup(MultipleClientsSignEncryptTestCase.class,
+ "jaxws-samples-wsse-policy-sign-encrypt-mc-client.jar jaxws-samples-wsse-policy-sign-encrypt-mc.war");
}
public void testAlice() throws Exception
@@ -92,15 +58,13 @@
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
setupWsse(proxy, "alice");
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
-
try
{
assertEquals("Multiple Clients Secure Hello World!", proxy.sayHello());
}
catch (SOAPFaultException e)
{
- throw new Exception("Error " + e.getMessage() + " - please check that the Bouncy Castle provider is installed.", e);
+ throw new Exception("Please check that the Bouncy Castle provider is installed.", e);
}
}
@@ -111,19 +75,19 @@
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
setupWsse(proxy, "john");
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
try
{
assertEquals("Multiple Clients Secure Hello World!", proxy.sayHello());
}
catch (SOAPFaultException e)
{
- throw new Exception("Error " + e.getMessage() + " - please check that the Bouncy Castle provider is installed.", e);
+ throw new Exception("Please check that the Bouncy Castle provider is installed.", e);
}
}
private void setupWsse(ServiceIface proxy, String client)
{
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:7070/jaxws-samples-wsse-policy-sign-encrypt-mc/SecurityS...");
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/" + client + ".properties"));
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/" + client + ".properties"));
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/ServerUsernamePasswordCallback.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/ServerUsernamePasswordCallback.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/ServerUsernamePasswordCallback.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -21,21 +21,20 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.basic;
-import java.util.HashMap;
-import java.util.Map;
+import java.io.IOException;
-import org.jboss.wsf.stack.cxf.extensions.security.PasswordCallbackHandler;
+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 extends PasswordCallbackHandler
+public class ServerUsernamePasswordCallback implements CallbackHandler
{
- public ServerUsernamePasswordCallback()
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
{
- super(getInitMap());
+ WSPasswordCallback pc = (WSPasswordCallback)callbacks[0];
+ //this CallbackHandler is meant for use with WSS4J 1.6, see http://ws.apache.org/wss4j/wss4j16.html
+ if ("kermit".equals(pc.getIdentifier()))
+ pc.setPassword("thefrog");
}
-
- private static Map<String, String> getInitMap() {
- Map<String, String> passwords = new HashMap<String, String>();
- passwords.put("kermit", "thefrog");
- return passwords;
- }
}
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptDeploymentArchives.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptDeploymentArchives.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptDeploymentArchives.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,110 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2014, 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.basic;
-
-import java.io.File;
-
-import org.jboss.shrinkwrap.api.asset.StringAsset;
-import org.jboss.wsf.test.JBossWSTestHelper;
-
-public final class SignEncryptDeploymentArchives
-{
- public static final String SERVER_WAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-sign-encrypt.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/bob.jks"), "classes/bob.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/bob.properties"), "classes/bob.properties")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/jaxws-endpoint-config.xml"), "jaxws-endpoint-config.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl"), "wsdl/SecurityService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/wsdl/SecurityService_schema1.xsd"), "wsdl/SecurityService_schema1.xsd")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/web.xml"));
- }
- });
-
- public static final String CLIENT_WAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-sign-encrypt-client.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client services\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.SignEncryptHelper.class)
- .addClass(org.jboss.wsf.test.ClientHelper.class)
- .addClass(org.jboss.wsf.test.CryptoHelper.class)
- .addClass(org.jboss.wsf.test.TestServlet.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/META-INF/alice.properties"), "classes/META-INF/alice.properties")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/META-INF/alice.jks"), "classes/META-INF/alice.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/META-INF/jaxws-client-config.xml"), "classes/META-INF/jaxws-client-config.xml");
- }
- });
-
- public static final String CLIENT_JAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.JarDeployment("jaxws-samples-wsse-policy-sign-encrypt-client.jar") { {
- archive
- .addManifest()
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/META-INF/alice.jks"), "alice.jks")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/META-INF/alice.properties"), "alice.properties")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign-encrypt/META-INF/jaxws-client-config.xml"), "jaxws-client-config.xml");
- }
- });
-
- public static final String SERVER_GCM_WAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-sign-encrypt-gcm.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/bob.jks"), "classes/bob.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/bob.properties"), "classes/bob.properties")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/jaxws-endpoint-config.xml"), "jaxws-endpoint-config.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/wsdl/SecurityService.wsdl"), "wsdl/SecurityService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/wsdl/SecurityService_schema1.xsd"), "wsdl/SecurityService_schema1.xsd")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/web.xml"));
- }
- });
-
- public static final String SERVER_GCM_CODEFIRST_WAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-sign-encrypt-gcm-code-first.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.AnnotatedServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.AnnotatedServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/bob.jks"), "classes/bob.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/bob.properties"), "classes/bob.properties");
- }
- });
-
-
- private SignEncryptDeploymentArchives() {
- //NOOP
- }
-}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -21,11 +21,12 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.basic;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
import java.net.URL;
import junit.framework.Test;
-import org.jboss.ws.common.IOUtils;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
@@ -42,8 +43,10 @@
public static Test suite()
{
- return new JBossWSCXFTestSetup(SignEncryptGCMTestCase.class,
- SignEncryptDeploymentArchives.CLIENT_JAR + " " + SignEncryptDeploymentArchives.CLIENT_WAR + " " + SignEncryptDeploymentArchives.SERVER_GCM_WAR);
+ return new JBossWSCXFTestSetup(SignEncryptGCMTestCase.class,
+ "jaxws-samples-wsse-policy-sign-encrypt-client.jar " +
+ "jaxws-samples-wsse-policy-sign-encrypt-client.war " +
+ "jaxws-samples-wsse-policy-sign-encrypt-gcm.war");
}
public void testClientSide() throws Exception
@@ -72,6 +75,7 @@
{
URL url = new URL("http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-sign-encrypt-client?" +
"path=/jaxws-samples-wsse-policy-sign-encrypt-gcm&method=testSignEncryptUsingConfigProperties&helper=" + SignEncryptHelper.class.getName());
- assertEquals("1", IOUtils.readAndCloseStream(url.openStream()));
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertEquals("1", br.readLine());
}
}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptHelper.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptHelper.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptHelper.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -34,7 +34,6 @@
import org.apache.cxf.ws.security.SecurityConstants;
import org.jboss.ws.api.configuration.ClientConfigUtil;
import org.jboss.wsf.test.ClientHelper;
-import org.jboss.wsf.test.CryptoHelper;
public class SignEncryptHelper implements ClientHelper
{
@@ -92,12 +91,14 @@
}
catch (SOAPFaultException e)
{
- throw CryptoHelper.checkAndWrapException(e);
+ throw new Exception("Please check that the Bouncy Castle provider is installed.", e);
}
}
private void setupWsse(ServiceIface proxy)
{
+ String address = targetEndpoint.replaceFirst("8080", "7070");
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, address);
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
((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"));
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -21,11 +21,12 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.basic;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
import java.net.URL;
import junit.framework.Test;
-import org.jboss.ws.common.IOUtils;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
@@ -42,7 +43,9 @@
public static Test suite()
{
return new JBossWSCXFTestSetup(SignEncryptTestCase.class,
- SignEncryptDeploymentArchives.CLIENT_JAR + " " + SignEncryptDeploymentArchives.CLIENT_WAR + " " + SignEncryptDeploymentArchives.SERVER_WAR);
+ "jaxws-samples-wsse-policy-sign-encrypt-client.jar " +
+ "jaxws-samples-wsse-policy-sign-encrypt-client.war " +
+ "jaxws-samples-wsse-policy-sign-encrypt.war");
}
public void testClientSide() throws Exception
@@ -63,13 +66,15 @@
{
URL url = new URL("http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-sign-encrypt-client?" +
"path=/jaxws-samples-wsse-policy-sign-encrypt&method=testSignEncrypt&helper=" + SignEncryptHelper.class.getName());
- assertEquals("1", IOUtils.readAndCloseStream(url.openStream()));
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertEquals("1", br.readLine());
}
public void testServerSideUsingConfigProperties() throws Exception
{
URL url = new URL("http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-sign-encrypt-client?" +
"path=/jaxws-samples-wsse-policy-sign-encrypt&method=testSignEncryptUsingConfigProperties&helper=" + SignEncryptHelper.class.getName());
- assertEquals("1", IOUtils.readAndCloseStream(url.openStream()));
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertEquals("1", br.readLine());
}
}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -21,10 +21,7 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.basic;
-import java.io.File;
import java.net.URL;
-import java.util.LinkedList;
-import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
@@ -33,11 +30,8 @@
import junit.framework.Test;
import org.apache.cxf.ws.security.SecurityConstants;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
/**
* WS-Security Policy sign test case
@@ -47,75 +41,33 @@
*/
public final class SignTestCase extends JBossWSTest
{
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.JarDeployment("jaxws-samples-wsse-policy-sign-ejb.jar") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.EJBServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign/META-INF-server/bob.jks"), "bob.jks")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign/META-INF-server/bob.properties"), "bob.properties")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign/META-INF-server/jaxws-endpoint-config.xml"), "jaxws-endpoint-config.xml")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign/META-INF-server/wsdl/SecurityService.wsdl"), "wsdl/SecurityService.wsdl")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign/META-INF-server/wsdl/SecurityService_schema1.xsd"), "wsdl/SecurityService_schema1.xsd");
- }
- });
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-sign.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign/WEB-INF/bob.jks"), "classes/bob.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign/WEB-INF/bob.properties"), "classes/bob.properties")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign/WEB-INF/jaxws-endpoint-config.xml"), "jaxws-endpoint-config.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign/WEB-INF/wsdl/SecurityService.wsdl"), "wsdl/SecurityService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign/WEB-INF/wsdl/SecurityService_schema1.xsd"), "wsdl/SecurityService_schema1.xsd")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign/WEB-INF/web.xml"));
- }
- });
- list.add(new JBossWSTestHelper.JarDeployment("jaxws-samples-wsse-policy-sign-client.jar") { {
- archive
- .addManifest()
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign/META-INF/alice.jks"), "alice.jks")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/sign/META-INF/alice.properties"), "alice.properties");
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
- }
+ private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-sign";
+ private final String serviceURLEJB = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-sign-ejb/SecurityService/EJBServiceImpl";
public static Test suite()
{
- return new JBossWSCXFTestSetup(SignTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
+ return new JBossWSCXFTestSetup(SignTestCase.class, "jaxws-samples-wsse-policy-sign-client.jar jaxws-samples-wsse-policy-sign.war jaxws-samples-wsse-policy-sign-ejb.jar");
}
public void test() throws Exception
{
QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy", "SecurityService");
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-sign?wsdl");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
setupWsse(proxy);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":7070/jaxws-samples-wsse-policy-sign");
assertEquals("Secure Hello World!", proxy.sayHello());
}
public void testEJB() throws Exception
{
QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy", "SecurityService");
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-sign-ejb/SecurityService/EJBServiceImpl?wsdl");
+ URL wsdlURL = new URL(serviceURLEJB + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURLEJB.replaceFirst("8080", "7070"));
setupWsse(proxy);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":7070/jaxws-samples-wsse-policy-sign-ejb/SecurityService/EJBServiceImpl");
assertEquals("EJB Secure Hello World!", proxy.sayHello());
}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernameOverTransportTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernameOverTransportTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernameOverTransportTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -21,11 +21,8 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.basic;
-import java.io.File;
import java.net.URL;
import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
@@ -35,11 +32,8 @@
import junit.framework.Test;
import org.apache.cxf.ws.security.SecurityConstants;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
import org.jboss.wsf.test.JBossWSTestSetup;
/**
@@ -52,26 +46,6 @@
{
private final String serviceURL = "https://" + getServerHost() + ":8443/jaxws-samples-wsse-policy-username";
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-username.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServerUsernamePasswordCallback.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/username/WEB-INF/jaxws-endpoint-config.xml"), "jaxws-endpoint-config.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/username/WEB-INF/wsdl/SecurityService.wsdl"), "wsdl/SecurityService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/username/WEB-INF/wsdl/SecurityService_schema1.xsd"), "wsdl/SecurityService_schema1.xsd")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/username/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
- }
-
public static Test suite()
{
/** System properties - currently set at testsuite start time
@@ -80,11 +54,22 @@
System.setProperty("javax.net.ssl.trustStoreType", "jks");
System.setProperty("org.jboss.security.ignoreHttpsHost", "true");
*/
- JBossWSTestSetup setup = new JBossWSCXFTestSetup(UsernameOverTransportTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
+ JBossWSTestSetup setup = new JBossWSCXFTestSetup(UsernameOverTransportTestCase.class, "jaxws-samples-wsse-policy-username.war");
Map<String, String> sslOptions = new HashMap<String, String>();
- sslOptions.put("server-identity.ssl.keystore-path", System.getProperty("org.jboss.ws.testsuite.server.keystore"));
- sslOptions.put("server-identity.ssl.keystore-password", "changeit");
- sslOptions.put("server-identity.ssl.alias", "tomcat");
+ if (isTargetJBoss7())
+ {
+ 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");
+ }
+ else
+ {
+ sslOptions.put("keystore-path", System.getProperty("org.jboss.ws.testsuite.server.keystore"));
+ sslOptions.put("keystore-password", "changeit");
+ sslOptions.put("verify-client", "false");
+ sslOptions.put("alias", "tomcat");
+ }
setup.setHttpsConnectorRequirement(sslOptions);
return setup;
}
@@ -96,7 +81,6 @@
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
setupWsse(proxy, "kermit");
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
assertEquals("Secure Hello World!", proxy.sayHello());
}
@@ -107,7 +91,6 @@
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
setupWsse(proxy, "snoopy");
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
try
{
proxy.sayHello();
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernamePasswordCallback.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernamePasswordCallback.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernamePasswordCallback.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -26,9 +26,8 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
+import org.apache.ws.security.WSPasswordCallback;
-import org.apache.wss4j.common.ext.WSPasswordCallback;
-
public class UsernamePasswordCallback implements CallbackHandler
{
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernameTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernameTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernameTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -21,10 +21,7 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.basic;
-import java.io.File;
import java.net.URL;
-import java.util.LinkedList;
-import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
@@ -33,11 +30,8 @@
import junit.framework.Test;
import org.apache.cxf.ws.security.SecurityConstants;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
/**
* WS-Security Policy username test case
@@ -50,32 +44,9 @@
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-username-unsecure-transport/service";
private final String javaFirstServiceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-username-unsecure-transport/javafirst-service";
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-username-unsecure-transport.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.JavaFirstServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.JavaFirstServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServerUsernamePasswordCallback.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.basic.ServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/username-unsecure-transport/JavaFirstPolicy.xml"), "classes/JavaFirstPolicy.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/username-unsecure-transport/WEB-INF/jaxws-endpoint-config.xml"), "jaxws-endpoint-config.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/username-unsecure-transport/WEB-INF/wsdl/SecurityService.wsdl"), "wsdl/SecurityService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/username-unsecure-transport/WEB-INF/wsdl/SecurityService_schema1.xsd"), "wsdl/SecurityService_schema1.xsd")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/basic/username-unsecure-transport/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
- }
-
public static Test suite()
{
- return new JBossWSCXFTestSetup(UsernameTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
+ return new JBossWSCXFTestSetup(UsernameTestCase.class, "jaxws-samples-wsse-policy-username-unsecure-transport.war");
}
public void test() throws Exception
@@ -84,8 +55,8 @@
URL wsdlURL = new URL(serviceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
- setupWsse((BindingProvider)proxy, "kermit");
((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
+ setupWsse((BindingProvider)proxy, "kermit");
assertEquals("Secure Hello World!", proxy.sayHello());
}
@@ -95,8 +66,9 @@
URL wsdlURL = new URL(serviceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
- setupWsse((BindingProvider)proxy, "snoopy");
((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
+
+ setupWsse((BindingProvider)proxy, "snoopy");
try
{
proxy.sayHello();
@@ -114,10 +86,11 @@
URL wsdlURL = new URL(serviceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
+
setupWsseNoCBH((BindingProvider)proxy, "kermit", "thefrog");
assertEquals("Secure Hello World!", proxy.sayHello());
setupWsseNoCBH((BindingProvider)proxy, "kermit", "wrongpassword");
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
try
{
proxy.sayHello();
@@ -136,6 +109,7 @@
Service service = Service.create(wsdlURL, serviceName);
JavaFirstServiceIface proxy = (JavaFirstServiceIface)service.getPort(JavaFirstServiceIface.class);
((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, javaFirstServiceURL.replaceFirst("8080", "7070"));
+
setupWsse((BindingProvider)proxy, "kermit");
assertEquals("Secure Hello World!", proxy.sayHello());
}
@@ -146,8 +120,8 @@
URL wsdlURL = new URL(javaFirstServiceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
JavaFirstServiceIface proxy = (JavaFirstServiceIface)service.getPort(JavaFirstServiceIface.class);
- setupWsse((BindingProvider)proxy, "snoopy");
((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, javaFirstServiceURL.replaceFirst("8080", "7070"));
+ setupWsse((BindingProvider)proxy, "snoopy");
try
{
proxy.sayHello();
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/EJBServiceImpl.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/EJBServiceImpl.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/EJBServiceImpl.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -43,6 +43,8 @@
)
@SecurityDomain("JBossWS")
@EndpointConfig(configFile = "META-INF/jaxws-endpoint-config.xml", configName = "Custom WS-Security Endpoint")
+//be sure to have dependency on org.apache.cxf module when on AS7, otherwise Apache CXF annotations are ignored
+@InInterceptors(interceptors = {"org.jboss.wsf.stack.cxf.security.authentication.SubjectCreatingPolicyInterceptor"})
public class EJBServiceImpl
{
// Provide logging
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationDigestTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationDigestTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationDigestTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -21,11 +21,8 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.jaas;
-import java.io.File;
import java.net.URL;
import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
@@ -35,12 +32,9 @@
import junit.framework.Test;
import org.apache.cxf.ws.security.SecurityConstants;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.stack.cxf.security.authentication.callback.UsernameTokenCallback;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
/**
* WS-Security Policy username test case leveraging JAAS container integration and using digest passwords.
@@ -53,33 +47,10 @@
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-username-jaas-digest";
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-username-jaas-digest.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client,org.apache.cxf.impl\n")) //cxf impl required due to custom interceptor in deployment
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaas.POJOEndpointAuthorizationInterceptor.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaas.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaas.ServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.GreetMe.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.GreetMeResponse.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jaxws-endpoint-config.xml"), "jaxws-endpoint-config.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jboss-web.xml"), "jboss-web.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/wsdl/SecurityService.wsdl"), "wsdl/SecurityService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/wsdl/SecurityService_schema1.xsd"), "wsdl/SecurityService_schema1.xsd")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
- }
-
public static Test suite()
{
JBossWSCXFTestSetup testSetup;
- testSetup = new JBossWSCXFTestSetup(UsernameAuthorizationDigestTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
+ testSetup = new JBossWSCXFTestSetup(UsernameAuthorizationDigestTestCase.class, "jaxws-samples-wsse-policy-username-jaas-digest.war");
Map<String, String> authenticationOptions = new HashMap<String, String>();
authenticationOptions.put("usersProperties",
getResourceFile("jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jbossws-users.properties").getAbsolutePath());
@@ -115,6 +86,7 @@
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
setupWsse(proxy, "snoopy");
((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
+
try
{
proxy.sayHello();
@@ -132,8 +104,9 @@
URL wsdlURL = new URL(serviceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
setupWsse(proxy, "kermit");
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
+
try
{
proxy.greetMe();
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationEJBTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationEJBTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationEJBTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -21,10 +21,7 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.jaas;
-import java.io.File;
import java.net.URL;
-import java.util.LinkedList;
-import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
@@ -33,11 +30,8 @@
import junit.framework.Test;
import org.apache.cxf.ws.security.SecurityConstants;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
/**
* WS-SecurityPolicy (v.1.2) UT testcase with JAAS integration (EJB3)
@@ -49,29 +43,9 @@
{
public final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-username-jaas-ejb/SecurityService/EJBServiceImpl";
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.JarDeployment("jaxws-samples-wsse-policy-username-jaas-ejb.jar") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaas.EJBServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaas.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.GreetMe.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.GreetMeResponse.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jaxws-endpoint-config.xml"), "jaxws-endpoint-config.xml")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/jaas/ejb/META-INF/wsdl/SecurityService.wsdl"), "wsdl/SecurityService.wsdl")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/jaas/ejb/META-INF/wsdl/SecurityService_schema1.xsd"), "wsdl/SecurityService_schema1.xsd");
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
- }
-
public static Test suite()
{
- return new JBossWSCXFTestSetup(UsernameAuthorizationEJBTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()), true);
+ return new JBossWSCXFTestSetup(UsernameAuthorizationEJBTestCase.class, "jaxws-samples-wsse-policy-username-jaas-ejb.jar", true);
}
public void test() throws Exception
@@ -82,6 +56,7 @@
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
setupWsse(proxy, "kermit");
((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
+
assertEquals("Secure Hello World!", proxy.sayHello());
}
@@ -93,6 +68,7 @@
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
setupWsse(proxy, "snoopy");
((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
+
try
{
proxy.sayHello();
@@ -111,7 +87,6 @@
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
setupWsse(proxy, "kermit");
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
try
{
proxy.greetMe();
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -21,10 +21,7 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.jaas;
-import java.io.File;
import java.net.URL;
-import java.util.LinkedList;
-import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
@@ -33,11 +30,8 @@
import junit.framework.Test;
import org.apache.cxf.ws.security.SecurityConstants;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
/**
* WS-Security Policy username test case leveraging JAAS container integration.
@@ -50,32 +44,9 @@
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-username-jaas";
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-username-jaas.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client,org.apache.cxf.impl\n")) //cxf impl required due to custom interceptor in deployment
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaas.POJOEndpointAuthorizationInterceptor.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaas.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaas.ServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.GreetMe.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.GreetMeResponse.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/jaas/auth/WEB-INF/jaxws-endpoint-config.xml"), "jaxws-endpoint-config.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/jaas/auth/WEB-INF/jboss-web.xml"), "jboss-web.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/jaas/auth/WEB-INF/wsdl/SecurityService.wsdl"), "wsdl/SecurityService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/jaas/auth/WEB-INF/wsdl/SecurityService_schema1.xsd"), "wsdl/SecurityService_schema1.xsd")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/jaas/auth/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
- }
-
public static Test suite()
{
- return new JBossWSCXFTestSetup(UsernameAuthorizationTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()), true);
+ return new JBossWSCXFTestSetup(UsernameAuthorizationTestCase.class, "jaxws-samples-wsse-policy-username-jaas.war", true);
}
public void test() throws Exception
@@ -86,6 +57,7 @@
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
setupWsse(proxy, "kermit");
((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
+
assertEquals("Secure Hello World!", proxy.sayHello());
}
@@ -97,6 +69,7 @@
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
setupWsse(proxy, "snoopy");
((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
+
try
{
proxy.sayHello();
@@ -116,6 +89,7 @@
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
setupWsse(proxy, "kermit");
((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
+
try
{
proxy.greetMe();
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameDigestPasswordCallback.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameDigestPasswordCallback.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameDigestPasswordCallback.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -26,9 +26,8 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
+import org.apache.ws.security.WSPasswordCallback;
-import org.apache.wss4j.common.ext.WSPasswordCallback;
-
public class UsernameDigestPasswordCallback implements CallbackHandler
{
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernamePasswordCallback.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernamePasswordCallback.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernamePasswordCallback.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -26,9 +26,8 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
+import org.apache.ws.security.WSPasswordCallback;
-import org.apache.wss4j.common.ext.WSPasswordCallback;
-
public class UsernamePasswordCallback implements CallbackHandler
{
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/DeploymentArchives.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/DeploymentArchives.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/DeploymentArchives.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,107 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2014, 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.File;
-
-import org.jboss.shrinkwrap.api.asset.StringAsset;
-import org.jboss.wsf.test.JBossWSTestHelper;
-
-public final class DeploymentArchives
-{
- public static final String CLIENT_JAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.JarDeployment("jaxws-samples-wsse-policy-oasis-client.jar") { {
- archive
- .addManifest()
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/oasis/META-INF/alice.jks"), "alice.jks")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/oasis/META-INF/alice.properties"), "alice.properties");
- }
- });
-
- public static final String SERVER_22X_WAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-oasis-22x.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.KeystorePasswordCallback.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service221Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service222Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service223Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service224Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServiceIface.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/oasis/WEB-INF/bob.jks"), "classes/bob.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/oasis/WEB-INF/bob.properties"), "classes/bob.properties")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService.wsdl"), "wsdl/SecurityService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService_schema1.xsd"), "wsdl/SecurityService_schema1.xsd");
- }
- });
-
- public static final String SERVER_21X_WAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-oasis-21x.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServerUsernamePasswordCallback.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service2111Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service2112Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service2113Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service2121Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service213Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service214Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServiceIface.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/oasis/WEB-INF/bob.jks"), "classes/bob.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/oasis/WEB-INF/bob.properties"), "classes/bob.properties")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService21x.wsdl"), "wsdl/SecurityService21x.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService_schema1.xsd"), "wsdl/SecurityService_schema1.xsd");
- }
- });
-
- public static final String SERVER_23X_WAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-oasis-23x.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.KeystorePasswordCallback.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service2311Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service2312Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service2313Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service2314Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service2315Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service2321Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service2322Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service2323Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.Service2324Impl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.SAMLValidator.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/oasis/WEB-INF/bob.jks"), "classes/bob.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/oasis/WEB-INF/bob.properties"), "classes/bob.properties")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService23x.wsdl"), "wsdl/SecurityService23x.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService_schema1.xsd"), "wsdl/SecurityService_schema1.xsd");
- }
- });
-
- private DeploymentArchives() {
- //NOOP
- }
-}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/KeystorePasswordCallback.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/KeystorePasswordCallback.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/KeystorePasswordCallback.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -21,22 +21,50 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.oasis;
+import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-import org.jboss.wsf.stack.cxf.extensions.security.PasswordCallbackHandler;
+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 KeystorePasswordCallback extends PasswordCallbackHandler
+public class KeystorePasswordCallback implements CallbackHandler
{
+
+ private Map<String, String> passwords = new HashMap<String, String>();
+
public KeystorePasswordCallback()
{
- super(getInitMap());
- }
-
- private static Map<String, String> getInitMap() {
- Map<String, String> passwords = new HashMap<String, String>();
passwords.put("alice", "password");
passwords.put("bob", "password");
- return passwords;
}
+
+ /**
+ * It attempts to get the password from the private
+ * alias/passwords map.
+ */
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
+ {
+ for (int i = 0; i < callbacks.length; i++)
+ {
+ WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+
+ String pass = passwords.get(pc.getIdentifier());
+ if (pass != null)
+ {
+ pc.setPassword(pass);
+ return;
+ }
+ }
+ }
+
+ /**
+ * Add an alias/password pair to the callback mechanism.
+ */
+ public void setAliasPassword(String alias, String password)
+ {
+ passwords.put(alias, password);
+ }
}
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SAMLValidator.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SAMLValidator.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SAMLValidator.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,9 +0,0 @@
-package org.jboss.test.ws.jaxws.samples.wsse.policy.oasis;
-
-public class SAMLValidator extends org.apache.wss4j.dom.validate.SamlAssertionValidator
-{
- public SAMLValidator() {
- super();
- setRequireBearerSignature(false);
- }
-}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SamlCallbackHandler.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SamlCallbackHandler.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/SamlCallbackHandler.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -10,18 +10,17 @@
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.wss4j.common.crypto.Crypto;
-import org.apache.wss4j.common.crypto.CryptoFactory;
-import org.apache.wss4j.common.crypto.CryptoType;
-import org.apache.wss4j.common.ext.WSSecurityException;
-import org.apache.wss4j.common.saml.SAMLCallback;
-import org.apache.wss4j.common.saml.bean.AttributeBean;
-import org.apache.wss4j.common.saml.bean.AttributeStatementBean;
-import org.apache.wss4j.common.saml.bean.KeyInfoBean;
-import org.apache.wss4j.common.saml.bean.KeyInfoBean.CERT_IDENTIFIER;
-import org.apache.wss4j.common.saml.bean.SubjectBean;
-import org.apache.wss4j.common.saml.builder.SAML1Constants;
-import org.apache.wss4j.common.saml.builder.SAML2Constants;
+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
@@ -29,8 +28,6 @@
private String confirmationMethod = SAML2Constants.CONF_BEARER;
private boolean saml2;
-
- private boolean signed;
public SamlCallbackHandler()
{
@@ -91,21 +88,9 @@
attributeBean.setSimpleName("subject-role");
attributeBean.setQualifiedName("http://custom-ns");
}
-
- attributeBean.addAttributeValue("system-user");
+ attributeBean.setAttributeValues(Collections.singletonList("system-user"));
attrBean.setSamlAttributes(Collections.singletonList(attributeBean));
callback.setAttributeStatementData(Collections.singletonList(attrBean));
-
- try {
- String file = "META-INF/alice.properties";
- Crypto crypto = CryptoFactory.getInstance(file);
- callback.setIssuerCrypto(crypto);
- callback.setIssuerKeyName("alice");
- callback.setIssuerKeyPassword("password");
- callback.setSignAssertion(signed);
- } catch (WSSecurityException e) {
- throw new IOException(e);
- }
}
}
}
@@ -134,13 +119,4 @@
return keyInfo;
}
- public boolean isSigned()
- {
- return signed;
- }
-
- public void setSigned(boolean signed)
- {
- this.signed = signed;
- }
}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/ServerUsernamePasswordCallback.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/ServerUsernamePasswordCallback.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/ServerUsernamePasswordCallback.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -21,22 +21,22 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.oasis;
-import java.util.HashMap;
-import java.util.Map;
+import java.io.IOException;
-import org.jboss.wsf.stack.cxf.extensions.security.PasswordCallbackHandler;
+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 extends PasswordCallbackHandler
+public class ServerUsernamePasswordCallback implements CallbackHandler
{
- public ServerUsernamePasswordCallback() {
- super(getInitMap());
+ 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");
}
-
- private static Map<String, String> getInitMap() {
- Map<String, String> passwords = new HashMap<String, String>();
- passwords.put("kermit", "thefrog");
- passwords.put("alice", "password");
- passwords.put("bob", "password");
- return passwords;
- }
}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2311Impl.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2311Impl.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2311Impl.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -24,8 +24,6 @@
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
@@ -37,10 +35,6 @@
endpointInterface = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.ServiceIface"
)
@Stateless
-@EndpointProperties(value = {
- @EndpointProperty(key = "ws-security.saml1.validator", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.SAMLValidator")
- }
-)
@WebContext(urlPattern = "SecurityService2311")
public class Service2311Impl implements ServiceIface
{
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2321Impl.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2321Impl.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/Service2321Impl.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -41,7 +41,6 @@
@EndpointProperty(key = "ws-security.signature.username", value = "bob"),
@EndpointProperty(key = "ws-security.encryption.properties", value = "bob.properties"),
@EndpointProperty(key = "ws-security.encryption.username", value = "useReqSigCert"),
- @EndpointProperty(key = "ws-security.saml2.validator", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.SAMLValidator"),
@EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.KeystorePasswordCallback")
}
)
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/UsernamePasswordCallback.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/UsernamePasswordCallback.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/UsernamePasswordCallback.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -26,9 +26,8 @@
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
+import org.apache.ws.security.WSPasswordCallback;
-import org.apache.wss4j.common.ext.WSPasswordCallback;
-
public class UsernamePasswordCallback implements CallbackHandler
{
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples21xTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples21xTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples21xTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -60,11 +60,22 @@
System.setProperty("org.jboss.security.ignoreHttpsHost", "true");
*/
JBossWSCXFTestSetup setup = new JBossWSCXFTestSetup(WSSecurityPolicyExamples21xTestCase.class,
- DeploymentArchives.SERVER_21X_WAR + " " + DeploymentArchives.CLIENT_JAR);
+ "jaxws-samples-wsse-policy-oasis-21x.war,jaxws-samples-wsse-policy-oasis-client.jar");
Map<String, String> sslOptions = new HashMap<String, String>();
- sslOptions.put("server-identity.ssl.keystore-path", System.getProperty("org.jboss.ws.testsuite.server.keystore"));
- sslOptions.put("server-identity.ssl.keystore-password", "changeit");
- sslOptions.put("server-identity.ssl.alias", "tomcat");
+ if (isTargetJBoss7())
+ {
+ 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");
+ }
+ else
+ {
+ sslOptions.put("keystore-path", System.getProperty("org.jboss.ws.testsuite.server.keystore"));
+ sslOptions.put("keystore-password", "changeit");
+ sslOptions.put("verify-client", "false");
+ sslOptions.put("alias", "tomcat");
+ }
setup.setHttpsConnectorRequirement(sslOptions);
return setup;
}
@@ -78,8 +89,9 @@
{
Service service = Service.create(new URL(serviceURL + "SecurityService2111?wsdl"), serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService2111Port"), ServiceIface.class);
- setupWsse(proxy, true);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL + "SecurityService2111".replaceFirst("8080", "7070"));
+ setupWsse(proxy);
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURL + "SecurityService2111").replaceFirst("8080", "7070"));
+
assertTrue(proxy.sayHello().equals("Hello - UsernameToken with plain text password"));
}
@@ -92,8 +104,9 @@
{
Service service = Service.create(new URL(serviceURL + "SecurityService2112?wsdl"), serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService2112Port"), ServiceIface.class);
- setupWsse(proxy, false);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL + "SecurityService2112".replaceFirst("8080", "7070"));
+ setupWsse(proxy);
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURL + "SecurityService2112").replaceFirst("8080", "7070"));
+
assertTrue(proxy.sayHello().equals("Hello - UsernameToken without password"));
}
@@ -106,8 +119,8 @@
{
Service service = Service.create(new URL(serviceURL + "SecurityService2113?wsdl"), serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService2113Port"), ServiceIface.class);
- setupWsse(proxy, true);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL + "SecurityService2113".replaceFirst("8080", "7070"));
+ setupWsse(proxy);
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURL + "SecurityService2113").replaceFirst("8080", "7070"));
assertTrue(proxy.sayHello().equals("Hello - UsernameToken with timestamp, nonce and password hash"));
}
@@ -119,9 +132,14 @@
*/
public void test2121() throws Exception
{
+ if (true) {
+ System.out.println("FIXME: [JBWS-3622] Restore HTTPS tests w/ Undertow");
+ return;
+ }
Service service = Service.create(new URL(serviceURLHttps + "SecurityService2121?wsdl"), serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService2121Port"), ServiceIface.class);
- setupWsse(proxy, false);
+ setupWsse(proxy);
+
assertTrue(proxy.sayHello().equals("Hello - UsernameToken as supporting token"));
}
@@ -134,8 +152,8 @@
{
Service service = Service.create(new URL(serviceURL + "SecurityService213?wsdl"), serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService213Port"), ServiceIface.class);
- setupWsse(proxy, true);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL + "SecurityService213".replaceFirst("8080", "7070"));
+ setupWsse(proxy);
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURL + "SecurityService213").replaceFirst("8080", "7070"));
assertTrue(proxy.sayHello().equals("Hello - (WSS 1.0) UsernameToken with Mutual X.509v3 Authentication, Sign, Encrypt"));
}
@@ -149,13 +167,13 @@
{
Service service = Service.create(new URL(serviceURL + "SecurityService214?wsdl"), serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService214Port"), ServiceIface.class);
- setupWsse(proxy, false);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL + "SecurityService214".replaceFirst("8080", "7070"));
+ setupWsse(proxy);
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURL + "SecurityService214").replaceFirst("8080", "7070"));
assertTrue(proxy.sayHello().equals("Hello - (WSS 1.1) User Name with Certificates, Sign, Encrypt"));
}
- private void setupWsse(ServiceIface proxy, boolean streaming)
+ private void setupWsse(ServiceIface proxy)
{
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.USERNAME, "kermit");
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, new UsernamePasswordCallback());
@@ -163,10 +181,5 @@
((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");
- if (streaming)
- {
- ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENABLE_STREAMING_SECURITY, "true");
- ((BindingProvider)proxy).getResponseContext().put(SecurityConstants.ENABLE_STREAMING_SECURITY, "true");
- }
}
}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples22xTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples22xTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples22xTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -31,7 +31,6 @@
import org.apache.cxf.ws.security.SecurityConstants;
import org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback;
-import org.jboss.wsf.test.CryptoHelper;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
@@ -53,7 +52,7 @@
public static Test suite()
{
return new JBossWSCXFTestSetup(WSSecurityPolicyExamples22xTestCase.class,
- DeploymentArchives.SERVER_22X_WAR + " " + DeploymentArchives.CLIENT_JAR);
+ "jaxws-samples-wsse-policy-oasis-22x.war,jaxws-samples-wsse-policy-oasis-client.jar");
}
/**
@@ -68,15 +67,10 @@
{
Service service = Service.create(new URL(serviceURL + "SecurityService221?wsdl"), serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService221Port"), ServiceIface.class);
- setupWsse(proxy, true);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL + "SecurityService221".replaceFirst("8080", "7070"));
+ setupWsse(proxy);
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURL + "SecurityService221").replaceFirst("8080", "7070"));
-
- try {
- assertTrue(proxy.sayHello().equals("Hello - (WSS1.0) X.509 Certificates, Sign, Encrypt"));
- } catch (Exception e) {
- throw CryptoHelper.checkAndWrapException(e);
- }
+ assertTrue(proxy.sayHello().equals("Hello - (WSS1.0) X.509 Certificates, Sign, Encrypt"));
}
/**
@@ -93,14 +87,10 @@
{
Service service = Service.create(new URL(serviceURL + "SecurityService222?wsdl"), serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService222Port"), ServiceIface.class);
- setupWsse(proxy, true);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL + "SecurityService222".replaceFirst("8080", "7070"));
+ setupWsse(proxy);
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURL + "SecurityService222").replaceFirst("8080", "7070"));
- try {
- assertTrue(proxy.sayHello().equals("Hello - (WSS1.0) Mutual Authentication with X.509 Certificates, Sign, Encrypt"));
- } catch (Exception e) {
- throw CryptoHelper.checkAndWrapException(e);
- }
+ assertTrue(proxy.sayHello().equals("Hello - (WSS1.0) Mutual Authentication with X.509 Certificates, Sign, Encrypt"));
}
/**
@@ -117,14 +107,10 @@
{
Service service = Service.create(new URL(serviceURL + "SecurityService223?wsdl"), serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService223Port"), ServiceIface.class);
- setupWsse(proxy, true);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL + "SecurityService223".replaceFirst("8080", "7070"));
+ setupWsse(proxy);
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURL + "SecurityService223").replaceFirst("8080", "7070"));
- try {
- assertTrue(proxy.sayHello().equals("Hello - (WSS1.1) Anonymous with X.509 Certificates, Sign, Encrypt"));
- } catch (Exception e) {
- throw CryptoHelper.checkAndWrapException(e);
- }
+ assertTrue(proxy.sayHello().equals("Hello - (WSS1.1) Anonymous with X.509 Certificates, Sign, Encrypt"));
}
/**
@@ -141,27 +127,18 @@
{
Service service = Service.create(new URL(serviceURL + "SecurityService224?wsdl"), serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService224Port"), ServiceIface.class);
- setupWsse(proxy, false);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL + "SecurityService224".replaceFirst("8080", "7070"));
+ setupWsse(proxy);
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURL + "SecurityService224").replaceFirst("8080", "7070"));
- try {
- assertTrue(proxy.sayHello().equals("Hello - (WSS1.1) Mutual Authentication with X.509 Certificates, Sign, Encrypt"));
- } catch (Exception e) {
- throw CryptoHelper.checkAndWrapException(e);
- }
+ assertTrue(proxy.sayHello().equals("Hello - (WSS1.1) Mutual Authentication with X.509 Certificates, Sign, Encrypt"));
}
- private void setupWsse(ServiceIface proxy, boolean streaming)
+ private void setupWsse(ServiceIface proxy)
{
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
((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");
- if (streaming)
- {
- ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENABLE_STREAMING_SECURITY, "true");
- ((BindingProvider)proxy).getResponseContext().put(SecurityConstants.ENABLE_STREAMING_SECURITY, "true");
- }
}
}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -32,7 +32,6 @@
import junit.framework.Test;
import org.apache.cxf.ws.security.SecurityConstants;
-import org.jboss.wsf.test.CryptoHelper;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
@@ -64,15 +63,27 @@
System.setProperty("org.jboss.security.ignoreHttpsHost", "true");
*/
JBossWSCXFTestSetup setup = new JBossWSCXFTestSetup(WSSecurityPolicyExamples23xTestCase.class,
- DeploymentArchives.SERVER_23X_WAR + " " + DeploymentArchives.CLIENT_JAR);
+ "jaxws-samples-wsse-policy-oasis-23x.war,jaxws-samples-wsse-policy-oasis-client.jar");
Map<String, String> sslOptions = new HashMap<String, String>();
- sslOptions.put("server-identity.ssl.keystore-path", System.getProperty("org.jboss.ws.testsuite.server.keystore"));
- sslOptions.put("server-identity.ssl.keystore-password", "changeit");
- sslOptions.put("server-identity.ssl.alias", "tomcat");
- //enable SSL mutual authentication (https client cert is checked on server side)
- sslOptions.put("verify-client", "REQUESTED");
- sslOptions.put("authentication.truststore.keystore-path", System.getProperty("org.jboss.ws.testsuite.server.truststore"));
- sslOptions.put("authentication.truststore.keystore-password", "changeit");
+ if (isTargetJBoss7())
+ {
+ 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");
+ }
+ else
+ {
+ sslOptions.put("server-identity.ssl.keystore-path", System.getProperty("org.jboss.ws.testsuite.server.keystore"));
+ sslOptions.put("server-identity.ssl.keystore-password", "changeit");
+ sslOptions.put("server-identity.ssl.alias", "tomcat");
+ //enable SSL mutual authentication (https client cert is checked on server side)
+ sslOptions.put("verify-client", "REQUESTED");
+ sslOptions.put("authentication.truststore.keystore-path", System.getProperty("org.jboss.ws.testsuite.server.truststore"));
+ sslOptions.put("authentication.truststore.keystore-password", "changeit");
+ }
setup.setHttpsConnectorRequirement(sslOptions);
return setup;
}
@@ -87,7 +98,7 @@
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());
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL + "SecurityService2311".replaceFirst("8080", "7070"));
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURL + "SecurityService2311").replaceFirst("8080", "7070"));
assertTrue(proxy.sayHello().equals("Hello - (WSS1.0) SAML1.1 Assertion (Bearer)"));
}
@@ -119,11 +130,11 @@
Map<String, Object> reqCtx = ((BindingProvider) proxy).getRequestContext();
SamlCallbackHandler cbh = new SamlCallbackHandler();
cbh.setConfirmationMethod("urn:oasis:names:tc:SAML:1.0:cm:holder-of-key");
- cbh.setSigned(true);
reqCtx.put(SecurityConstants.SAML_CALLBACK_HANDLER, cbh);
reqCtx.put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
reqCtx.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
reqCtx.put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
+ reqCtx.put(SecurityConstants.SELF_SIGN_SAML_ASSERTION, "true");
assertTrue(proxy.sayHello().equals("Hello - (WSS1.0) SAML1.1 Assertion (HK) over SSL"));
}
@@ -145,13 +156,9 @@
reqCtx.put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
reqCtx.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
reqCtx.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL + "SecurityService2314".replaceFirst("8080", "7070"));
+ //((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURL + "SecurityService2314").replaceFirst("8080", "7070"));
- try {
- assertTrue(proxy.sayHello().equals("Hello - (WSS1.0) SAML1.1 Sender Vouches with X.509 Certificates, Sign, Optional Encrypt"));
- } catch (Exception e) {
- throw CryptoHelper.checkAndWrapException(e);
- }
+ assertTrue(proxy.sayHello().equals("Hello - (WSS1.0) SAML1.1 Sender Vouches with X.509 Certificates, Sign, Optional Encrypt"));
}
/**
@@ -164,22 +171,18 @@
Service service = Service.create(new URL(serviceURL + "SecurityService2315?wsdl"), serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(new QName(NS, "SecurityService2315Port"), ServiceIface.class);
Map<String, Object> reqCtx = ((BindingProvider) proxy).getRequestContext();
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURL + "SecurityService2315").replaceFirst("8080", "7070"));
+
SamlCallbackHandler cbh = new SamlCallbackHandler();
cbh.setConfirmationMethod("urn:oasis:names:tc:SAML:1.0:cm:holder-of-key");
- cbh.setSigned(true);
reqCtx.put(SecurityConstants.SAML_CALLBACK_HANDLER, cbh);
reqCtx.put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
reqCtx.put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
reqCtx.put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
reqCtx.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
reqCtx.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL + "SecurityService2315".replaceFirst("8080", "7070"));
-
- try {
- assertTrue(proxy.sayHello().equals("Hello - (WSS1.0) SAML1.1 Holder of Key, Sign, Optional Encrypt"));
- } catch (Exception e) {
- throw CryptoHelper.checkAndWrapException(e);
- }
+ reqCtx.put(SecurityConstants.SELF_SIGN_SAML_ASSERTION, "true");
+ assertTrue(proxy.sayHello().equals("Hello - (WSS1.0) SAML1.1 Holder of Key, Sign, Optional Encrypt"));
}
/**
@@ -201,7 +204,7 @@
reqCtx.put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
reqCtx.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
reqCtx.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL + "SecurityService2321".replaceFirst("8080", "7070"));
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURL + "SecurityService2321").replaceFirst("8080", "7070"));
assertTrue(proxy.sayHello().equals("Hello - (WSS1.1) SAML 2.0 Bearer"));
}
@@ -219,6 +222,8 @@
cbh.setConfirmationMethod("urn:oasis:names:tc:SAML:2.0:cm:sender-vouches");
cbh.setSaml2(true);
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SAML_CALLBACK_HANDLER, cbh);
+ //((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURLHttps + "SecurityService2322").replaceFirst("8443", "7070"));
+
assertTrue(proxy.sayHello().equals("Hello - (WSS1.1) SAML2.0 Sender Vouches over SSL"));
}
@@ -235,11 +240,12 @@
SamlCallbackHandler cbh = new SamlCallbackHandler();
cbh.setConfirmationMethod("urn:oasis:names:tc:SAML:2.0:cm:holder-of-key");
cbh.setSaml2(true);
- cbh.setSigned(true);
reqCtx.put(SecurityConstants.SAML_CALLBACK_HANDLER, cbh);
reqCtx.put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
reqCtx.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
reqCtx.put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
+ reqCtx.put(SecurityConstants.SELF_SIGN_SAML_ASSERTION, "true");
+
assertTrue(proxy.sayHello().equals("Hello - (WSS1.1) SAML2.0 HoK over SSL"));
}
@@ -261,12 +267,8 @@
reqCtx.put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
reqCtx.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
reqCtx.put(SecurityConstants.ENCRYPT_USERNAME, "bob");
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL + "SecurityService2324".replaceFirst("8080", "7070"));
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, (serviceURL + "SecurityService2324").replaceFirst("8080", "7070"));
- try {
- assertTrue(proxy.sayHello().equals("Hello - (WSS1.1) SAML1.1/2.0 Sender Vouches with X.509 Certificate, Sign, Encrypt"));
- } catch (Exception e) {
- throw CryptoHelper.checkAndWrapException(e);
- }
+ assertTrue(proxy.sayHello().equals("Hello - (WSS1.1) SAML1.1/2.0 Sender Vouches with X.509 Certificate, Sign, Encrypt"));
}
}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/secconv/KeystorePasswordCallback.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/secconv/KeystorePasswordCallback.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/secconv/KeystorePasswordCallback.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -21,21 +21,51 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.secconv;
+import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-public class KeystorePasswordCallback extends org.jboss.wsf.stack.cxf.extensions.security.PasswordCallbackHandler
+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 KeystorePasswordCallback implements CallbackHandler
{
+
+ private Map<String, String> passwords = new HashMap<String, String>();
+
public KeystorePasswordCallback()
{
- super(getInitMap());
- }
-
- private static Map<String, String> getInitMap() {
- Map<String, String> passwords = new HashMap<String, String>();
passwords.put("alice", "password");
passwords.put("bob", "password");
passwords.put("john", "password");
- return passwords;
}
+
+ /**
+ * It attempts to get the password from the private
+ * alias/passwords map.
+ */
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
+ {
+ for (int i = 0; i < callbacks.length; i++)
+ {
+ WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+
+ String pass = passwords.get(pc.getIdentifier());
+ if (pass != null)
+ {
+ pc.setPassword(pass);
+ return;
+ }
+ }
+ }
+
+ /**
+ * Add an alias/password pair to the callback mechanism.
+ */
+ public void setAliasPassword(String alias, String password)
+ {
+ passwords.put(alias, password);
+ }
}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/secconv/SecureConversationTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/secconv/SecureConversationTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/secconv/SecureConversationTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -21,10 +21,7 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.secconv;
-import java.io.File;
import java.net.URL;
-import java.util.LinkedList;
-import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
@@ -32,13 +29,9 @@
import junit.framework.Test;
-import org.apache.cxf.ws.security.SecurityConstants;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
/**
* Secure Conversation testcase
@@ -53,62 +46,32 @@
*/
public final class SecureConversationTestCase extends JBossWSTest
{
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-secconv.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.secconv.KeystorePasswordCallback.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.secconv.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.secconv.ServiceImpl.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/secconv/WEB-INF/bob.jks"), "classes/bob.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/secconv/WEB-INF/bob.properties"), "classes/bob.properties")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/secconv/WEB-INF/wsdl/SecurityService.wsdl"), "wsdl/SecurityService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/secconv/WEB-INF/wsdl/SecurityService_schema1.xsd"), "wsdl/SecurityService_schema1.xsd");
- }
- });
- list.add(new JBossWSTestHelper.JarDeployment("jaxws-samples-wsse-policy-secconv-client.jar") { {
- archive
- .addManifest()
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/secconv/META-INF/alice.jks"), "alice.jks")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/secconv/META-INF/alice.properties"), "alice.properties");
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
- }
+ private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-secconv/SecureConversationService";
public static Test suite()
{
- return new JBossWSCXFTestSetup(SecureConversationTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
+ return new JBossWSCXFTestSetup(SecureConversationTestCase.class, "jaxws-samples-wsse-policy-secconv.war,jaxws-samples-wsse-policy-secconv-client.jar");
}
public void test() throws Exception
{
QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy", "SecurityService");
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-secconv/SecureConversationService?wsdl");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
- setupWsse(proxy, true);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":7070/jaxws-samples-wsse-policy-secconv/SecureConversationServic");
+ setupWsse(proxy);
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
assertTrue(proxy.sayHello().startsWith("Secure Conversation Hello World!"));
assertTrue(proxy.sayHello().startsWith("Secure Conversation Hello World!"));
}
- private void setupWsse(ServiceIface proxy, boolean streaming)
+ private void setupWsse(ServiceIface proxy)
{
((BindingProvider)proxy).getRequestContext().put("ws-security.callback-handler.sct", new KeystorePasswordCallback());
((BindingProvider)proxy).getRequestContext().put("ws-security.signature.properties.sct", Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
((BindingProvider)proxy).getRequestContext().put("ws-security.encryption.properties.sct", Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
((BindingProvider)proxy).getRequestContext().put("ws-security.signature.username.sct", "alice");
((BindingProvider)proxy).getRequestContext().put("ws-security.encryption.username.sct", "bob");
- if (streaming)
- {
- ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENABLE_STREAMING_SECURITY, "true");
- ((BindingProvider)proxy).getResponseContext().put(SecurityConstants.ENABLE_STREAMING_SECURITY, "true");
- }
}
}
Copied: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ClientCallbackHandler.java (from rev 18641, projects/wsi-bp-test/trunk/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ClientCallbackHandler.java)
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ClientCallbackHandler.java (rev 0)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ClientCallbackHandler.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -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;
+ }
+ }
+ }
+ }
+}
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/DeploymentArchives.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/DeploymentArchives.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/DeploymentArchives.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,187 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2014, 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.io.File;
-
-import org.jboss.shrinkwrap.api.asset.StringAsset;
-import org.jboss.wsf.test.JBossWSTestHelper;
-
-public final class DeploymentArchives
-{
- public static final String STS_WAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-trust-sts.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client,org.apache.cxf.impl annotations\n")) //cxf impl required to extend STS impl
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.sts.STSCallbackHandler.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.sts.SampleSTS.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/jboss-web.xml"), "jboss-web.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/ws-trust-1.4-service.wsdl"), "wsdl/ws-trust-1.4-service.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/stsstore.jks"), "classes/stsstore.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/stsKeystore.properties"), "classes/stsKeystore.properties")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/web.xml"));
- }
- });
-
- public static final String SERVER_WAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-trust.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.service.ServerCallbackHandler.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.service.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.service.ServiceImpl.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/SecurityService.wsdl"), "wsdl/SecurityService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/SecurityService_schema1.xsd"), "wsdl/SecurityService_schema1.xsd")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/servicestore.jks"), "classes/servicestore.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/serviceKeystore.properties"), "classes/serviceKeystore.properties");
- }
- });
-
- public static final String CLIENT_JAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.JarDeployment("jaxws-samples-wsse-policy-trust-client.jar") { {
- archive
- .addManifest()
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/META-INF/clientKeystore.properties"), "clientKeystore.properties")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/META-INF/clientstore.jks"), "clientstore.jks");
- }
- });
-
- public static final String SERVER_ACTAS_WAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-trust-actas.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client, org.apache.cxf.impl\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.actas.ActAsCallbackHandler.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.actas.ActAsServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.actas.ActAsServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.service.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.shared.WSTrustAppUtils.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/ActAsService.wsdl"), "wsdl/ActAsService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/ActAsService_schema1.xsd"), "wsdl/ActAsService_schema1.xsd")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/actasstore.jks"), "classes/actasstore.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/actasKeystore.properties"), "classes/actasKeystore.properties")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/META-INF/clientstore.jks"), "clientstore.jks")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/META-INF/clientKeystore.properties"), "clientKeystore.properties")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/META-INF/permissions.xml"), "permissions.xml");
- }
- });
-
- public static final String SERVER_ONBEHALFOF_WAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-trust-onbehalfof.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client, org.apache.cxf.impl\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.onbehalfof.OnBehalfOfCallbackHandler.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.onbehalfof.OnBehalfOfServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.onbehalfof.OnBehalfOfServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.service.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.shared.WSTrustAppUtils.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/OnBehalfOfService.wsdl"), "wsdl/OnBehalfOfService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/OnBehalfOfService_schema1.xsd"), "wsdl/OnBehalfOfService_schema1.xsd")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/actasstore.jks"), "classes/actasstore.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/actasKeystore.properties"), "classes/actasKeystore.properties")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/META-INF/clientstore.jks"), "clientstore.jks")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/META-INF/clientKeystore.properties"), "clientKeystore.properties")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/META-INF/permissions.xml"), "permissions.xml");
- }
- });
-
- public static final String STS_HOLDEROFKEY_WAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-trust-sts-holderofkey.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client,org.apache.cxf.impl annotations\n")) //cxf impl required to extend STS impl
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.stsholderofkey.STSHolderOfKeyCallbackHandler.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.stsholderofkey.SampleSTSHolderOfKey.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/jboss-web.xml"), "jboss-web.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/holderofkey-ws-trust-1.4-service.wsdl"), "wsdl/holderofkey-ws-trust-1.4-service.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/stsstore.jks"), "classes/stsstore.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/stsKeystore.properties"), "classes/stsKeystore.properties")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/holderofkey/web.xml"));
- }
- });
-
- public static final String SERVER_HOLDEROFKEY_WAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-trust-holderofkey.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.holderofkey.HolderOfKeyCallbackHandler.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.holderofkey.HolderOfKeyIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.holderofkey.HolderOfKeyImpl.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/HolderOfKeyService.wsdl"), "wsdl/HolderOfKeyService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/HolderOfKeyService_schema1.xsd"), "wsdl/HolderOfKeyService_schema1.xsd")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/servicestore.jks"), "classes/servicestore.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/serviceKeystore.properties"), "classes/serviceKeystore.properties");
- }
- });
-
- public static final String STS_PICKETLINK_WAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-trustPicketLink-sts.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client,org.picketlink\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.picketlink.PicketLinkSTService.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.sts.STSCallbackHandler.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/jboss-web.xml"), "jboss-web.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/PicketLinkSTS.wsdl"), "wsdl/PicketLinkSTS.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/stsstore.jks"), "classes/stsstore.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/picketlink-sts.xml"), "classes/picketlink-sts.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/stsKeystore.properties"), "classes/stsKeystore.properties");
- }
- });
-
- public static final String STS_BEARER_WAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-trust-sts-bearer.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client,org.apache.cxf.impl annotations\n")) //cxf impl required to extend STS impl
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.stsbearer.STSBearerCallbackHandler.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.stsbearer.SampleSTSBearer.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/jboss-web.xml"), "jboss-web.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/bearer-ws-trust-1.4-service.wsdl"), "wsdl/bearer-ws-trust-1.4-service.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/stsstore.jks"), "classes/stsstore.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/stsKeystore.properties"), "classes/stsKeystore.properties")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/bearer/web.xml"));
- }
- });
-
- public static final String SERVER_BEARER_WAR = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-policy-trust-bearer.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHello.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.jaxws.SayHelloResponse.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.bearer.BearerIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.policy.trust.bearer.BearerImpl.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/BearerService.wsdl"), "wsdl/BearerService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/BearerService_schema1.xsd"), "wsdl/BearerService_schema1.xsd")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/servicestore.jks"), "classes/servicestore.jks")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/policy/trust/WEB-INF/serviceKeystore.properties"), "classes/serviceKeystore.properties");
- }
- });
-
- private DeploymentArchives() {
- //NOOP
- }
-}
Copied: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/STSCallbackHandler.java (from rev 18641, projects/wsi-bp-test/trunk/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/STSCallbackHandler.java)
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/STSCallbackHandler.java (rev 0)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/STSCallbackHandler.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -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 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;
+ }
+ }
+ }
+ }
+}
Copied: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/SampleSTS.java (from rev 18641, projects/wsi-bp-test/trunk/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/SampleSTS.java)
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/SampleSTS.java (rev 0)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/SampleSTS.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -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.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")
+//be sure to have dependency on org.apache.cxf module when on AS7, otherwise Apache CXF annotations are ignored
+@EndpointProperties(value = {
+ @EndpointProperty(key = "ws-security.signature.username", value = "mystskey"),
+ @EndpointProperty(key = "ws-security.signature.properties", value = "stsKeystore.properties"),
+ @EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.trust.STSCallbackHandler"),
+ @EndpointProperty(key = "ws-security.validate.token", value = "false") //to let the JAAS integration deal with validation through the interceptor below
+})
+@InInterceptors(interceptors = {"org.jboss.wsf.stack.cxf.security.authentication.SubjectCreatingPolicyInterceptor"})
+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/SecurityService", "http://\\[::1\\]:(\\d)*/jaxws-samples-wsse-policy-trust/SecurityService"));
+ 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);
+ }
+}
Copied: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServerCallbackHandler.java (from rev 18641, projects/wsi-bp-test/trunk/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServerCallbackHandler.java)
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServerCallbackHandler.java (rev 0)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/ServerCallbackHandler.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -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;
+ }
+ }
+ }
+ }
+}
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustActAsTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustActAsTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustActAsTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,80 +0,0 @@
-/*
- * 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 junit.framework.Test;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.jboss.test.ws.jaxws.samples.wsse.policy.trust.actas.ActAsServiceIface;
-import org.jboss.wsf.test.JBossWSTest;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-import java.net.URL;
-
-/**
- * A demo of using WS-Trust ActAs extension.
- *
- * User: rsearls(a)redhat.com
- * Date: 1/26/14
- */
-public class WSTrustActAsTestCase extends JBossWSTest
-{
- private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-trust-actas/ActAsService";
-
- public static Test suite()
- {
- //deploy client, STS and service; start a security domain to be used by the STS for authenticating client
- return WSTrustTestUtils.getTestSetup(WSTrustActAsTestCase.class,
- DeploymentArchives.CLIENT_JAR + " " + DeploymentArchives.STS_WAR + " " + DeploymentArchives.SERVER_WAR + " " + DeploymentArchives.SERVER_ACTAS_WAR);
- }
-
- /**
- * Request a security token that allows it to act as if it were somebody else.
- *
- * @throws Exception
- */
- public void testActAs() throws Exception
- {
- Bus bus = BusFactory.newInstance().createBus();
- try
- {
- BusFactory.setThreadDefaultBus(bus);
-
- final QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/actaswssecuritypolicy", "ActAsService");
- final URL wsdlURL = new URL(serviceURL + "?wsdl");
- Service service = Service.create(wsdlURL, serviceName);
- ActAsServiceIface proxy = (ActAsServiceIface) service.getPort(ActAsServiceIface.class);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
-
- WSTrustTestUtils.setupWsseAndSTSClientActAs((BindingProvider) proxy, bus);
-
- assertEquals("ActAs WS-Trust Hello World!", proxy.sayHello());
- }
- finally
- {
- bus.shutdown(true);
- }
- }
-
-}
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustBearerTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustBearerTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustBearerTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,85 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2014, 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.jboss.test.ws.jaxws.samples.wsse.policy.trust.bearer.BearerIface;
-import org.jboss.wsf.test.JBossWSCXFTestSetup;
-import org.jboss.wsf.test.JBossWSTest;
-
-/**
- * A demo of using SAML Bearer key type
- *
- * User: rsearls(a)redhat.com
- * Date: 2/24/14
- */
-public class WSTrustBearerTestCase extends JBossWSTest
-{
- private final String serviceURL = "https://" + getServerHost() + ":8443/jaxws-samples-wsse-policy-trust-bearer/BearerService";
-
- public static Test suite()
- {
- //deploy client, STS and service; start a security domain to be used by the STS for authenticating client
- JBossWSCXFTestSetup testSetup = WSTrustTestUtils.getTestSetup(WSTrustBearerTestCase.class,
- DeploymentArchives.CLIENT_JAR + " " + DeploymentArchives.STS_BEARER_WAR + " " + DeploymentArchives.SERVER_BEARER_WAR);
-
- // setup the https connector in the server config file.
- Map<String, String> sslOptions = new HashMap<String, String>();
- sslOptions.put("server-identity.ssl.keystore-path", System.getProperty("org.jboss.ws.testsuite.server.keystore"));
- sslOptions.put("server-identity.ssl.keystore-password", "changeit");
- sslOptions.put("server-identity.ssl.alias", "tomcat");
- testSetup.setHttpsConnectorRequirement(sslOptions);
- return testSetup;
- }
-
- public void testBearer() throws Exception
- {
- Bus bus = BusFactory.newInstance().createBus();
- try
- {
- BusFactory.setThreadDefaultBus(bus);
-
- final QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/bearerwssecuritypolicy", "BearerService");
- Service service = Service.create(new URL(serviceURL + "?wsdl"), serviceName);
- BearerIface proxy = (BearerIface) service.getPort(BearerIface.class);
- WSTrustTestUtils.setupWsseAndSTSClientBearer((BindingProvider) proxy, bus);
- assertEquals("Bearer WS-Trust Hello World!", proxy.sayHello());
-
- }
- finally
- {
- bus.shutdown(true);
- }
- }
-
-}
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustHolderOfKeyTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustHolderOfKeyTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustHolderOfKeyTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2014, 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.jboss.test.ws.jaxws.samples.wsse.policy.trust.holderofkey.HolderOfKeyIface;
-import org.jboss.wsf.test.JBossWSCXFTestSetup;
-import org.jboss.wsf.test.JBossWSTest;
-
-/**
- * A demo of using SAML Holder-of-key
- *
- * User: rsearls(a)redhat.com
- * Date: 3/14/14
- */
-public class WSTrustHolderOfKeyTestCase extends JBossWSTest
-{
- public static Test suite()
- {
- //deploy client, STS and service; start a security domain to be used by the STS for authenticating client
- JBossWSCXFTestSetup testSetup = WSTrustTestUtils.getTestSetup(WSTrustHolderOfKeyTestCase.class,
- DeploymentArchives.CLIENT_JAR + " " + DeploymentArchives.STS_HOLDEROFKEY_WAR + " " + DeploymentArchives.SERVER_HOLDEROFKEY_WAR);
-
- // setup the https connector in the server config file.
- Map<String, String> sslOptions = new HashMap<String, String>();
- sslOptions.put("server-identity.ssl.keystore-path", System.getProperty("org.jboss.ws.testsuite.server.keystore"));
- sslOptions.put("server-identity.ssl.keystore-password", "changeit");
- sslOptions.put("server-identity.ssl.alias", "tomcat");
-
- testSetup.setHttpsConnectorRequirement(sslOptions);
- return testSetup;
-
- }
-
- public void testBearer() throws Exception
- {
-
- Bus bus = BusFactory.newInstance().createBus();
- try
- {
-
- BusFactory.setThreadDefaultBus(bus);
-
- final QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/holderofkeywssecuritypolicy", "HolderOfKeyService");
- final URL wsdlURL = new URL("https://" + getServerHost() + ":8443/jaxws-samples-wsse-policy-trust-holderofkey/HolderOfKeyService?wsdl");
- Service service = Service.create(wsdlURL, serviceName);
- HolderOfKeyIface proxy = (HolderOfKeyIface) service.getPort(HolderOfKeyIface.class);
-
- WSTrustTestUtils.setupWsseAndSTSClientHolderOfKey((BindingProvider) proxy, bus);
- assertEquals("Holder-Of-Key WS-Trust Hello World!", proxy.sayHello());
-
- } finally
- {
- bus.shutdown(true);
- }
- }
-
-}
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustOnBehalfOfTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustOnBehalfOfTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustOnBehalfOfTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,83 +0,0 @@
-/*
- * 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 junit.framework.Test;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.jboss.test.ws.jaxws.samples.wsse.policy.trust.onbehalfof.OnBehalfOfServiceIface;
-import org.jboss.wsf.test.JBossWSTest;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-import java.net.URL;
-
-/**
- * A demo of using WS-Trust ActAs extension.
- *
- * User: rsearls(a)redhat.com
- * Date: 1/26/14
- */
-public class WSTrustOnBehalfOfTestCase extends JBossWSTest
-{
- private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-trust-onbehalfof/OnBehalfOfService";
-
- public static Test suite()
- {
- //deploy client, STS and service; start a security domain to be used by the STS for authenticating client
- return WSTrustTestUtils.getTestSetup(WSTrustOnBehalfOfTestCase.class,
- DeploymentArchives.CLIENT_JAR + " " + DeploymentArchives.STS_WAR + " " + DeploymentArchives.SERVER_WAR + " " + DeploymentArchives.SERVER_ONBEHALFOF_WAR);
- }
-
- /**
- * Request a security token that allows it to act on behalf of somebody else.
- *
- * @throws Exception
- */
- public void testOnBehalfOf() throws Exception
- {
- Bus bus = BusFactory.newInstance().createBus();
- try
- {
- BusFactory.setThreadDefaultBus(bus);
-
- final QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/onbehalfofwssecuritypolicy", "OnBehalfOfService");
- final URL wsdlURL = new URL(serviceURL + "?wsdl");
- Service service = Service.create(wsdlURL, serviceName);
- OnBehalfOfServiceIface proxy = (OnBehalfOfServiceIface) service.getPort(OnBehalfOfServiceIface.class);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
- /* TODO explain why this is not needed for setup and then remove
- final QName stsServiceName = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512/", "SecurityTokenService");
- final QName stsPortName = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512/", "UT_Port");
- */
- WSTrustTestUtils.setupWsseAndSTSClientOnBehalfOf((BindingProvider) proxy, bus);
-
- assertEquals("OnBehalfOf WS-Trust Hello World!", proxy.sayHello());
- }
- finally
- {
- bus.shutdown(true);
- }
- }
-
-}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -31,9 +31,7 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
-import org.jboss.wsf.test.CryptoHelper;
import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.test.ws.jaxws.samples.wsse.policy.trust.service.ServiceIface;
/**
* WS-Trust test case using PicketLink implementation of STS
@@ -43,11 +41,14 @@
*/
public final class WSTrustPicketLinkTestCase extends JBossWSTest
{
+ private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-trust/SecurityService";
+ private final String stsURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-trustPicketLink-sts/PicketLinkSTS";
+
public static Test suite()
{
//deploy client, STS and service; start a security domain to be used by the STS for authenticating client
return WSTrustTestUtils.getTestSetup(WSTrustPicketLinkTestCase.class,
- DeploymentArchives.CLIENT_JAR + " " + DeploymentArchives.STS_PICKETLINK_WAR + " " + DeploymentArchives.SERVER_WAR);
+ "jaxws-samples-wsse-policy-trust-client.jar jaxws-samples-wsse-policy-trustPicketLink-sts.war jaxws-samples-wsse-policy-trust.war");
}
public void test() throws Exception
@@ -58,20 +59,16 @@
BusFactory.setThreadDefaultBus(bus);
final QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy", "SecurityService");
- final URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-trust/SecurityService?wsdl");
+ final URL wsdlURL = new URL(serviceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface) service.getPort(ServiceIface.class);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-trust/SecurityService".replaceFirst("8080", "7070"));
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
+
final QName stsServiceName = new QName("urn:picketlink:identity-federation:sts", "PicketLinkSTS");
final QName stsPortName = new QName("urn:picketlink:identity-federation:sts", "PicketLinkSTSPort");
- WSTrustTestUtils.setupWsseAndSTSClient(proxy, bus, "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-trustPicketLink-sts/PicketLinkSTS?wsdl",
- stsServiceName, stsPortName);
+ WSTrustTestUtils.setupWsseAndSTSClient(proxy, bus, stsURL + "?wsdl", stsServiceName, stsPortName);
- try {
- assertEquals("WS-Trust Hello World!", proxy.sayHello());
- } catch (Exception e) {
- throw CryptoHelper.checkAndWrapException(e);
- }
+ assertEquals("WS-Trust Hello World!", proxy.sayHello());
}
finally
{
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -31,9 +31,7 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
-import org.jboss.wsf.test.CryptoHelper;
import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.test.ws.jaxws.samples.wsse.policy.trust.service.ServiceIface;
/**
* WS-Trust test case
@@ -52,7 +50,7 @@
{
//deploy client, STS and service; start a security domain to be used by the STS for authenticating client
return WSTrustTestUtils.getTestSetup(WSTrustTestCase.class,
- DeploymentArchives.CLIENT_JAR + " " + DeploymentArchives.STS_WAR + " " + DeploymentArchives.SERVER_WAR);
+ "jaxws-samples-wsse-policy-trust-client.jar jaxws-samples-wsse-policy-trust-sts.war jaxws-samples-wsse-policy-trust.war");
}
/**
@@ -72,15 +70,12 @@
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface) service.getPort(ServiceIface.class);
((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
+
final QName stsServiceName = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512/", "SecurityTokenService");
final QName stsPortName = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512/", "UT_Port");
WSTrustTestUtils.setupWsseAndSTSClient(proxy, bus, stsURL + "?wsdl", stsServiceName, stsPortName);
-
- try {
- assertEquals("WS-Trust Hello World!", proxy.sayHello());
- } catch (Exception e) {
- throw CryptoHelper.checkAndWrapException(e);
- }
+
+ assertEquals("WS-Trust Hello World!", proxy.sayHello());
}
finally
{
@@ -104,77 +99,15 @@
final URL wsdlURL = new URL(serviceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface) service.getPort(ServiceIface.class);
-
- WSTrustTestUtils.setupWsse(proxy, bus);
((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
- try {
- assertEquals("WS-Trust Hello World!", proxy.sayHello());
- } catch (Exception e) {
- throw CryptoHelper.checkAndWrapException(e);
- }
- }
- finally
- {
- bus.shutdown(true);
- }
- }
-
- /**
- * No CallbackHandler is provided in STSCLient. Username and password provided instead.
- *
- * @throws Exception
- */
- public void testNoClientCallback() throws Exception {
- Bus bus = BusFactory.newInstance().createBus();
- try {
- BusFactory.setThreadDefaultBus(bus);
-
- final QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy", "SecurityService");
- final URL wsdlURL = new URL(serviceURL + "?wsdl");
- Service service = Service.create(wsdlURL, serviceName);
- ServiceIface proxy = (ServiceIface) service.getPort(ServiceIface.class);
-
- final QName stsServiceName = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512/", "SecurityTokenService");
- final QName stsPortName = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512/", "UT_Port");
- WSTrustTestUtils.setupWsseAndSTSClientNoCallbackHandler(proxy, bus, stsURL + "?wsdl", stsServiceName, stsPortName);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
-
+ WSTrustTestUtils.setupWsse(proxy, bus);
+
assertEquals("WS-Trust Hello World!", proxy.sayHello());
- } finally {
- bus.shutdown(true);
}
- }
-
- /**
- * No SIGNATURE_USERNAME is provided to the service. Service will use the
- * client's keystore alias in its place.
- *
- * @throws Exception
- */
- public void testNoSignatureUsername() throws Exception
- {
- Bus bus = BusFactory.newInstance().createBus();
- try
- {
- BusFactory.setThreadDefaultBus(bus);
-
- final QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy", "SecurityService");
- final URL wsdlURL = new URL(serviceURL + "?wsdl");
- Service service = Service.create(wsdlURL, serviceName);
- ServiceIface proxy = (ServiceIface) service.getPort(ServiceIface.class);
- ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL.replaceFirst("8080", "7070"));
-
- final QName stsServiceName = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512/", "SecurityTokenService");
- final QName stsPortName = new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512/", "UT_Port");
- WSTrustTestUtils.setupWsseAndSTSClientNoSignatureUsername(proxy, bus, stsURL + "?wsdl", stsServiceName, stsPortName);
-
- assertEquals("WS-Trust Hello World!", proxy.sayHello());
- }
finally
{
bus.shutdown(true);
}
}
-
}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestUtils.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestUtils.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestUtils.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -21,20 +21,18 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.trust;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+
import org.apache.cxf.Bus;
import org.apache.cxf.ws.security.SecurityConstants;
import org.apache.cxf.ws.security.trust.STSClient;
-import org.jboss.test.ws.jaxws.samples.wsse.policy.trust.service.ServiceIface;
-import org.jboss.test.ws.jaxws.samples.wsse.policy.trust.shared.ClientCallbackHandler;
-import org.jboss.test.ws.jaxws.samples.wsse.policy.trust.shared.UsernameTokenCallbackHandler;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTestHelper;
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import java.util.HashMap;
-import java.util.Map;
-
/**
* Some client util methods for WS-Trust testcases
*
@@ -58,39 +56,11 @@
public static void setupWsseAndSTSClient(ServiceIface proxy, Bus bus, String stsWsdlLocation, QName stsService, QName stsPort)
{
Map<String, Object> ctx = ((BindingProvider) proxy).getRequestContext();
- setServiceContextAttributes(ctx);
- ctx.put(SecurityConstants.STS_CLIENT, createSTSClient(bus, stsWsdlLocation, stsService, stsPort));
- }
-
- public static void setupWsse(ServiceIface proxy, Bus bus)
- {
- Map<String, Object> ctx = ((BindingProvider) proxy).getRequestContext();
- setServiceContextAttributes(ctx);
- ctx.put(appendIssuedTokenSuffix(SecurityConstants.USERNAME), "alice");
- ctx.put(appendIssuedTokenSuffix(SecurityConstants.CALLBACK_HANDLER), new ClientCallbackHandler());
- ctx.put(appendIssuedTokenSuffix(SecurityConstants.ENCRYPT_PROPERTIES), Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
- ctx.put(appendIssuedTokenSuffix(SecurityConstants.ENCRYPT_USERNAME), "mystskey");
- ctx.put(appendIssuedTokenSuffix(SecurityConstants.STS_TOKEN_USERNAME), "myclientkey");
- ctx.put(appendIssuedTokenSuffix(SecurityConstants.STS_TOKEN_PROPERTIES), Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
- ctx.put(appendIssuedTokenSuffix(SecurityConstants.STS_TOKEN_USE_CERT_FOR_KEYINFO), "true");
- }
-
-
- /**
- * A PASSWORD is provided in place of the ClientCallbackHandler in the
- * STSClient. A USERNAME and PASSWORD is required by CXF in the msg.
- *
- * @param proxy
- * @param bus
- * @param stsWsdlLocation
- * @param stsService
- * @param stsPort
- * @see org.apache.cxf.ws.security.SecurityConstants#PASSWORD
- */
- public static void setupWsseAndSTSClientNoCallbackHandler(ServiceIface proxy, Bus bus, String stsWsdlLocation, QName stsService, QName stsPort) {
- Map<String, Object> ctx = ((BindingProvider) proxy).getRequestContext();
- setServiceContextAttributes(ctx);
-
+ 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);
if (stsWsdlLocation != null) {
stsClient.setWsdlLocation(stsWsdlLocation);
@@ -99,7 +69,7 @@
}
Map<String, Object> props = stsClient.getProperties();
props.put(SecurityConstants.USERNAME, "alice");
- props.put(SecurityConstants.PASSWORD, "clarinet");
+ 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");
@@ -107,106 +77,14 @@
props.put(SecurityConstants.STS_TOKEN_USE_CERT_FOR_KEYINFO, "true");
ctx.put(SecurityConstants.STS_CLIENT, stsClient);
}
-
- /**
- * Uses the SIGNATURE_PROPERTIES keystore's "alias name" as the SIGNATURE_USERNAME when
- * USERNAME and SIGNATURE_USERNAME is not provided.
- *
- * @param proxy
- * @param bus
- * @param stsWsdlLocation
- * @param stsService
- * @param stsPort
- * @see org.apache.cxf.ws.security.SecurityConstants#SIGNATURE_PROPERTIES
- */
- public static void setupWsseAndSTSClientNoSignatureUsername(ServiceIface proxy, Bus bus, String stsWsdlLocation, QName stsService, QName stsPort) {
+
+ public static 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.ENCRYPT_USERNAME, "myservicekey");
-
- ctx.put(SecurityConstants.STS_CLIENT, createSTSClient(bus, stsWsdlLocation, stsService, stsPort));
- }
-
- /**
- * Request a security token that allows it to act as if it were somebody else.
- *
- * @param proxy
- * @param bus
- */
- public static void setupWsseAndSTSClientActAs(BindingProvider proxy, Bus bus) {
-
- Map<String, Object> ctx = proxy.getRequestContext();
-
- ctx.put(SecurityConstants.CALLBACK_HANDLER, new ClientCallbackHandler());
- ctx.put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
- ctx.put(SecurityConstants.ENCRYPT_USERNAME, "myactaskey");
- ctx.put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
ctx.put(SecurityConstants.SIGNATURE_USERNAME, "myclientkey");
-
-
- UsernameTokenCallbackHandler ch = new UsernameTokenCallbackHandler();
- String str = ch.getUsernameTokenString("alice","clarinet");
-
- ctx.put(SecurityConstants.STS_TOKEN_ACT_AS, str);
-
-
- STSClient stsClient = new STSClient(bus);
- Map<String, Object> props = stsClient.getProperties();
- props.put(SecurityConstants.USERNAME, "bob");
- 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);
- }
-
- /**
- * Request a security token that allows it to act on the behalf of somebody else.
- *
- * @param proxy
- * @param bus
- */
- public static void setupWsseAndSTSClientOnBehalfOf(BindingProvider proxy, Bus bus) {
-
- Map<String, Object> ctx = proxy.getRequestContext();
-
- ctx.put(SecurityConstants.CALLBACK_HANDLER, new ClientCallbackHandler());
- ctx.put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
- ctx.put(SecurityConstants.ENCRYPT_USERNAME, "myactaskey");
- ctx.put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
- ctx.put(SecurityConstants.SIGNATURE_USERNAME, "myclientkey");
- ctx.put(SecurityConstants.USERNAME,"alice");
- ctx.put(SecurityConstants.PASSWORD, "clarinet");
-
- STSClient stsClient = new STSClient(bus);
- stsClient.setOnBehalfOf(new UsernameTokenCallbackHandler());
-
- Map<String, Object> props = stsClient.getProperties();
- 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);
- }
-
- public static void setupWsseAndSTSClientBearer(BindingProvider proxy, Bus bus) {
-
- Map<String, Object> ctx = proxy.getRequestContext();
-
- STSClient stsClient = new STSClient(bus);
-
- 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");
ctx.put(appendIssuedTokenSuffix(SecurityConstants.USERNAME), "alice");
ctx.put(appendIssuedTokenSuffix(SecurityConstants.CALLBACK_HANDLER), new ClientCallbackHandler());
@@ -215,73 +93,10 @@
ctx.put(appendIssuedTokenSuffix(SecurityConstants.STS_TOKEN_USERNAME), "myclientkey");
ctx.put(appendIssuedTokenSuffix(SecurityConstants.STS_TOKEN_PROPERTIES), Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
ctx.put(appendIssuedTokenSuffix(SecurityConstants.STS_TOKEN_USE_CERT_FOR_KEYINFO), "true");
-
- ctx.put(SecurityConstants.STS_CLIENT, stsClient);
}
-
- public static void setupWsseAndSTSClientHolderOfKey(BindingProvider proxy, Bus bus) {
-
- Map<String, Object> ctx = proxy.getRequestContext();
-
- STSClient stsClient = new STSClient(bus);
-
- 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");
- ctx.put(appendIssuedTokenSuffix(SecurityConstants.USERNAME), "alice");
- ctx.put(appendIssuedTokenSuffix(SecurityConstants.CALLBACK_HANDLER), new ClientCallbackHandler());
- ctx.put(appendIssuedTokenSuffix(SecurityConstants.ENCRYPT_PROPERTIES), Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
- ctx.put(appendIssuedTokenSuffix(SecurityConstants.ENCRYPT_USERNAME), "mystskey");
- ctx.put(appendIssuedTokenSuffix(SecurityConstants.STS_TOKEN_USERNAME), "myclientkey");
- ctx.put(appendIssuedTokenSuffix(SecurityConstants.STS_TOKEN_PROPERTIES), Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
- ctx.put(appendIssuedTokenSuffix(SecurityConstants.STS_TOKEN_USE_CERT_FOR_KEYINFO), "true");
-
- ctx.put(SecurityConstants.STS_CLIENT, stsClient);
- }
-
+
private static String appendIssuedTokenSuffix(String prop)
{
return prop + ".it";
}
-
- /**
- * Create and configure an STSClient for use by service ServiceImpl.
- *
- * Whenever an "<sp:IssuedToken>" policy is configured on a WSDL port, as is the
- * case for ServiceImpl, a STSClient must be created and configured in
- * order for the service to connect to the STS-server to obtain a token.
- *
- * @param bus
- * @param stsWsdlLocation
- * @param stsService
- * @param stsPort
- * @return
- */
- private static STSClient createSTSClient(Bus bus, String stsWsdlLocation, QName stsService, QName stsPort){
- STSClient stsClient = new STSClient(bus);
- if (stsWsdlLocation != null) {
- stsClient.setWsdlLocation(stsWsdlLocation);
- stsClient.setServiceQName(stsService);
- stsClient.setEndpointQName(stsPort);
- }
- Map<String, Object> props = stsClient.getProperties();
- props.put(SecurityConstants.USERNAME, "alice");
- props.put(SecurityConstants.CALLBACK_HANDLER, new ClientCallbackHandler());
- props.put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
- props.put(SecurityConstants.ENCRYPT_USERNAME, "mystskey");
- props.put(SecurityConstants.STS_TOKEN_USERNAME, "myclientkey");
- props.put(SecurityConstants.STS_TOKEN_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/clientKeystore.properties"));
- props.put(SecurityConstants.STS_TOKEN_USE_CERT_FOR_KEYINFO, "true");
- return stsClient;
- }
-
- private static void setServiceContextAttributes(Map<String, Object> ctx){
- 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");
- }
}
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/wsf/test/CryptoHelper.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/wsf/test/CryptoHelper.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/wsf/test/CryptoHelper.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2014, 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.wsf.test;
-
-import java.security.NoSuchAlgorithmException;
-
-public final class CryptoHelper
-{
- public static Exception checkAndWrapException(Exception e) throws Exception {
- if (!isBouncyCastleAvailable()) {
- return new Exception("Bouncy Castle JCE provider does not seem to be properly installed; either install it " +
- "or run the testuite with -Dexclude-integration-tests-BC-related=true to exclude this test.", e);
- } else if(!isUnlimitedStrengthCryptographyAvailable()) {
- return new Exception("JCE unlimited strength cryptography extension does not seem to be properly installed; either install it " +
- "or run the testuite with '-Dexclude-integration-tests-unlimited-strength-related=true' to exclude this test.", e);
- } else if (e.getCause() != null && e.getCause().getClass().getName().contains("SoapFault") && e.getMessage() != null && e.getMessage().contains("algorithm")) {
- return new Exception("Please check for Bouncy Castle JCE provider and JCE unlimited strenght cryptography extension availability on server side.", e);
- } else {
- return e;
- }
- }
-
- public static boolean isBouncyCastleAvailable() {
- return java.security.Security.getProvider("BC") != null;
- }
-
- public static boolean isUnlimitedStrengthCryptographyAvailable() {
- try {
- return (javax.crypto.Cipher.getMaxAllowedKeyLength("RC5") >= 256);
- } catch (NoSuchAlgorithmException e) {
- throw new RuntimeException(e);
- }
- }
-}
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/wsf/test/TestServlet.java
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/wsf/test/TestServlet.java 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/java/org/jboss/wsf/test/TestServlet.java 2014-11-12 03:59:20 UTC (rev 19099)
@@ -28,9 +28,6 @@
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
@@ -48,19 +45,6 @@
public class TestServlet extends HttpServlet
{
private static final long serialVersionUID = 1L;
- private static final Pattern VALID_IPV6_PATTERN;
- private static final String ipv6Pattern = "^([\\dA-F]{1,4}:|((?=.*(::))(?!.*\\3.+\\3))\\3?)([\\dA-F]{1,4}(\\3|:\\b)|\\2){5}(([\\dA-F]{1,4}(\\3|:\\b|$)|\\2){2}|(((2[0-4]|1\\d|[1-9])?\\d|25[0-5])\\.?\\b){4})\\z";
- static
- {
- try
- {
- VALID_IPV6_PATTERN = Pattern.compile(ipv6Pattern, Pattern.CASE_INSENSITIVE);
- }
- catch (PatternSyntaxException e)
- {
- throw new RuntimeException(e);
- }
- }
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
@@ -74,7 +58,11 @@
try
{
ClientHelper helper = (ClientHelper) Class.forName(helperClassName).newInstance();
- String hostName = toIPv6URLFormat(System.getProperty("jboss.bind.address", "localhost"));
+ String hostName = System.getProperty("jboss.bind.address", "localhost");
+ if (hostName.startsWith(":"))
+ {
+ hostName = "[" + hostName + "]";
+ }
helper.setTargetEndpoint("http://" + hostName + ":8080" + path);
List<String> failedTests = new LinkedList<String>();
List<String> errorTests = new LinkedList<String>();
@@ -129,22 +117,6 @@
}
}
- private String toIPv6URLFormat(final String host)
- {
- boolean isIPv6URLFormatted = false;
- //strip out IPv6 URL formatting if already provided...
- if (host.startsWith("[") && host.endsWith("]")) {
- isIPv6URLFormatted = true;
- }
- //return IPv6 URL formatted address
- if (isIPv6URLFormatted) {
- return host;
- } else {
- Matcher m = VALID_IPV6_PATTERN.matcher(host);
- return m.matches() ? "[" + host + "]" : host;
- }
- }
-
private void invokeMethod(Method m, ClientHelper helper, List<String> failedTests, List<String> errorTests) throws ServletException
{
try
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/jaxws-endpoint-config.xml
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/jaxws-endpoint-config.xml 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/jaxws-endpoint-config.xml 2014-11-12 03:59:20 UTC (rev 19099)
@@ -22,10 +22,6 @@
<property-value>alice</property-value>
</property>
<property>
- <property-name>ws-security.enable.streaming</property-name>
- <property-value>true</property-value>
- </property>
- <property>
<property-name>ws-security.callback-handler</property-name>
<property-value>org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback</property-value>
</property>
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/wsdl/SecurityService.wsdl 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/gcm/WEB-INF/wsdl/SecurityService.wsdl 2014-11-12 03:59:20 UTC (rev 19099)
@@ -78,7 +78,7 @@
<sp:OnlySignEntireHeadersAndBody/>
<sp:AlgorithmSuite>
<wsp:Policy>
- <sp-cxf:Basic256GCM xmlns:sp-cxf="http://cxf.apache.org/custom/security-policy"/>
+ <sp-cxf:Basic192GCM xmlns:sp-cxf="http://cxf.apache.org/custom/security-policy"/>
</wsp:Policy>
</sp:AlgorithmSuite>
</wsp:Policy>
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign/META-INF-server/wsdl/SecurityService.wsdl
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign/META-INF-server/wsdl/SecurityService.wsdl 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign/META-INF-server/wsdl/SecurityService.wsdl 2014-11-12 03:59:20 UTC (rev 19099)
@@ -54,7 +54,7 @@
<wsp:Policy>
<sp:X509Token sp:IncludeToken='http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysT...'>
<wsp:Policy>
- <sp:WssX509V1Token10 />
+ <sp:WssX509V3Token10 />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
@@ -63,7 +63,7 @@
<wsp:Policy>
<sp:X509Token sp:IncludeToken='http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always'>
<wsp:Policy>
- <sp:WssX509V1Token10 />
+ <sp:WssX509V3Token10 />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign/WEB-INF/wsdl/SecurityService.wsdl 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign/WEB-INF/wsdl/SecurityService.wsdl 2014-11-12 03:59:20 UTC (rev 19099)
@@ -54,7 +54,7 @@
<wsp:Policy>
<sp:X509Token sp:IncludeToken='http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysT...'>
<wsp:Policy>
- <sp:WssX509V1Token10 />
+ <sp:WssX509V3Token10 />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
@@ -63,7 +63,7 @@
<wsp:Policy>
<sp:X509Token sp:IncludeToken='http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always'>
<wsp:Policy>
- <sp:WssX509V1Token10 />
+ <sp:WssX509V3Token10 />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign-encrypt/META-INF/jaxws-client-config.xml
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign-encrypt/META-INF/jaxws-client-config.xml 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign-encrypt/META-INF/jaxws-client-config.xml 2014-11-12 03:59:20 UTC (rev 19099)
@@ -22,10 +22,6 @@
<property-value>bob</property-value>
</property>
<property>
- <property-name>ws-security.enable.streaming</property-name>
- <property-value>true</property-value>
- </property>
- <property>
<property-name>ws-security.callback-handler</property-name>
<property-value>org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback</property-value>
</property>
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jaxws-endpoint-config.xml
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jaxws-endpoint-config.xml 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jaxws-endpoint-config.xml 2014-11-12 03:59:20 UTC (rev 19099)
@@ -9,10 +9,6 @@
<property-name>ws-security.validate.token</property-name>
<property-value>false</property-value>
</property>
- <property>
- <property-name>cxf.interceptors.in</property-name>
- <property-value>org.jboss.wsf.stack.cxf.security.authentication.SubjectCreatingPolicyInterceptor</property-value>
- </property>
</endpoint-config>
</jaxws-config>
\ No newline at end of file
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService.wsdl 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService.wsdl 2014-11-12 03:59:20 UTC (rev 19099)
@@ -101,7 +101,7 @@
<soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-oasis/SecurityService224"/>
</wsdl:port>
</wsdl:service>
- <!-- 2.2.1 (WSS1.0) X.509 Certificates, Sign, Encrypt -->
+ <!-- 2.2.1 (WSS 1.0) UsernameToken with Mutual X.509v3 Authentication, Sign, Encrypt -->
<wsp:Policy wsu:Id="SecurityService221_policy">
<wsp:ExactlyOne>
<wsp:All>
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/META-INF/clientstore.jks
===================================================================
(Binary files differ)
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/META-INF/permissions.xml
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/META-INF/permissions.xml 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/META-INF/permissions.xml 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<permissions xmlns="http://xmlns.jcp.org/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/permissions_7.xsd"
- version="7">
- <permission>
- <class-name>java.lang.RuntimePermission</class-name>
- <name>getClassLoader</name>
- </permission>
- <permission>
- <class-name>java.lang.RuntimePermission</class-name>
- <name>createClassLoader</name>
- </permission>
- <permission>
- <class-name>java.lang.RuntimePermission</class-name>
- <name>accessDeclaredMembers</name>
- </permission>
- <permission>
- <class-name>java.util.PropertyPermission</class-name>
- <name>jboss.bind.address</name>
- <actions>read</actions>
- </permission>
- <permission>
- <class-name>java.net.SocketPermission</class-name>
- <name>*</name>
- <actions>connect,resolve</actions>
- </permission>
-</permissions>
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/actasKeystore.properties
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/actasKeystore.properties 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/actasKeystore.properties 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,23 +0,0 @@
-#
-# 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=aapass
-org.apache.ws.security.crypto.merlin.keystore.alias=myactaskey
-org.apache.ws.security.crypto.merlin.keystore.file=actasstore.jks
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/actasstore.jks
===================================================================
(Binary files differ)
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-roles.properties
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-roles.properties 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-roles.properties 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,3 +1,2 @@
# A sample roles.properties file for use with the UsersRolesLoginModule
-alice=friend
-bob=friend
\ No newline at end of file
+alice=friend
\ No newline at end of file
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-users.properties
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-users.properties 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/jbossws-users.properties 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,3 +1,2 @@
# A sample users.properties file for use with the UsersRolesLoginModule
alice=clarinet
-bob=trombone
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/picketlink-sts.xml
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/picketlink-sts.xml 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/picketlink-sts.xml 2014-11-12 03:59:20 UTC (rev 19099)
@@ -17,10 +17,4 @@
TokenElement="Assertion"
TokenElementNS="urn:oasis:names:tc:SAML:2.0:assertion"/>
</TokenProviders>
- <!-- Erroneously mandatory element below (in PLINK 2.1.8.Final / 2.5.1.Final) -->
- <ServiceProviders>
- <ServiceProvider Endpoint="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-trust/SecurityService"
- TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0"
- TruststoreAlias="myservicekey"/>
- </ServiceProviders>
</PicketLinkSTS>
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/stsstore.jks
===================================================================
(Binary files differ)
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/web.xml
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/web.xml 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/web.xml 2014-11-12 03:59:20 UTC (rev 19099)
@@ -6,7 +6,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>TestSecurityTokenService</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxws.samples.wsse.policy.trust.sts.SampleSTS</servlet-class>
+ <servlet-class>org.jboss.test.ws.jaxws.samples.wsse.policy.trust.SampleSTS</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>TestSecurityTokenService</servlet-name>
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/ActAsService.wsdl
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/ActAsService.wsdl 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/ActAsService.wsdl 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,165 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<definitions targetNamespace="http://www.jboss.org/jbossws/ws-extensions/actaswssecuritypolicy" name="ActAsService"
- xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/actaswssecuritypolicy"
- 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/actaswssecuritypolicy"
- schemaLocation="ActAsService_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="ActAsServiceIface">
- <operation name="sayHello">
- <input message="tns:sayHello"/>
- <output message="tns:sayHelloResponse"/>
- </operation>
- </portType>
- <binding name="ActAsServicePortBinding" type="tns:ActAsServiceIface">
- <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="ActAsService">
- <port name="ActAsServicePort" binding="tns:ActAsServicePortBinding">
- <soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-trust-actas/ActAsService"/>
- </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://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-trust-sts/SecurityTokenService</wsaws:Address>
- <wsaws:Metadata xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
- wsdli:wsdlLocation="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-trust-sts/SecurityTokenService?wsdl">
- <wsaw:ServiceName xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
- xmlns:stsns="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
- EndpointName="UT_Port">stsns:SecurityTokenService</wsaw:ServiceName>
- </wsaws:Metadata>
- </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>
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/ActAsService_schema1.xsd
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/ActAsService_schema1.xsd 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/ActAsService_schema1.xsd 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<xs:schema version="1.0" targetNamespace="http://www.jboss.org/jbossws/ws-extensions/actaswssecuritypolicy"
- xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/actaswssecuritypolicy"
- 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>
-
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/BearerService.wsdl
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/BearerService.wsdl 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/BearerService.wsdl 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,131 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<definitions targetNamespace="http://www.jboss.org/jbossws/ws-extensions/bearerwssecuritypolicy"
- name="BearerService"
- xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/bearerwssecuritypolicy"
- 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:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"
- 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/bearerwssecuritypolicy"
- schemaLocation="BearerService_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="BearerIface">
- <operation name="sayHello">
- <input message="tns:sayHello"/>
- <output message="tns:sayHelloResponse"/>
- </operation>
- </portType>
- <binding name="BearerServicePortBinding" type="tns:BearerIface">
- <wsp:PolicyReference URI="#TransportSAML2BearerPolicy" />
- <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
- <operation name="sayHello">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- </binding>
- <service name="BearerService">
- <port name="BearerServicePort" binding="tns:BearerServicePortBinding">
- <soap:address location="https://@jboss.bind.address@:8443/jaxws-samples-wsse-policy-trust-bearer/BearerService"/>
- </port>
- </service>
-
-
- <wsp:Policy wsu:Id="TransportSAML2BearerPolicy">
- <wsp:ExactlyOne>
- <wsp:All>
- <wsam:Addressing wsp:Optional="false">
- <wsp:Policy />
- </wsam:Addressing>
-
- <sp:TransportBinding
- xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
- <wsp:Policy>
- <sp:TransportToken>
- <wsp:Policy>
- <sp:HttpsToken>
- <wsp:Policy/>
- </sp:HttpsToken>
- </wsp:Policy>
- </sp:TransportToken>
- <sp:AlgorithmSuite>
- <wsp:Policy>
- <sp:TripleDes />
- </wsp:Policy>
- </sp:AlgorithmSuite>
- <sp:Layout>
- <wsp:Policy>
- <sp:Lax />
- </wsp:Policy>
- </sp:Layout>
- <sp:IncludeTimestamp />
- </wsp:Policy>
- </sp:TransportBinding>
-
- <sp:SignedSupportingTokens
- xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
- <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/Bearer</t:KeyType>
- </sp:RequestSecurityTokenTemplate>
- <wsp:Policy>
- <sp:RequireInternalReference />
- </wsp:Policy>
-
- <sp:Issuer>
- <wsaws:Address>http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-trust-sts-bearer/SecurityTokenService</wsaws:Address>
- <wsaws:Metadata
- xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
- wsdli:wsdlLocation="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-trust-sts-bearer/SecurityTokenService?wsdl">
- <wsaw:ServiceName
- xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
- xmlns:stsns="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
- EndpointName="UT_Port">stsns:SecurityTokenService</wsaw:ServiceName>
- </wsaws:Metadata>
- </sp:Issuer>
-
- </sp:IssuedToken>
- </wsp:Policy>
- </sp:SignedSupportingTokens>
- <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>
-
-</definitions>
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/BearerService_schema1.xsd
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/BearerService_schema1.xsd 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/BearerService_schema1.xsd 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<xs:schema version="1.0"
- targetNamespace="http://www.jboss.org/jbossws/ws-extensions/bearerwssecuritypolicy"
- xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/bearerwssecuritypolicy"
- 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>
-
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/HolderOfKeyService.wsdl
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/HolderOfKeyService.wsdl 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/HolderOfKeyService.wsdl 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<definitions targetNamespace="http://www.jboss.org/jbossws/ws-extensions/holderofkeywssecuritypolicy"
- name="HolderOfKeyService"
- xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/holderofkeywssecuritypolicy"
- 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:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"
- 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/holderofkeywssecuritypolicy"
- schemaLocation="HolderOfKeyService_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="HolderOfKeyIface">
- <operation name="sayHello">
- <input message="tns:sayHello"/>
- <output message="tns:sayHelloResponse"/>
- </operation>
- </portType>
- <binding name="HolderOfKeyServicePortBinding" type="tns:HolderOfKeyIface">
- <wsp:PolicyReference URI="#TransportSAML2HolderOfKeyPolicy" />
- <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
- <operation name="sayHello">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- </binding>
- <service name="HolderOfKeyService">
- <port name="HolderOfKeyServicePort" binding="tns:HolderOfKeyServicePortBinding">
- <soap:address location="https://@jboss.bind.address@:8443/jaxws-samples-wsse-policy-trust-holderofkey/HolderOfKeyService"/>
- </port>
- </service>
-
-
- <wsp:Policy wsu:Id="TransportSAML2HolderOfKeyPolicy">
- <wsp:ExactlyOne>
- <wsp:All>
- <wsam:Addressing wsp:Optional="false">
- <wsp:Policy />
- </wsam:Addressing>
-
- <sp:TransportBinding
- xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
- <wsp:Policy>
- <sp:TransportToken>
- <wsp:Policy>
- <sp:HttpsToken>
- <wsp:Policy/>
- </sp:HttpsToken>
- </wsp:Policy>
- </sp:TransportToken>
- <sp:AlgorithmSuite>
- <wsp:Policy>
- <sp:TripleDes />
- </wsp:Policy>
- </sp:AlgorithmSuite>
- <sp:Layout>
- <wsp:Policy>
- <sp:Lax />
- </wsp:Policy>
- </sp:Layout>
- <sp:IncludeTimestamp />
- </wsp:Policy>
- </sp:TransportBinding>
-
- <sp:SignedEndorsingSupportingTokens
- xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
- <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/SymmetricKey</t:KeyType>
- </sp:RequestSecurityTokenTemplate>
- <wsp:Policy>
- <sp:RequireInternalReference />
- </wsp:Policy>
-
- <sp:Issuer>
- <wsaws:Address>http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-trust-sts-holderofkey/SecurityTokenService</wsaws:Address>
- <wsaws:Metadata
- xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
- wsdli:wsdlLocation="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-trust-sts-holderofkey/SecurityTokenService?wsdl">
- <wsaw:ServiceName
- xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
- xmlns:stsns="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
- EndpointName="UT_Port">stsns:SecurityTokenService</wsaw:ServiceName>
- </wsaws:Metadata>
- </sp:Issuer>
-
- </sp:IssuedToken>
- </wsp:Policy>
- </sp:SignedEndorsingSupportingTokens>
-
- <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>
-
-</definitions>
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/HolderOfKeyService_schema1.xsd
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/HolderOfKeyService_schema1.xsd 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/HolderOfKeyService_schema1.xsd 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<xs:schema version="1.0"
- targetNamespace="http://www.jboss.org/jbossws/ws-extensions/holderofkeywssecuritypolicy"
- xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/holderofkeywssecuritypolicy"
- 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>
-
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/OnBehalfOfService.wsdl
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/OnBehalfOfService.wsdl 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/OnBehalfOfService.wsdl 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,165 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<definitions targetNamespace="http://www.jboss.org/jbossws/ws-extensions/onbehalfofwssecuritypolicy" name="OnBehalfOfService"
- xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/onbehalfofwssecuritypolicy"
- 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/onbehalfofwssecuritypolicy"
- schemaLocation="OnBehalfOfService_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="OnBehalfOfServiceIface">
- <operation name="sayHello">
- <input message="tns:sayHello"/>
- <output message="tns:sayHelloResponse"/>
- </operation>
- </portType>
- <binding name="OnBehalfOfServicePortBinding" type="tns:OnBehalfOfServiceIface">
- <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="OnBehalfOfService">
- <port name="OnBehalfOfServicePort" binding="tns:OnBehalfOfServicePortBinding">
- <soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-trust-onbehalfof/OnBehalfOfService"/>
- </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://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-trust-sts/SecurityTokenService</wsaws:Address>
- <wsaws:Metadata xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
- wsdli:wsdlLocation="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-trust-sts/SecurityTokenService?wsdl">
- <wsaw:ServiceName xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
- xmlns:stsns="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
- EndpointName="UT_Port">stsns:SecurityTokenService</wsaw:ServiceName>
- </wsaws:Metadata>
- </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>
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/OnBehalfOfService_schema1.xsd
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/OnBehalfOfService_schema1.xsd 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/OnBehalfOfService_schema1.xsd 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<xs:schema version="1.0" targetNamespace="http://www.jboss.org/jbossws/ws-extensions/onbehalfofwssecuritypolicy"
- xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/onbehalfofwssecuritypolicy"
- 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>
-
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/PicketLinkSTS.wsdl
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/PicketLinkSTS.wsdl 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/PicketLinkSTS.wsdl 2014-11-12 03:59:20 UTC (rev 19099)
@@ -66,7 +66,7 @@
</wsdl:binding>
<wsdl:service name="PicketLinkSTS">
<wsdl:port name="PicketLinkSTSPort" binding="tns:STSBinding">
- <soap12:address location="http://@jboss.bind.address@:8080/picketlink-sts/PicketLinkSTS"/>
+ <soap12:address location="http://localhost:8080/picketlink-sts/PicketLinkSTS"/>
</wsdl:port>
</wsdl:service>
Modified: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/SecurityService.wsdl 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/SecurityService.wsdl 2014-11-12 03:59:20 UTC (rev 19099)
@@ -68,9 +68,9 @@
<sp:RequireInternalReference />
</wsp:Policy>
<sp:Issuer>
- <wsaws:Address>http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-trust-sts/SecurityTokenService</wsaws:Address>
+ <wsaws:Address>http://localhost:8080/jaxws-samples-wsse-policy-trust-sts/SecurityTokenSe...</wsaws:Address>
<wsaws:Metadata xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
- wsdli:wsdlLocation="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-trust-sts/SecurityTokenService?wsdl">
+ wsdli:wsdlLocation="http://localhost:8080/jaxws-samples-wsse-policy-trust-sts/SecurityTokenSe...">
<wsaw:ServiceName xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:stsns="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
EndpointName="UT_Port">stsns:SecurityTokenService</wsaw:ServiceName>
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/bearer-ws-trust-1.4-service.wsdl
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/bearer-ws-trust-1.4-service.wsdl 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/bearer-ws-trust-1.4-service.wsdl 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,333 +0,0 @@
-<?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>
- </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>
- </wsp:All>
- </wsp:ExactlyOne>
- </wsp:Policy>
-
-</wsdl:definitions>
Deleted: projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/holderofkey-ws-trust-1.4-service.wsdl
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/holderofkey-ws-trust-1.4-service.wsdl 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/bsp11-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/wsdl/holderofkey-ws-trust-1.4-service.wsdl 2014-11-12 03:59:20 UTC (rev 19099)
@@ -1,333 +0,0 @@
-<?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>
- </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>
- </wsp:All>
- </wsp:ExactlyOne>
- </wsp:Policy>
-
-</wsdl:definitions>
Modified: projects/wsi-bp-test/branches/jboss7x/pom.xml
===================================================================
--- projects/wsi-bp-test/branches/jboss7x/pom.xml 2014-11-12 03:25:42 UTC (rev 19098)
+++ projects/wsi-bp-test/branches/jboss7x/pom.xml 2014-11-12 03:59:20 UTC (rev 19099)
@@ -26,20 +26,18 @@
<test.classes.directory>${project.build.directory}/test-classes</test.classes.directory>
<test.resources.directory>${project.build.directory}/test-resources</test.resources.directory>
- <jbossws.cxf.version>5.0.0-SNAPSHOT</jbossws.cxf.version>
- <jbossws.cxf-test-utils.version>5.0.0-SNAPSHOT</jbossws.cxf-test-utils.version>
+ <jbossws.cxf.version>4.3.0.Final</jbossws.cxf.version>
+ <jbossws.cxf-test-utils.version>4.3.0.CR1</jbossws.cxf-test-utils.version>
<junit.version>4.10</junit.version>
- <log4j.version>1.2.16</log4j.version>
- <jbossws.wildfly800.version>5.0.0-SNAPSHOT</jbossws.wildfly800.version>
- <jbossws.wildfly810.version>5.0.0-SNAPSHOT</jbossws.wildfly810.version>
- <wildfly800.version>8.0.0.Final</wildfly800.version>
- <wildfly810.version>8.1.0.Final</wildfly810.version>
- <wildfly900.version>9.0.0.Alpha2-SNAPSHOT</wildfly900.version>
+ <log4j.version>1.2.14</log4j.version>
- <ejb.api.version>1.0.2.Final</ejb.api.version>
- <jaxb.api.version>1.0.4.Final</jaxb.api.version>
- <jaxws.api.version>2.0.2.Final</jaxws.api.version>
+ <jboss720.version>7.2.0.Final</jboss720.version>
+ <wildfly800.version>8.0.1.Final-SNAPSHOT</wildfly800.version>
+
+ <ejb.api.version>1.0.1.Final</ejb.api.version>
+ <jaxb.api.version>1.0.3.Final</jaxb.api.version>
+ <jaxws.api.version>2.0.0.Final</jaxws.api.version>
<jsr181.api.version>1.0-MR1</jsr181.api.version>
<picketlink.version>2.1.7.Final</picketlink.version>
<org.slf4j.version>1.6.1</org.slf4j.version>
@@ -103,22 +101,6 @@
</dependency>
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-wildfly810-server-integration</artifactId>
- <version>${jbossws.wildfly810.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-wildfly810-tests-integration</artifactId>
- <version>${jbossws.wildfly810.version}</version>
- </dependency>
- <dependency>
- <groupId>org.wildfly</groupId>
- <artifactId>wildfly-webservices-tests-integration</artifactId>
- <version>${wildfly900.version}</version>
- </dependency>
-
- <dependency>
<groupId>org.picketlink</groupId>
<artifactId>picketlink-core</artifactId>
<version>${picketlink.version}</version>
@@ -443,22 +425,21 @@
</build>
</profile>
- <!--
- Name: wildfly800
- Descr: WildFly-8.0.0 specific options
+ <!--
+ Name: jboss720
+ Descr: JBoss-7.2.0 specific options
-->
<profile>
- <id>wildfly800</id>
+ <id>jboss720</id>
<properties>
- <jboss.version>${wildfly800.version}</jboss.version>
- <jbossws.integration.target>wildfly800</jbossws.integration.target>
- <remote.port>8080</remote.port>
- <remote.protocol>http-remoting</remote.protocol>
+ <jboss.version>${jboss720.version}</jboss.version>
+ <jbossws.integration.target>jboss720</jbossws.integration.target>
</properties>
<dependencies>
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-wildfly800-tests-integration</artifactId>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-webservices-tests-integration</artifactId>
+ <version>${jboss.version}</version>
</dependency>
</dependencies>
<build>
@@ -475,93 +456,37 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${surefire.jvm.args} ${surefire.jvm.management.args} ${surefire.default-mgmt-serurity.args} -Djava.endorsed.dirs=${project.build.directory}/endorsed</argLine>
- <excludes combine.children="append">
+ <excludes>
<!--https://tools.oasis-open.org/issues/browse/WSBRSP-3(BSP3070)-->
<!-- # [PLFED-390] PicketLink STS chokes on WS-Policy 1.5 tags -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase*</exclude>
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustOnBehalfOfTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustActAsTestCase*</exclude>
+
<!--https://tools.oasis-open.org/issues/browse/WSBRSP-4(BSP3032)-->
<!--After WSBRSP-4 is resolved we can port KerberosTestCase(with spring installed)-->
<!--this broke the WSI-Analyzer-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/secconv/*TestCase*</exclude>
<!--this broke the alogrithm conformance in wsi-bsp-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedSignEncryptTestCase*</exclude>
+
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
-
+
<!--
- Name: wildfly810
- Descr: WildFly-8.1.0 specific options
+ Name: wildfly800
+ Descr: WildFly 8.0.0 specific options
-->
<profile>
- <id>wildfly810</id>
+ <id>wildfly800</id>
<properties>
- <jboss.version>${wildfly810.version}</jboss.version>
- <jbossws.integration.target>wildfly810</jbossws.integration.target>
- <remote.port>8080</remote.port>
- <remote.protocol>http-remoting</remote.protocol>
+ <jboss.version>${wildfly800.version}</jboss.version>
+ <jbossws.integration.target>wildfly800</jbossws.integration.target>
</properties>
<dependencies>
- <dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-wildfly810-tests-integration</artifactId>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <compilerArguments>
- <endorseddirs>${project.build.directory}/endorsed</endorseddirs>
- </compilerArguments>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>${surefire.jvm.args} ${surefire.jvm.management.args} ${surefire.default-mgmt-serurity.args} -Djava.endorsed.dirs=${project.build.directory}/endorsed</argLine>
- <excludes combine.children="append">
- <!--https://tools.oasis-open.org/issues/browse/WSBRSP-3(BSP3070)-->
- <!-- # [PLFED-390] PicketLink STS chokes on WS-Policy 1.5 tags -->
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustOnBehalfOfTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustActAsTestCase*</exclude>
- <!--https://tools.oasis-open.org/issues/browse/WSBRSP-4(BSP3032)-->
- <!--After WSBRSP-4 is resolved we can port KerberosTestCase(with spring installed)-->
- <!--this broke the WSI-Analyzer-->
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/secconv/*TestCase*</exclude>
- <!--this broke the alogrithm conformance in wsi-bsp-->
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedSignEncryptTestCase*</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <!--
- Name: wildfly900
- Descr: WildFly-9.0.0 specific options
- -->
- <profile>
- <id>wildfly900</id>
- <properties>
- <jboss.version>${wildfly900.version}</jboss.version>
- <jbossws.integration.target>wildfly900</jbossws.integration.target>
- <remote.port>8080</remote.port>
- <remote.protocol>http-remoting</remote.protocol>
- </properties>
- <dependencies>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-webservices-tests-integration</artifactId>
@@ -571,31 +496,22 @@
<build>
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <compilerArguments>
- <endorseddirs>${project.build.directory}/endorsed</endorseddirs>
- </compilerArguments>
- </configuration>
- </plugin>
- <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${surefire.jvm.args} ${surefire.jvm.management.args} ${surefire.default-mgmt-serurity.args} -Djava.endorsed.dirs=${project.build.directory}/endorsed</argLine>
- <excludes combine.children="append">
+ <excludes>
<!--https://tools.oasis-open.org/issues/browse/WSBRSP-3(BSP3070)-->
<!-- # [PLFED-390] PicketLink STS chokes on WS-Policy 1.5 tags -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase*</exclude>
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustOnBehalfOfTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustActAsTestCase*</exclude>
+
<!--https://tools.oasis-open.org/issues/browse/WSBRSP-4(BSP3032)-->
<!--After WSBRSP-4 is resolved we can port KerberosTestCase(with spring installed)-->
<!--this broke the WSI-Analyzer-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/secconv/*TestCase*</exclude>
<!--this broke the alogrithm conformance in wsi-bsp-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedSignEncryptTestCase*</exclude>
+
</excludes>
</configuration>
</plugin>
10 years, 1 month
JBossWS SVN: r19097 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-11-11 09:26:47 -0500 (Tue, 11 Nov 2014)
New Revision: 19097
Modified:
stack/cxf/trunk/pom.xml
Log:
Updating component versions
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2014-11-11 14:15:57 UTC (rev 19096)
+++ stack/cxf/trunk/pom.xml 2014-11-11 14:26:47 UTC (rev 19097)
@@ -61,10 +61,10 @@
<!-- Properties -->
<properties>
- <jbossws.api.version>1.0.3-SNAPSHOT</jbossws.api.version>
- <jbossws.spi.version>3.0.0-SNAPSHOT</jbossws.spi.version>
- <jbossws.common.version>3.0.0-SNAPSHOT</jbossws.common.version>
- <jbossws.common.tools.version>1.2.1-SNAPSHOT</jbossws.common.tools.version>
+ <jbossws.api.version>1.0.3.CR2</jbossws.api.version>
+ <jbossws.spi.version>3.0.0.Beta3</jbossws.spi.version>
+ <jbossws.common.version>3.0.0.Beta2</jbossws.common.version>
+ <jbossws.common.tools.version>1.2.1.CR1</jbossws.common.tools.version>
<jbossws.wildfly800.version>5.0.0-SNAPSHOT</jbossws.wildfly800.version>
<jbossws.wildfly810.version>5.0.0-SNAPSHOT</jbossws.wildfly810.version>
<wildfly800.version>8.0.0.Final</wildfly800.version>
@@ -81,7 +81,7 @@
<jboss.xb.version>2.0.3.GA</jboss.xb.version>
<picketbox.version>4.0.19.Final</picketbox.version>
<picketlink.version>2.5.2.Final</picketlink.version>
- <jaxws-undertow-httpspi.version>1.0.1.Beta1</jaxws-undertow-httpspi.version>
+ <jaxws-undertow-httpspi.version>1.0.1.Final</jaxws-undertow-httpspi.version>
<io.undertow.version>1.0.10.Final</io.undertow.version>
<jaxb.api.version>1.0.4.Final</jaxb.api.version>
<jaxb.impl.version>2.2.7</jaxb.impl.version>
10 years, 1 month