[jbossws-commits] JBossWS SVN: r4919 - in stack/native/branches/asoldano/trunk: src/test/java/org/jboss/test/ws/interop/nov2007/wsse and 4 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Mon Oct 29 10:38:43 EDT 2007


Author: alessio.soldano at jboss.com
Date: 2007-10-29 10:38:43 -0400 (Mon, 29 Oct 2007)
New Revision: 4919

Added:
   stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/Encrypt3DESTestCase.java
   stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/Encrypt3DESTestService.java
   stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/
   stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/META-INF/
   stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/META-INF/jboss-wsse-client.xml
   stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/META-INF/scenarios.xml
   stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/
   stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/jboss-web.xml
   stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/jboss-wsse-server.xml
   stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/web.xml
Modified:
   stack/native/branches/asoldano/trunk/ant-import-tests/build-jars-jaxws.xml
Log:
WCF interoperability tests, wsse scenario 3.4


Modified: stack/native/branches/asoldano/trunk/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/asoldano/trunk/ant-import-tests/build-jars-jaxws.xml	2007-10-29 14:15:56 UTC (rev 4918)
+++ stack/native/branches/asoldano/trunk/ant-import-tests/build-jars-jaxws.xml	2007-10-29 14:38:43 UTC (rev 4919)
@@ -823,6 +823,36 @@
 		</jar>
 		
 		
+		<!-- jbossws-interop-nov2007-wsseEncrypt3DES.war -->
+		<war warfile="${tests.output.dir}/libs/jbossws-interop-nov2007-wsseEncrypt3DES.war"
+			  webxml="${tests.output.dir}/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/web.xml">
+			<classes dir="${tests.output.dir}/classes">
+				<include name="org/jboss/test/ws/interop/nov2007/wsse/**/*.class"/>
+				<include name="org/jboss/test/ws/interop/*.class"/>
+			</classes>
+
+			<webinf dir="${tests.output.dir}/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF">
+				<include name="jboss-wsse-server.xml"/>
+				<include name="jboss-web.xml"/>
+			</webinf>
+			<webinf dir="${tests.output.dir}/resources/interop/nov2007/wsse/shared/WEB-INF">
+				<include name="wsdl/**.*"/>
+			</webinf>
+			<webinf dir="${tests.output.dir}/resources/interop/nov2007/wsse/shared/META-INF">
+				<include name="bob-sign_enc.jks"/>
+				<include name="wsse10.truststore"/>
+			</webinf>
+
+			<fileset dir="${tests.output.dir}/resources/interop/nov2007/wsse/">
+				<include name="*.*"/>
+			</fileset>
+		</war>
+	    <!-- jbossws-interop-nov2007-wsseEncrypt3DES.jar -->
+		<jar destfile="${tests.output.dir}/libs/jbossws-interop-nov2007-wsseEncrypt3DES-client.jar">
+			<metainf dir="${tests.output.dir}/resources/interop/nov2007/wsse/encrypt3DES/META-INF"/>
+		</jar>
+		
+		
 		<!-- jbossws-interop-nov2007-wsseSign.war -->
 		<war warfile="${tests.output.dir}/libs/jbossws-interop-nov2007-wsseSign.war"
 			  webxml="${tests.output.dir}/resources/interop/nov2007/wsse/sign/WEB-INF/web.xml">

