[jboss-svn-commits] JBossWS SVN: r779 - in branches/jbossws-1.0/src/test: ant java/org/jboss/test/ws/samples/wssecurity java/org/jboss/test/ws/wsse resources/samples/wssecurity resources/samples/wssecurity/store-pass-encrypt resources/samples/wssecurity/store-pass-encrypt/META-INF resources/samples/wssecurity/store-pass-encrypt/WEB-INF resources/wsse resources/wsse/store-pass-encrypt-class-cmd

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sat Aug 19 02:26:21 EDT 2006


Author: mageshbk
Date: 2006-08-19 02:26:04 -0400 (Sat, 19 Aug 2006)
New Revision: 779

Added:
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/wssecurity/PasswordUtil.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/wssecurity/StorePassEncryptTestCase.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/wsse/PasswordUtil.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/wsse/StorePassEncryptTestCase.java
   branches/jbossws-1.0/src/test/resources/samples/wssecurity/keystore.password
   branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/
   branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/META-INF/
   branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/META-INF/application-client.xml
   branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/META-INF/jboss-client.xml
   branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/META-INF/jboss-wsse-client.xml
   branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/WEB-INF/
   branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/WEB-INF/jboss-web.xml
   branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/WEB-INF/web.xml
   branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/jboss-wsse-server.xml
   branches/jbossws-1.0/src/test/resources/wsse/keystore.password
   branches/jbossws-1.0/src/test/resources/wsse/store-pass-encrypt-class-cmd/
   branches/jbossws-1.0/src/test/resources/wsse/store-pass-encrypt-class-cmd/jboss-wsse-client.xml
   branches/jbossws-1.0/src/test/resources/wsse/store-pass-encrypt-class-cmd/jboss-wsse-server.xml
Modified:
   branches/jbossws-1.0/src/test/ant/build-jars.xml
Log:
Added test case to test updated SecurityStore using {EXT} and {CLASS} methods

Modified: branches/jbossws-1.0/src/test/ant/build-jars.xml
===================================================================
--- branches/jbossws-1.0/src/test/ant/build-jars.xml	2006-08-19 06:06:35 UTC (rev 778)
+++ branches/jbossws-1.0/src/test/ant/build-jars.xml	2006-08-19 06:26:04 UTC (rev 779)
@@ -1736,6 +1736,47 @@
       </metainf>
     </jar>
     
+    <!-- jbossws-samples-store-pass-encrypt.war -->
+    <replace file="${build.test.dir}/resources/samples/wssecurity/store-pass-encrypt/jboss-wsse-server.xml" token="${buildpath}" value="${build.test.dir}"/>
+    <war warfile="${build.test.dir}/libs/jbossws-samples-store-pass-encrypt.war" webxml="${build.test.dir}/resources/samples/wssecurity/store-pass-encrypt/WEB-INF/web.xml">
+      <classes dir="${build.test.dir}/classes">
+        <include name="org/jboss/test/ws/samples/wssecurity/Hello.class"/>
+        <include name="org/jboss/test/ws/samples/wssecurity/HelloJavaBean.class"/>
+        <include name="org/jboss/test/ws/samples/wssecurity/PasswordUtil.class"/>
+        <include name="org/jboss/test/ws/samples/wssecurity/UserType.class"/>
+      </classes>
+      <webinf dir="${build.test.dir}/resources/samples/wssecurity/WEB-INF">
+        <include name="jaxrpc-mapping.xml"/>
+        <include name="webservices.xml"/>
+        <include name="wsdl/**"/>
+      </webinf>
+      <webinf dir="${build.test.dir}/resources/samples/wssecurity/store-pass-encrypt">
+        <include name="jboss-wsse-server.xml"/>
+      </webinf>
+      <webinf dir="${build.test.dir}/resources/samples/wssecurity/store-pass-encrypt/WEB-INF">
+        <include name="jboss-web.xml"/>
+      </webinf>
+      <webinf dir="${build.test.dir}/resources/samples/wssecurity">
+        <include name="wsse.keystore"/>
+        <include name="wsse.truststore"/>
+      </webinf>
+    </war>
+    <jar jarfile="${build.test.dir}/libs/jbossws-samples-store-pass-encrypt-client.jar">
+      <fileset dir="${build.test.dir}/classes">
+        <include name="org/jboss/test/ws/samples/wssecurity/Hello.class"/>
+        <include name="org/jboss/test/ws/samples/wssecurity/UserType.class"/>
+      </fileset>
+      <metainf dir="${build.test.dir}/resources/samples/wssecurity/store-pass-encrypt/META-INF">
+        <include name="application-client.xml"/>
+        <include name="jboss-client.xml"/>
+        <include name="jboss-wsse-client.xml"/>
+      </metainf>
+      <metainf dir="${build.test.dir}/resources/samples/wssecurity/WEB-INF">
+        <include name="wsdl/**"/>
+        <include name="jaxrpc-mapping.xml"/>
+      </metainf>
+    </jar>
+    
     <!-- jbossws-wsse-account-signup.war -->
     <war warfile="${build.test.dir}/libs/jbossws-wsse-account-signup.war" webxml="${build.test.dir}/resources/wsse/account-signup/WEB-INF/web.xml">
       <classes dir="${build.test.dir}/classes">
