[jbossws-commits] JBossWS SVN: r16012 - in stack/cxf/branches/jbossws-cxf-3.1.2: modules/client and 13 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Fri Mar 23 06:01:48 EDT 2012


Author: alessio.soldano at jboss.com
Date: 2012-03-23 06:01:47 -0400 (Fri, 23 Mar 2012)
New Revision: 16012

Added:
   stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptGCMTestCase.java
   stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignEncryptGCMTestCase.java
   stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt-gcm/
   stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt-gcm/WEB-INF/
   stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt-gcm/WEB-INF/jbossws-cxf.xml
   stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt-gcm/WEB-INF/wsdl/
   stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt-gcm/WEB-INF/wsdl/SecurityService.wsdl
   stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wssePolicy/sign-encrypt-gcm/
   stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wssePolicy/sign-encrypt-gcm/WEB-INF/
   stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wssePolicy/sign-encrypt-gcm/WEB-INF/jbossws-cxf.xml
   stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wssePolicy/sign-encrypt-gcm/WEB-INF/wsdl/
   stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wssePolicy/sign-encrypt-gcm/WEB-INF/wsdl/SecurityService.wsdl
Modified:
   stack/cxf/branches/jbossws-cxf-3.1.2/modules/client/pom.xml
   stack/cxf/branches/jbossws-cxf-3.1.2/modules/server/pom.xml
   stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml
   stack/cxf/branches/jbossws-cxf-3.1.2/pom.xml
   stack/cxf/branches/jbossws-cxf-3.1.2/src/main/scripts/assembly-deploy-artifacts.xml
Log:
[JBPAPP-7599] Moved to Apache Santuario 1.5.1 and forked WSS4J 1.5.12-patch-01. Added testcases for AES-GCM algorithm, both with and without WS-Policy support


Modified: stack/cxf/branches/jbossws-cxf-3.1.2/modules/client/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/client/pom.xml	2012-03-23 09:48:55 UTC (rev 16011)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/client/pom.xml	2012-03-23 10:01:47 UTC (rev 16012)
@@ -146,7 +146,7 @@
       <artifactId>stax-api</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.apache</groupId>
+      <groupId>org.apache.santuario</groupId>
       <artifactId>xmlsec</artifactId>
     </dependency>
     <dependency>

Modified: stack/cxf/branches/jbossws-cxf-3.1.2/modules/server/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/server/pom.xml	2012-03-23 09:48:55 UTC (rev 16011)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/server/pom.xml	2012-03-23 10:01:47 UTC (rev 16012)
@@ -136,7 +136,7 @@
       <artifactId>stax-api</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.apache</groupId>
+      <groupId>org.apache.santuario</groupId>
       <artifactId>xmlsec</artifactId>
     </dependency>
     <dependency>

Modified: stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml	2012-03-23 09:48:55 UTC (rev 16011)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml	2012-03-23 10:01:47 UTC (rev 16012)
@@ -113,6 +113,28 @@
       </metainf>
     </jar>
 
+    <!-- jaxws-samples-wsse-sign-encrypt-gcm -->
+    <war
+       warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-sign-encrypt-gcm.war"
+       webxml="${tests.output.dir}/test-resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/web.xml">
+       <classes dir="${tests.output.dir}/test-classes">
+          <include name="org/jboss/test/ws/jaxws/samples/wsse/Service*.class"/>
+          <include name="org/jboss/test/ws/jaxws/samples/wsse/jaxws/*.class"/>
+          <include name="org/jboss/test/ws/jaxws/samples/wsse/KeystorePasswordCallback.class"/>
+       </classes>
+       <webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/sign-encrypt/WEB-INF">
+          <include name="wsdl/*.xsd"/>
+       </webinf>
+       <webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/sign-encrypt-gcm/WEB-INF">
+          <include name="jbossws-cxf.xml"/>
+          <include name="wsdl/*.wsdl"/>
+       </webinf>
+       <zipfileset dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/sign-encrypt/WEB-INF" prefix="WEB-INF/classes">
+          <include name="bob.jks" />
+          <include name="bob.properties" />
+       </zipfileset>
+    </war>
+
     <!-- jaxws-samples-wsse-username -->
     <war
        warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-username.war"
@@ -245,6 +267,28 @@
         <include name="alice.jks" />
       </metainf>
     </jar>