Added: stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/Encrypt3DESTestCase.java
===================================================================
--- stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/Encrypt3DESTestCase.java	                        (rev 0)
+++ stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/Encrypt3DESTestCase.java	2007-10-29 14:38:43 UTC (rev 4919)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.interop.nov2007.wsse;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.Test;
+
+import org.jboss.ws.core.StubExt;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * WCF Interoperability Plug-fest - November 2007
+ * 
+ * Scenario 3.4: X509 Mutual Authentication, Sign Then Encrypt, RSA1.5+TripleDes
+ * 
+ * Client and Server are authenticated and messages integrity and confidentiality are provided by using
+ * Asymmetric Binding from Security Policy with server X509 certificate used as Recipient Token and
+ * client X509 certificate used as Initiator Token. SignedParts and EncryptedParts assertions are
+ * present in the corresponding policy, indicating that the Body of the message must be signed and
+ * encrypted. Protection Order property of the binding is set to SignBeforeEncrypt.
+ * 
+ * SOAP Version:        1.1
+ * Addressing:          No
+ * Client Certificate:  Alice
+ * Server Certificate:  Bob
+ * Timestamp:           Yes
+ * Protection Order:    Sign then Encrypt
+ * Signed parts:        Timestamp, Body
+ * Encrypted parts:     Body
+ * Key Wrap:            RSA-1_5
+ * Encryption:          3DES
+ * Canonicalization:    XML-EXC-C14N
+ * Signature:           SHA1
+ * 
+ * 
+ * @author Alessio Soldano <alessio.soldano at jboss.com>
+ * 
+ * @version $Id$
+ * @since 29-Oct-2007
+ */
+public class Encrypt3DESTestCase extends AbstractWSSEBase
+{
+
+   public static Test suite()
+   {
+      addClientConfToClasspath("jbossws-interop-nov2007-wsseEncrypt3DES-client.jar");
+      return new JBossWSTestSetup(Encrypt3DESTestCase.class, "jbossws-interop-nov2007-wsseEncrypt3DES.war");
+   }
+
+   public void testScenario() throws Exception
+   {
+      String text = "Hello!";
+      String result = port.ping(text);
+      assertNotNull(result);
+      assertEquals(text, result);
+   }
+
+   @Override
+   protected void scenarioSetup(IPingService port)
+   {
+      ((StubExt)port).setConfigName("Standard WSSecurity Client");
+      
+      System.setProperty("org.jboss.ws.wsse.keyStore", "resources/interop/nov2007/wsse/shared/META-INF/alice-sign_enc.jks");
+      System.setProperty("org.jboss.ws.wsse.trustStore", "resources/interop/nov2007/wsse/shared/META-INF/wsse10.truststore");
+      System.setProperty("org.jboss.ws.wsse.keyStorePassword", "password");
+      System.setProperty("org.jboss.ws.wsse.trustStorePassword", "password");
+      System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");
+      System.setProperty("org.jboss.ws.wsse.trustStoreType", "jks");
+   }
+
+   @Override
+   protected QName getScenarioPortQName()
+   {
+      return new QName("http://tempuri.org/", "MutualCertificate10SignEncryptRsa15TripleDes_IPingService_port");
+   }
+
+}


Property changes on: stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/Encrypt3DESTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/Encrypt3DESTestService.java
===================================================================
--- stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/Encrypt3DESTestService.java	                        (rev 0)
+++ stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/Encrypt3DESTestService.java	2007-10-29 14:38:43 UTC (rev 4919)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.interop.nov2007.wsse;
+
+import javax.jws.WebService;
+
+import org.jboss.ws.annotation.EndpointConfig;
+
+
+/**
+ * WCF Interoperability Plug-fest - November 2007
+ * 
+ * IPingService test implementation
+ * 
+ * @author Alessio Soldano <alessio.soldano at jboss.com>
+ * 
+ * @version $Id$
+ * @since 29-Oct-2007
+ */
+ at WebService(
+      wsdlLocation = "WEB-INF/wsdl/WSSecurty10.wsdl", 
+      serviceName = "PingService10",
+      name = "IPingService",
+      targetNamespace = "http://tempuri.org/",
+      endpointInterface = "org.jboss.test.ws.interop.nov2007.wsse.IPingService",
+      portName = "MutualCertificate10SignEncryptRsa15TripleDes_IPingService_port")
+ at EndpointConfig(configName = "Standard WSSecurity Endpoint")
+public class Encrypt3DESTestService implements IPingService
+{
+
+   public String ping(String ping)
+   {
+      System.out.println("ping: "+ping);
+      return ping;
+   }
+   
+}