@@ -1897,6 +1938,49 @@
       </metainf>
     </jar>
     
+    <!-- jbossws-wsse-store-pass-encrypt-class-cmd.war -->
+    <replace file="${build.test.dir}/resources/wsse/store-pass-encrypt-class-cmd/jboss-wsse-server.xml" token="${buildpath}" value="${build.test.dir}"/>
+    <war warfile="${build.test.dir}/libs/jbossws-wsse-store-pass-encrypt-class-cmd.war" webxml="${build.test.dir}/resources/wsse/rpc/WEB-INF/web.xml">
+      <classes dir="${build.test.dir}/classes">
+        <include name="org/jboss/test/ws/wsse/Hello.class"/>
+        <include name="org/jboss/test/ws/wsse/HelloJavaBean.class"/>
+        <include name="org/jboss/test/ws/wsse/PasswordUtil.class"/>
+        <include name="org/jboss/test/ws/wsse/UserType.class"/>
+      </classes>
+      <webinf dir="${build.test.dir}/resources/wsse/rpc/WEB-INF">
+        <include name="jaxrpc-mapping.xml"/>
+        <include name="jboss-web.xml"/>
+        <include name="webservices.xml"/>
+        <include name="wsdl/**"/>
+      </webinf>
+      <webinf dir="${build.test.dir}/resources/wsse/store-pass-encrypt-class-cmd">
+        <include name="jboss-wsse-server.xml"/>
+      </webinf>
+      <webinf dir="${build.test.dir}/resources/wsse">
+        <include name="wsse.keystore"/>
+        <include name="wsse.truststore"/>
+      </webinf>
+    </war>
+    
+    <!-- jboss-wsse-store-pass-encrypt-class-cmd-client.jar -->
+    <jar jarfile="${build.test.dir}/libs/jbossws-wsse-store-pass-encrypt-class-cmd-client.jar">
+      <fileset dir="${build.test.dir}/classes">
+        <include name="org/jboss/test/ws/wsse/Hello.class"/>
+        <include name="org/jboss/test/ws/wsse/UserType.class"/>
+      </fileset>
+      <metainf dir="${build.test.dir}/resources/wsse/rpc/META-INF">
+        <include name="application-client.xml"/>
+        <include name="jboss-client.xml"/>
+      </metainf>
+      <metainf dir="${build.test.dir}/resources/wsse/store-pass-encrypt-class-cmd">
+        <include name="jboss-wsse-client.xml"/>
+      </metainf>
+      <metainf dir="${build.test.dir}/resources/wsse/rpc/WEB-INF">
+        <include name="wsdl/**"/>
+        <include name="jaxrpc-mapping.xml"/>
+      </metainf>
+    </jar>
+    
     <!-- jbossws-wsse-web-client.war -->
     <war warfile="${build.test.dir}/libs/jbossws-wsse-web-client.war" webxml="${build.test.dir}/resources/wsse/webclient/WEB-INF/web.xml">
       <classes dir="${build.test.dir}/classes">

Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/wssecurity/PasswordUtil.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/wssecurity/PasswordUtil.java	2006-08-19 06:06:35 UTC (rev 778)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/wssecurity/PasswordUtil.java	2006-08-19 06:26:04 UTC (rev 779)
@@ -0,0 +1,83 @@
+/*
+  * 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.samples.wssecurity;
+
+import java.io.RandomAccessFile;
+import java.io.ByteArrayOutputStream;
+
+import javax.crypto.spec.PBEParameterSpec;
+import javax.crypto.spec.PBEKeySpec;
+import javax.crypto.Cipher;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.SecretKey;
+
+/**
+ * This is a simple decode utility for using along with the jboss-ws-security keystore and truststore use cases
+ *
+ * @author <a href="mailto:magesh.bojan at jboss.com">Magesh Kumar B</a>
+ * @version $Revision:  $
+ */
+public class PasswordUtil
+{
+   public static void main(String args[])
+   {
+     if( args.length != 1 )
+      {
+         System.err.println(
+            "Read a password file and decode into plain text"
+           +"Usage: PasswordUtil password-file"
+           +"  password-file : the path to the file to write the password to"
+         );
+      }
+      try
+      {
+         System.out.println(decode(args[0]));
+      }
+      catch (Exception e)
+      {
+         e.printStackTrace();
+      }
+   }
+
+   private static char[] decode(String passwordFilePath) throws Exception
+   {
+      RandomAccessFile passwordFile = new RandomAccessFile(passwordFilePath, "rws");
+      byte[] salt = new byte[8];
+      passwordFile.readFully(salt);
+      int count = passwordFile.readInt();
+      ByteArrayOutputStream baos = new ByteArrayOutputStream();
+      int b;
+      while( (b = passwordFile.read()) >= 0 )
+         baos.write(b);
+      passwordFile.close();
+      byte[] secret = baos.toByteArray();
+
+      PBEParameterSpec cipherSpec = new PBEParameterSpec(salt, count);
+      PBEKeySpec keySpec = new PBEKeySpec("78aac249a60a13d5e882927928043ebb".toCharArray());
+      SecretKeyFactory factory = SecretKeyFactory.getInstance("PBEwithMD5andDES");
+      SecretKey cipherKey = factory.generateSecret(keySpec);
+      Cipher cipher = Cipher.getInstance("PBEwithMD5andDES");
+      cipher.init(Cipher.DECRYPT_MODE, cipherKey, cipherSpec);
+      byte[] decode = cipher.doFinal(secret);
+      return new String(decode, "UTF-8").toCharArray();
+   }
+}

Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/wssecurity/StorePassEncryptTestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/wssecurity/StorePassEncryptTestCase.java	2006-08-19 06:06:35 UTC (rev 778)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/samples/wssecurity/StorePassEncryptTestCase.java	2006-08-19 06:26:04 UTC (rev 779)
@@ -0,0 +1,112 @@
+/*
+  * 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.samples.wssecurity;
+
+import java.io.File;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.List;
+
+import javax.naming.InitialContext;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.Stub;
+import javax.xml.rpc.handler.HandlerInfo;
+import javax.xml.rpc.handler.HandlerRegistry;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.jaxrpc.ServiceImpl;
+import org.jboss.ws.wsse.WSSecurityHandlerOutbound;
+
+/**
+ * This test simulates simulates the usage of a jboss-ws-security keystore and truststore use cases
+ *
+ * @author <a href="mailto:magesh.bojan at jboss.com">Magesh Kumar B</a>
+ * @version $Revision:  $
+ */
+public class StorePassEncryptTestCase extends JBossWSTest
+{
+   /** Construct the test case with a given name
+    */
+
+   /** Deploy the test */
+   public static Test suite() throws Exception
+   {
+      return JBossWSTestSetup.newTestSetup(StorePassEncryptTestCase.class, "jbossws-samples-store-pass-encrypt.war, jbossws-samples-store-pass-encrypt-client.jar");
+   }
+
+   /**
+    * Test JSE endpoint
+    */
+   public void testEndpoint() throws Exception
+   {
+      Hello hello = getPort();
+
+      UserType in0 = new UserType("Kermit");
+      UserType retObj = hello.echoUserType(in0);
+      assertEquals(in0, retObj);
+   }
+
+   private Hello getPort() throws Exception
+   {
+      if (isTargetServerJBoss())
+      {
+         InitialContext iniCtx = getInitialContext();
+         Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloService");
+         Hello port = (Hello)service.getPort(Hello.class);
+         return port;
+      }
+      else
+      {
+         try
+         {
+            ServiceFactoryImpl factory = new ServiceFactoryImpl();
+            URL wsdlURL = new File("resources/samples/wssecurity/WEB-INF/wsdl/HelloService.wsdl").toURL();
+            URL mappingURL = new File("resources/samples/wssecurity/WEB-INF/jaxrpc-mapping.xml").toURL();
+            URL securityURL = new File("resources/samples/wssecurity/store-pass-encrypt/META-INF/jboss-wsse-client.xml").toURL();
+
+            QName serviceName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloService");
+            QName portName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloPort");
+            ServiceImpl service = (ServiceImpl)factory.createService(wsdlURL, serviceName, mappingURL, securityURL);
+
+            HandlerRegistry registry = service.getDynamicHandlerRegistry();
+            List infos = registry.getHandlerChain(portName);
+            infos.add(new HandlerInfo(WSSecurityHandlerOutbound.class, new HashMap(), new QName[]{}));
+            registry.setHandlerChain(portName, infos);
+
+            Hello port = (Hello)service.getPort(Hello.class);
+            ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/jbossws-samples-store-pass-encrypt");
+            return port;
+         }
+         catch (Exception e)
+         {
+            System.out.println("Exception is : " + e);
+            e.printStackTrace();
+            throw e;
+         }
+      }
+   }
+}

Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/wsse/PasswordUtil.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/wsse/PasswordUtil.java	2006-08-19 06:06:35 UTC (rev 778)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/wsse/PasswordUtil.java	2006-08-19 06:26:04 UTC (rev 779)
@@ -0,0 +1,83 @@
+/*
+  * 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.wsse;
+
+import java.io.RandomAccessFile;
+import java.io.ByteArrayOutputStream;
+
+import javax.crypto.spec.PBEParameterSpec;
+import javax.crypto.spec.PBEKeySpec;
+import javax.crypto.Cipher;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.SecretKey;
+
+/**
+ * This is a simple decode utility for using along with the jboss-ws-security keystore and truststore use cases
+ *
+ * @author <a href="mailto:magesh.bojan at jboss.com">Magesh Kumar B</a>
+ * @version $Revision:  $
+ */
+public class PasswordUtil
+{
+   public static void main(String args[])
+   {
+     if( args.length != 1 )
+      {
+         System.err.println(
+            "Read a password in plain text form from a password file"
+           +"Usage: PasswordUtil password-file"
+           +"  password-file : the path to the file to write the password to"
+         );
+      }
+      try
+      {
+         System.out.println(decode(args[0]));
+      }
+      catch (Exception e)
+      {
+         e.printStackTrace();
+      }
+   }
+
+   private static char[] decode(String passwordFilePath) throws Exception
+   {
+      RandomAccessFile passwordFile = new RandomAccessFile(passwordFilePath, "rws");
+      byte[] salt = new byte[8];
+      passwordFile.readFully(salt);
+      int count = passwordFile.readInt();
+      ByteArrayOutputStream baos = new ByteArrayOutputStream();
+      int b;
+      while( (b = passwordFile.read()) >= 0 )
+         baos.write(b);
+      passwordFile.close();
+      byte[] secret = baos.toByteArray();
+
+      PBEParameterSpec cipherSpec = new PBEParameterSpec(salt, count);
+      PBEKeySpec keySpec = new PBEKeySpec("78aac249a60a13d5e882927928043ebb".toCharArray());
+      SecretKeyFactory factory = SecretKeyFactory.getInstance("PBEwithMD5andDES");
+      SecretKey cipherKey = factory.generateSecret(keySpec);
+      Cipher cipher = Cipher.getInstance("PBEwithMD5andDES");
+      cipher.init(Cipher.DECRYPT_MODE, cipherKey, cipherSpec);
+      byte[] decode = cipher.doFinal(secret);
+      return new String(decode, "UTF-8").toCharArray();
+   }
+}

Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/wsse/StorePassEncryptTestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/wsse/StorePassEncryptTestCase.java	2006-08-19 06:06:35 UTC (rev 778)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/wsse/StorePassEncryptTestCase.java	2006-08-19 06:26:04 UTC (rev 779)
@@ -0,0 +1,62 @@
+/*
+  * 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.wsse;
+
+import javax.naming.InitialContext;
+import javax.xml.rpc.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * This test simulates simulates the usage of a jboss-ws-security keystore and truststore use cases
+ *
+ * @author <a href="mailto:magesh.bojan at jboss.com">Magesh Kumar B</a>
+ * @version $Revision:  $
+ */
+public class StorePassEncryptTestCase extends JBossWSTest
+{
+   /** Construct the test case with a given name
+    */
+
+   /** Deploy the test */
+   public static Test suite() throws Exception
+   {
+      return JBossWSTestSetup.newTestSetup(StorePassEncryptTestCase.class, "jbossws-wsse-store-pass-encrypt-class-cmd.war, jbossws-wsse-store-pass-encrypt-class-cmd-client.jar");
+   }
+
+   /**
+    * Test JSE endpoint
+    */
+   public void testEndpoint() throws Exception
+   {
+      InitialContext iniCtx = getInitialContext();
+      Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloService");
+      Hello hello = (Hello)service.getPort(Hello.class);
+
+      UserType in0 = new UserType("Kermit");
+      UserType retObj = hello.echoUserType(in0);
+      assertEquals(in0, retObj);
+   }
+}