+  	
+    <!-- jaxws-samples-wssePolicy-sign-encrypt-gcm -->
+    <war
+       warfile="${tests.output.dir}/test-libs/jaxws-samples-wssePolicy-sign-encrypt-gcm.war"
+       webxml="${tests.output.dir}/test-resources/jaxws/samples/wssePolicy/sign-encrypt/WEB-INF/web.xml">
+       <classes dir="${tests.output.dir}/test-classes">
+          <include name="org/jboss/test/ws/jaxws/samples/wssePolicy/Service*.class"/>
+          <include name="org/jboss/test/ws/jaxws/samples/wssePolicy/jaxws/*.class"/>
+          <include name="org/jboss/test/ws/jaxws/samples/wssePolicy/KeystorePasswordCallback.class"/>
+       </classes>
+       <webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wssePolicy/sign-encrypt/WEB-INF">
+          <include name="wsdl/*.xsd"/>
+       </webinf>
+       <webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wssePolicy/sign-encrypt-gcm/WEB-INF">
+          <include name="jbossws-cxf.xml"/>
+          <include name="wsdl/*.wsdl"/>
+       </webinf>
+       <zipfileset dir="${tests.output.dir}/test-resources/jaxws/samples/wssePolicy/sign-encrypt/WEB-INF" prefix="WEB-INF/classes">
+          <include name="bob.jks" />
+          <include name="bob.properties" />
+       </zipfileset>
+    </war>
 
     <!-- jaxws-samples-wssePolicy-username -->
     <war

Added: stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptGCMTestCase.java
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptGCMTestCase.java	                        (rev 0)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptGCMTestCase.java	2012-03-23 10:01:47 UTC (rev 16012)
@@ -0,0 +1,106 @@
+/*
+ * 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;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import junit.framework.Test;
+
+import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
+import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor;
+import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * WS-Security sign & encrypt test case using AES-GCM algorithm
+ *
+ * @author alessio.soldano at jboss.com
+ * @since 22-Mar-2012
+ */
+public final class SignEncryptGCMTestCase extends JBossWSTest
+{
+   private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-sign-encrypt-gcm";
+   
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(SignEncryptGCMTestCase.class, "jaxws-samples-wsse-sign-encrypt-client.jar jaxws-samples-wsse-sign-encrypt-gcm.war");
+   }
+
+   public void test() throws Exception
+   {
+      QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity", "SecurityService");
+      URL wsdlURL = new URL(serviceURL + "?wsdl");
+      Service service = Service.create(wsdlURL, serviceName);
+      ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
+      setupWsse(proxy);
+      try
+      {
+         assertEquals("Secure Hello World!", proxy.sayHello());
+      }
+      catch (SOAPFaultException e)
+      {
+         throw new Exception("Please check that the Bouncy Castle provider is installed.", e);
+      }
+   }
+   
+   private void setupWsse(ServiceIface proxy)
+   {
+      Client client = ClientProxy.getClient(proxy);
+      Endpoint cxfEndpoint = client.getEndpoint();
+      
+      Map<String,Object> outProps = new HashMap<String,Object>();
+      outProps.put("action", "Timestamp Signature Encrypt");
+      outProps.put("user", "alice");
+      outProps.put("signaturePropFile", "META-INF/alice.properties");
+      outProps.put("signatureKeyIdentifier", "DirectReference");
+      outProps.put("passwordCallbackClass", "org.jboss.test.ws.jaxws.samples.wsse.KeystorePasswordCallback");
+      outProps.put("signatureParts", "{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body");
+      outProps.put("encryptionPropFile", "META-INF/alice.properties");
+      outProps.put("encryptionUser", "Bob");
+      outProps.put("encryptionParts", "{Element}{http://www.w3.org/2000/09/xmldsig#}Signature;{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body");
+      outProps.put("encryptionSymAlgorithm", "http://www.w3.org/2009/xmlenc11#aes128-gcm");
+      outProps.put("encryptionKeyTransportAlgorithm", "http://www.w3.org/2001/04/xmlenc#rsa-1_5");
+      WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps); //request
+      cxfEndpoint.getOutInterceptors().add(wssOut);
+      cxfEndpoint.getOutInterceptors().add(new SAAJOutInterceptor());
+      
+      Map<String,Object> inProps= new HashMap<String,Object>();
+      inProps.put("action", "Timestamp Signature Encrypt");
+      inProps.put("signaturePropFile", "META-INF/alice.properties");
+      inProps.put("passwordCallbackClass", "org.jboss.test.ws.jaxws.samples.wsse.KeystorePasswordCallback");
+      inProps.put("decryptionPropFile", "META-INF/alice.properties");
+      WSS4JInInterceptor wssIn = new WSS4JInInterceptor(inProps); //response
+      cxfEndpoint.getInInterceptors().add(wssIn);
+      cxfEndpoint.getInInterceptors().add(new SAAJInInterceptor());
+   }
+}