Property changes on: stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/Encrypt3DESTestService.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/META-INF/jboss-wsse-client.xml
===================================================================
--- stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/META-INF/jboss-wsse-client.xml	                        (rev 0)
+++ stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/META-INF/jboss-wsse-client.xml	2007-10-29 14:38:43 UTC (rev 4919)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+  <config>
+  	<timestamp ttl="300"/>
+  	<sign type="x509v3" alias="1" includeTimestamp="true"/>
+    <encrypt type="x509v3" alias="bob" algorithm="tripledes"/>
+    <requires>
+      <signature/>
+      <encryption/>
+    </requires>
+  </config>
+</jboss-ws-security>
\ No newline at end of file


Property changes on: stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/META-INF/jboss-wsse-client.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/META-INF/scenarios.xml
===================================================================
--- stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/META-INF/scenarios.xml	                        (rev 0)
+++ stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/META-INF/scenarios.xml	2007-10-29 14:38:43 UTC (rev 4919)
@@ -0,0 +1,8 @@
+<client-scenarios>
+   <scenario name="default" description="Testing local endpoint">
+      <target-endpoint>http://localhost:8080/nov2007/wsseEncrypt3DES/endpoint</target-endpoint>
+   </scenario>
+   <scenario name="default-munich" description="Testing Munich endpoint">
+      <target-endpoint>http://jbossws.demo.jboss.com:8080/nov2007/wsseEncrypt3DES/endpoint</target-endpoint>      
+   </scenario>
+</client-scenarios>


Property changes on: stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/META-INF/scenarios.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/jboss-web.xml
===================================================================
--- stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/jboss-web.xml	                        (rev 0)
+++ stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/jboss-web.xml	2007-10-29 14:38:43 UTC (rev 4919)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+   <context-root>/nov2007/wsseEncrypt3DES</context-root>   
+</jboss-web>
\ No newline at end of file


Property changes on: stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/jboss-wsse-server.xml
===================================================================
--- stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/jboss-wsse-server.xml	                        (rev 0)
+++ stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/jboss-wsse-server.xml	2007-10-29 14:38:43 UTC (rev 4919)
@@ -0,0 +1,21 @@
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config"
+                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                   xsi:schemaLocation="http://www.jboss.com/ws-security/config
+                   http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+	<key-store-file>WEB-INF/bob-sign_enc.jks</key-store-file>
+    <key-store-password>password</key-store-password>
+    <key-store-type>jks</key-store-type>
+    <trust-store-file>WEB-INF/wsse10.truststore</trust-store-file>
+    <trust-store-password>password</trust-store-password>
+
+	<config>
+		<timestamp ttl="300"/>
+		<sign type="x509v3" alias="1" includeTimestamp="true"/>
+		<encrypt type="x509v3" alias="alice" algorithm="tripledes"/>
+      	<requires>
+        	<signature/>
+        	<encryption/>      
+      	</requires>
+   	</config>
+   	
+</jboss-ws-security>


Property changes on: stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/jboss-wsse-server.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/web.xml
===================================================================
--- stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/web.xml	                        (rev 0)
+++ stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/web.xml	2007-10-29 14:38:43 UTC (rev 4919)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+   <display-name>wsseEncrypt3DESService App</display-name>
+   
+   <servlet>
+      <servlet-name>Encrypt3DESEndpoint</servlet-name>
+      <servlet-class>org.jboss.test.ws.interop.nov2007.wsse.Encrypt3DESTestService</servlet-class>
+      <load-on-startup>0</load-on-startup>
+   </servlet>
+   <servlet-mapping>
+      <servlet-name>Encrypt3DESEndpoint</servlet-name>
+      <url-pattern>/endpoint</url-pattern>
+   </servlet-mapping>
+
+</web-app>
\ No newline at end of file


Property changes on: stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/encrypt3DES/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jbossws-commits mailing list