Added: branches/jbossws-1.0/src/test/resources/samples/wssecurity/keystore.password
===================================================================
(Binary files differ)


Property changes on: branches/jbossws-1.0/src/test/resources/samples/wssecurity/keystore.password
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/META-INF/application-client.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/META-INF/application-client.xml	2006-08-19 06:06:35 UTC (rev 778)
+++ branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/META-INF/application-client.xml	2006-08-19 06:26:04 UTC (rev 779)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<application-client 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/application-client_1_4.xsd"
+  version="1.4">
+
+  <display-name>HelloService</display-name>
+
+  <service-ref>
+    <service-ref-name>service/HelloService</service-ref-name>
+    <service-interface>javax.xml.rpc.Service</service-interface>
+    <wsdl-file>META-INF/wsdl/HelloService.wsdl</wsdl-file>
+    <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+    <port-component-ref>
+      <service-endpoint-interface>org.jboss.test.ws.samples.wssecurity.Hello</service-endpoint-interface>
+    </port-component-ref>
+  </service-ref>
+
+</application-client>
+

Added: branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/META-INF/jboss-client.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/META-INF/jboss-client.xml	2006-08-19 06:06:35 UTC (rev 778)
+++ branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/META-INF/jboss-client.xml	2006-08-19 06:26:04 UTC (rev 779)
@@ -0,0 +1,16 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!DOCTYPE jboss-client PUBLIC
+   "-//JBoss//DTD Application Client 4.0//EN"
+   "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+
+<jboss-client>
+  <jndi-name>jbossws-client</jndi-name>
+
+  <service-ref>
+    <service-ref-name>service/HelloService</service-ref-name>
+		<config-name>Standard Secure Client</config-name>
+    <wsdl-override>http://@jbosstest.host.name@:8080/jbossws-samples-store-pass-encrypt?wsdl</wsdl-override>
+  </service-ref>
+
+</jboss-client>