Added: stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignEncryptGCMTestCase.java
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignEncryptGCMTestCase.java	                        (rev 0)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignEncryptGCMTestCase.java	2012-03-23 10:01:47 UTC (rev 16012)
@@ -0,0 +1,77 @@
+/*
+ * 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.wssePolicy;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import junit.framework.Test;
+
+import org.apache.cxf.ws.security.SecurityConstants;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * WS-Security Policy sign & encrypt test case using AES-GCM algorithm
+ *
+ * @author alessio.soldano at jboss.com
+ * @since 22-Mar-2012
+ */
+public final class SignEncryptGCMTestCase extends JBossWSTest
+{
+   private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wssePolicy-sign-encrypt-gcm";
+   
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(SignEncryptGCMTestCase.class, "jaxws-samples-wssePolicy-sign-encrypt-client.jar jaxws-samples-wssePolicy-sign-encrypt-gcm.war");
+   }
+
+   public void test() throws Exception
+   {
+      QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy", "SecurityService");
+      URL wsdlURL = new URL(serviceURL + "?wsdl");
+      Service service = Service.create(wsdlURL, serviceName);
+      ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
+      setupWsse(proxy);
+      try
+      {
+         assertEquals("Secure Hello World!", proxy.sayHello());
+      }
+      catch (SOAPFaultException e)
+      {
+         throw new Exception("Please check that the Bouncy Castle provider is installed.", e);
+      }
+   }
+   
+   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");
+   }
+}

Added: stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt-gcm/WEB-INF/jbossws-cxf.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt-gcm/WEB-INF/jbossws-cxf.xml	                        (rev 0)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt-gcm/WEB-INF/jbossws-cxf.xml	2012-03-23 10:01:47 UTC (rev 16012)
@@ -0,0 +1,60 @@
+<beans
+  xmlns='http://www.springframework.org/schema/beans'
+  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+  xmlns:beans='http://www.springframework.org/schema/beans'
+  xmlns:jaxws='http://cxf.apache.org/jaxws'
+  xsi:schemaLocation='http://cxf.apache.org/core
+    http://cxf.apache.org/schemas/core.xsd
+    http://www.springframework.org/schema/beans
+    http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+    http://cxf.apache.org/jaxws
+    http://cxf.apache.org/schemas/jaxws.xsd'>
+  
+  <bean id="Sign_Request" class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
+    <constructor-arg>
+      <map>
+        <entry key="action" value="Timestamp Signature Encrypt"/>
+        <entry key="signaturePropFile" value="bob.properties"/>
+        <entry key="decryptionPropFile" value="bob.properties"/>
+        <entry key="passwordCallbackClass" value="org.jboss.test.ws.jaxws.samples.wsse.KeystorePasswordCallback"/>
+      </map>
+    </constructor-arg>
+  </bean>
+  
+  <bean id="Sign_Response" class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
+    <constructor-arg>
+      <map>
+        <entry key="action" value="Timestamp Signature Encrypt"/>
+        <entry key="user" value="bob"/>
+        <entry key="signaturePropFile" value="bob.properties"/>
+        <entry key="encryptionPropFile" value="bob.properties"/>
+        <entry key="encryptionUser" value="Alice"/>
+        <entry key="signatureKeyIdentifier" value="DirectReference"/>
+        <entry key="passwordCallbackClass" value="org.jboss.test.ws.jaxws.samples.wsse.KeystorePasswordCallback"/>
+        <entry key="signatureParts" value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body"/>
+        <entry key="encryptionParts" value="{Element}{http://www.w3.org/2000/09/xmldsig#}Signature;{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body"/>
+        <entry key="encryptionKeyTransportAlgorithm" value="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
+        <entry key="encryptionSymAlgorithm" value="http://www.w3.org/2009/xmlenc11#aes128-gcm"/>
+      </map>
+    </constructor-arg>
+  </bean>
+  
+  <jaxws:endpoint
+    id='ServiceImpl'
+    address='http://@jboss.bind.address@:8080/jaxws-samples-wsse-sign-encrypt-gcm'
+    implementor='org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl'>
+    <jaxws:invoker>
+      <bean class='org.jboss.wsf.stack.cxf.InvokerJSE'/>
+    </jaxws:invoker>
+    <jaxws:outInterceptors>
+        <bean class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/>
+        <ref bean="Sign_Response"/>
+    </jaxws:outInterceptors>
+    <jaxws:inInterceptors>
+        <ref bean="Sign_Request"/>
+        <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
+    </jaxws:inInterceptors>
+  </jaxws:endpoint>
+  
+  
+</beans>

Added: stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt-gcm/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt-gcm/WEB-INF/wsdl/SecurityService.wsdl	                        (rev 0)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt-gcm/WEB-INF/wsdl/SecurityService.wsdl	2012-03-23 10:01:47 UTC (rev 16012)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<definitions targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecurity" name="SecurityService"
+		xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
+		xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+		xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+		xmlns="http://schemas.xmlsoap.org/wsdl/">
+  <types>
+    <xsd:schema>
+      <xsd:import namespace="http://www.jboss.org/jbossws/ws-extensions/wssecurity" schemaLocation="SecurityService_schema1.xsd"/>
+    </xsd:schema>
+  </types>
+  <message name="sayHello">
+    <part name="parameters" element="tns:sayHello"/>
+  </message>
+  <message name="sayHelloResponse">
+    <part name="parameters" element="tns:sayHelloResponse"/>
+  </message>
+  <portType name="ServiceIface">
+    <operation name="sayHello">
+      <input message="tns:sayHello"/>
+      <output message="tns:sayHelloResponse"/>
+    </operation>
+  </portType>
+  <binding name="SecurityServicePortBinding" type="tns:ServiceIface">
+    <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="SecurityService">
+    <port name="SecurityServicePort" binding="tns:SecurityServicePortBinding">
+      <soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-sign-encrypt-gcm"/>
+    </port>
+  </service>
+</definitions>

Added: stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wssePolicy/sign-encrypt-gcm/WEB-INF/jbossws-cxf.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wssePolicy/sign-encrypt-gcm/WEB-INF/jbossws-cxf.xml	                        (rev 0)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wssePolicy/sign-encrypt-gcm/WEB-INF/jbossws-cxf.xml	2012-03-23 10:01:47 UTC (rev 16012)
@@ -0,0 +1,28 @@
+<beans
+  xmlns='http://www.springframework.org/schema/beans'
+  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+  xmlns:beans='http://www.springframework.org/schema/beans'
+  xmlns:jaxws='http://cxf.apache.org/jaxws'
+  xsi:schemaLocation='http://cxf.apache.org/core
+    http://cxf.apache.org/schemas/core.xsd
+    http://www.springframework.org/schema/beans
+    http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+    http://cxf.apache.org/jaxws
+    http://cxf.apache.org/schemas/jaxws.xsd'>
+  
+  <jaxws:endpoint
+    id='ServiceImpl'
+    address='http://@jboss.bind.address@:8080/jaxws-samples-wssePolicy-sign-encrypt-gcm'
+    implementor='org.jboss.test.ws.jaxws.samples.wssePolicy.ServiceImpl'>
+    
+    <jaxws:properties>
+       <entry key="ws-security.signature.properties" value="bob.properties"/>
+       <entry key="ws-security.encryption.properties" value="bob.properties"/>
+       <entry key="ws-security.signature.username" value="bob"/>
+       <entry key="ws-security.encryption.username" value="alice"/>
+       <entry key="ws-security.callback-handler" value="org.jboss.test.ws.jaxws.samples.wssePolicy.KeystorePasswordCallback"/>
+    </jaxws:properties>
+  </jaxws:endpoint>
+  
+  
+</beans>