Added: branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/META-INF/jboss-wsse-client.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/META-INF/jboss-wsse-client.xml	2006-08-19 06:06:35 UTC (rev 778)
+++ branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/META-INF/jboss-wsse-client.xml	2006-08-19 06:26:04 UTC (rev 779)
@@ -0,0 +1,11 @@
+<?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>
+    <sign type="x509v3" alias="wsse"/>
+    <encrypt type="x509v3" alias="wsse"/>
+    <requires>
+      <signature/>
+      <encryption/> 
+    </requires>
+  </config>
+</jboss-ws-security>

Added: branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/WEB-INF/jboss-web.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/WEB-INF/jboss-web.xml	2006-08-19 06:06:35 UTC (rev 778)
+++ branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/WEB-INF/jboss-web.xml	2006-08-19 06:26:04 UTC (rev 779)
@@ -0,0 +1,14 @@
+<?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>jbossws-samples-store-pass-encrypt</context-root>
+	
+	<webservice-description>
+		<webservice-description-name>HelloService</webservice-description-name>
+		<config-name>Standard Secure Endpoint</config-name>
+	</webservice-description>
+	
+</jboss-web>

Added: branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/WEB-INF/web.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/WEB-INF/web.xml	2006-08-19 06:06:35 UTC (rev 778)
+++ branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/WEB-INF/web.xml	2006-08-19 06:26:04 UTC (rev 779)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app 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"
+  version="2.4">
+
+  <servlet>
+    <servlet-name>HelloService</servlet-name>
+    <servlet-class>org.jboss.test.ws.samples.wssecurity.HelloJavaBean</servlet-class>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>HelloService</servlet-name>
+    <url-pattern>/*</url-pattern>
+  </servlet-mapping>
+</web-app>
+

Added: branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/jboss-wsse-server.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/jboss-wsse-server.xml	2006-08-19 06:06:35 UTC (rev 778)
+++ branches/jbossws-1.0/src/test/resources/samples/wssecurity/store-pass-encrypt/jboss-wsse-server.xml	2006-08-19 06:26:04 UTC (rev 779)
@@ -0,0 +1,17 @@
+<?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">
+  <key-store-file>WEB-INF/wsse.keystore</key-store-file>
+  <!--Note ${buildpath} will be replaced with the actual build directory path -->
+  <key-store-password>{EXT}java -cp ${buildpath}/classes org.jboss.test.ws.wsse.PasswordUtil ${buildpath}/resources/wsse/keystore.password</key-store-password>
+  <trust-store-file>WEB-INF/wsse.truststore</trust-store-file>
+  <!--Note ${buildpath} will be replaced with the actual build directory path -->
+  <trust-store-password>{CLASS}org.jboss.security.plugins.FilePassword:${buildpath}/resources/wsse/keystore.password</trust-store-password>
+  <config>
+    <sign type="x509v3" alias="wsse"/>
+    <encrypt type="x509v3" alias="wsse"/>
+    <requires>
+      <signature/>
+      <encryption/>
+    </requires>
+  </config>
+</jboss-ws-security>

Added: branches/jbossws-1.0/src/test/resources/wsse/keystore.password
===================================================================
(Binary files differ)


Property changes on: branches/jbossws-1.0/src/test/resources/wsse/keystore.password
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/jbossws-1.0/src/test/resources/wsse/store-pass-encrypt-class-cmd/jboss-wsse-client.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/wsse/store-pass-encrypt-class-cmd/jboss-wsse-client.xml	2006-08-19 06:06:35 UTC (rev 778)
+++ branches/jbossws-1.0/src/test/resources/wsse/store-pass-encrypt-class-cmd/jboss-wsse-client.xml	2006-08-19 06:26:04 UTC (rev 779)
@@ -0,0 +1,11 @@
+<?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>
+    <sign type="x509v3" alias="wsse"/>
+    <encrypt type="x509v3" alias="wsse"/>
+    <requires>
+      <signature/>
+      <encryption/> 
+    </requires>
+  </config>
+</jboss-ws-security>

Added: branches/jbossws-1.0/src/test/resources/wsse/store-pass-encrypt-class-cmd/jboss-wsse-server.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/wsse/store-pass-encrypt-class-cmd/jboss-wsse-server.xml	2006-08-19 06:06:35 UTC (rev 778)
+++ branches/jbossws-1.0/src/test/resources/wsse/store-pass-encrypt-class-cmd/jboss-wsse-server.xml	2006-08-19 06:26:04 UTC (rev 779)
@@ -0,0 +1,17 @@
+<?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">
+  <key-store-file>WEB-INF/wsse.keystore</key-store-file>
+  <!--Note ${buildpath} will be replaced with the actual build directory path -->
+  <key-store-password>{EXT}java -cp ${buildpath}/classes org.jboss.test.ws.wsse.PasswordUtil ${buildpath}/resources/wsse/keystore.password</key-store-password>
+  <trust-store-file>WEB-INF/wsse.truststore</trust-store-file>
+  <!--Note ${buildpath} will be replaced with the actual build directory path -->
+  <trust-store-password>{CLASS}org.jboss.security.plugins.FilePassword:${buildpath}/resources/wsse/keystore.password</trust-store-password>
+  <config>
+    <sign type="x509v3" alias="wsse"/>
+    <encrypt type="x509v3" alias="wsse"/>
+    <requires>
+      <signature/>
+      <encryption/>
+    </requires>
+  </config>
+</jboss-ws-security>




More information about the jboss-svn-commits mailing list