Added: stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wssePolicy/sign-encrypt-gcm/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wssePolicy/sign-encrypt-gcm/WEB-INF/wsdl/SecurityService.wsdl	                        (rev 0)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wssePolicy/sign-encrypt-gcm/WEB-INF/wsdl/SecurityService.wsdl	2012-03-23 10:01:47 UTC (rev 16012)
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<definitions targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy" name="SecurityService"
+		xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy"
+		xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+		xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+		xmlns="http://schemas.xmlsoap.org/wsdl/"
+		xmlns:wsp="http://www.w3.org/ns/ws-policy" 
+        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
+        xmlns:wsaws="http://www.w3.org/2005/08/addressing" 
+        xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy" 
+        xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy">
+  <types>
+    <xsd:schema>
+      <xsd:import namespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy" schemaLocation="SecurityService_schema1.xsd"/>
+    </xsd:schema>
+  </types>
+  <message name="sayHello">
+    <part name="parameters" element="tns:sayHello"/>
+  </message>
+  <message name="sayHelloResponse">
+    <part name="parameters" element="tns:sayHelloResponse"/>
+  </message>
+  <portType name="ServiceIface">
+    <operation name="sayHello">
+      <input message="tns:sayHello"/>
+      <output message="tns:sayHelloResponse"/>
+    </operation>
+  </portType>
+  <binding name="SecurityServicePortBinding" type="tns:ServiceIface">
+    <wsp:PolicyReference URI="#SecurityServiceEncryptThenSignPolicy"/>
+    <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="SecurityService">
+    <port name="SecurityServicePort" binding="tns:SecurityServicePortBinding">
+      <soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wssePolicy-sign-encrypt-gcm"/>
+    </port>
+  </service>
+  
+  <wsp:Policy wsu:Id="SecurityServiceEncryptThenSignPolicy">
+    <wsp:ExactlyOne>
+       <wsp:All>
+          <sp:AsymmetricBinding>
+             <wsp:Policy>
+                <sp:InitiatorToken>
+                   <wsp:Policy>
+                      <sp:X509Token
+                         sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+                         <wsp:Policy>
+                            <sp:WssX509V1Token11/>
+                         </wsp:Policy>
+                      </sp:X509Token>
+                   </wsp:Policy>
+                </sp:InitiatorToken>
+                <sp:RecipientToken>
+                   <wsp:Policy>
+                      <sp:X509Token
+                         sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+                         <wsp:Policy>
+                            <sp:WssX509V1Token11/>
+                         </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-cxf:Basic192GCM xmlns:sp-cxf="http://cxf.apache.org/custom/security-policy"/>
+                   </wsp:Policy>
+                </sp:AlgorithmSuite>
+             </wsp:Policy>
+          </sp:AsymmetricBinding>
+          <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+            <sp:Body/>
+          </sp:SignedParts>
+          <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+            <sp:Body/>
+          </sp:EncryptedParts>
+          <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+            <wsp:Policy>
+              <sp:MustSupportRefIssuerSerial/>
+            </wsp:Policy>
+          </sp:Wss10>
+       </wsp:All>
+    </wsp:ExactlyOne>
+  </wsp:Policy>
+  
+</definitions>

Modified: stack/cxf/branches/jbossws-cxf-3.1.2/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/pom.xml	2012-03-23 09:48:55 UTC (rev 16011)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/pom.xml	2012-03-23 10:01:47 UTC (rev 16012)
@@ -75,7 +75,8 @@
     <log4j.version>1.2.14</log4j.version>
     <saaj.api.version>1.3</saaj.api.version>
     <velocity.version>1.5</velocity.version>
-    <xmlsec.version>1.4.3</xmlsec.version>
+    <xmlsec.version>1.5.1</xmlsec.version>
+    <wss4j.version>1.5.12-patch-01-SNAPSHOT</wss4j.version>
     <wstx.version>3.2.9</wstx.version>
   </properties>
 
@@ -436,11 +437,22 @@
         <version>${cxf.stax.version}</version>
       </dependency>
       <dependency>
-        <groupId>org.apache</groupId>
+        <groupId>org.apache.santuario</groupId>
         <artifactId>xmlsec</artifactId>
         <version>${xmlsec.version}</version>
       </dependency>
       <dependency>
+        <groupId>org.apache.ws.security</groupId>
+        <artifactId>wss4j</artifactId>
+        <version>${wss4j.version}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>org.opensaml</groupId>
+            <artifactId>opensaml</artifactId>
+          </exclusion>
+        </exclusions>
+      </dependency>
+      <dependency>
         <groupId>org.codehaus.woodstox</groupId>
         <artifactId>wstx</artifactId>
         <version>${wstx.version}</version>
@@ -611,6 +623,7 @@
       </plugin>
       <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
+        <version>2.2-beta-2</version>
         <configuration>
           <finalName>deploy-artifacts</finalName>
           <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>

Modified: stack/cxf/branches/jbossws-cxf-3.1.2/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/src/main/scripts/assembly-deploy-artifacts.xml	2012-03-23 09:48:55 UTC (rev 16011)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/src/main/scripts/assembly-deploy-artifacts.xml	2012-03-23 10:01:47 UTC (rev 16012)
@@ -45,7 +45,7 @@
               <include>commons-collections:commons-collections:jar</include>
               <include>commons-lang:commons-lang:jar</include>
               <include>sun-fi:FastInfoset:jar</include>
-              <include>org.apache:xmlsec:jar</include>
+              <include>org.apache.santuario:xmlsec:jar</include>
               <include>wsdl4j:wsdl4j:jar</include>
               <include>org.codehaus.woodstox:wstx:jar</include>
             </includes>



More information about the jbossws-commits mailing list