Author: alessio.soldano(a)jboss.com
Date: 2012-07-18 10:33:20 -0400 (Wed, 18 Jul 2012)
New Revision: 16486
Added:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/test.keystore
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/test.truststore
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/test.keystore
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/test.truststore
Removed:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/username/truststore_abc
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernameTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernameOverTransportTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test/JBossWSCXFTestSetup.java
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3446] set client sysprops, add and copy keystores, update testcases
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/test.keystore
===================================================================
(Binary files differ)
Property changes on:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/test.keystore
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/test.truststore
===================================================================
(Binary files differ)
Property changes on:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/test.truststore
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernameTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernameTestCase.java 2012-07-18
14:29:30 UTC (rev 16485)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernameTestCase.java 2012-07-18
14:33:20 UTC (rev 16486)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * 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.
*
@@ -22,6 +22,8 @@
package org.jboss.test.ws.jaxws.samples.wssePolicy;
import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
@@ -32,6 +34,7 @@
import org.apache.cxf.ws.security.SecurityConstants;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
/**
* WS-Security Policy username test case
@@ -45,10 +48,20 @@
public static Test suite()
{
- System.setProperty("javax.net.ssl.trustStore",
"/dati/truststore_abc");
+ /** System properties - currently set at testsuite start time
+ System.setProperty("javax.net.ssl.trustStore",
"my.truststore");
System.setProperty("javax.net.ssl.trustStorePassword",
"changeit");
System.setProperty("javax.net.ssl.trustStoreType", "jks");
- return new JBossWSCXFTestSetup(UsernameTestCase.class,
"jaxws-samples-wssePolicy-username.war");
+ System.setProperty("org.jboss.security.ignoreHttpsHost",
"true");
+ */
+ JBossWSTestSetup setup = new JBossWSCXFTestSetup(UsernameTestCase.class,
"jaxws-samples-wssePolicy-username.war");
+ Map<String, String> sslOptions = new HashMap<String, String>();
+ sslOptions.put("certificate-key-file",
System.getProperty("org.jboss.ws.testsuite.server.keystore"));
+ sslOptions.put("password", "changeit");
+ sslOptions.put("verify-client", "false");
+ sslOptions.put("key-alias", "tomcat");
+ setup.setHttpsConnectorRequirement(sslOptions);
+ return setup;
}
public void test() throws Exception
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/test.keystore
===================================================================
(Binary files differ)
Property changes on:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/test.keystore
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/test.truststore
===================================================================
(Binary files differ)
Property changes on:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/test.truststore
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernameOverTransportTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernameOverTransportTestCase.java 2012-07-18
14:29:30 UTC (rev 16485)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/UsernameOverTransportTestCase.java 2012-07-18
14:33:20 UTC (rev 16486)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * 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.
*
@@ -22,6 +22,8 @@
package org.jboss.test.ws.jaxws.samples.wsse.policy.basic;
import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
@@ -32,6 +34,7 @@
import org.apache.cxf.ws.security.SecurityConstants;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
/**
* WS-Security Policy username test case (using secure transport)
@@ -45,12 +48,22 @@
public static Test suite()
{
- System.setProperty("javax.net.ssl.trustStore",
"/dati/truststore_abc");
+ /** System properties - currently set at testsuite start time
+ System.setProperty("javax.net.ssl.trustStore",
"my.truststore");
System.setProperty("javax.net.ssl.trustStorePassword",
"changeit");
System.setProperty("javax.net.ssl.trustStoreType", "jks");
- return new JBossWSCXFTestSetup(UsernameOverTransportTestCase.class,
"jaxws-samples-wsse-policy-username.war");
+ System.setProperty("org.jboss.security.ignoreHttpsHost",
"true");
+ */
+ JBossWSTestSetup setup = new
JBossWSCXFTestSetup(UsernameOverTransportTestCase.class,
"jaxws-samples-wsse-policy-username.war");
+ Map<String, String> sslOptions = new HashMap<String, String>();
+ sslOptions.put("certificate-key-file",
System.getProperty("org.jboss.ws.testsuite.server.keystore"));
+ sslOptions.put("password", "changeit");
+ sslOptions.put("verify-client", "false");
+ sslOptions.put("key-alias", "tomcat");
+ setup.setHttpsConnectorRequirement(sslOptions);
+ return setup;
}
-
+
public void test() throws Exception
{
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
"SecurityService");
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test/JBossWSCXFTestSetup.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test/JBossWSCXFTestSetup.java 2012-07-18
14:29:30 UTC (rev 16485)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test/JBossWSCXFTestSetup.java 2012-07-18
14:33:20 UTC (rev 16486)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * 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.
*
@@ -28,6 +28,10 @@
import org.jboss.logging.Logger;
import org.jboss.wsf.test.JBossWSTestSetup;
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
public class JBossWSCXFTestSetup extends JBossWSTestSetup
{
private Bus defaultBus;
@@ -51,6 +55,11 @@
{
super(test, archiveList, requiresDefaultSecurityDomain);
}
+
+ public JBossWSCXFTestSetup(Class<?> testClass, String archiveList, boolean
requiresDefaultSecurityDomain, CleanupOperation cleanupOp)
+ {
+ super(testClass, archiveList, requiresDefaultSecurityDomain, cleanupOp);
+ }
public JBossWSCXFTestSetup(Test test)
{
Deleted:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/username/truststore_abc
===================================================================
(Binary files differ)
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2012-07-18 14:29:30 UTC (rev 16485)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2012-07-18 14:33:20 UTC (rev 16486)
@@ -129,7 +129,19 @@
<testResource>
<directory>src/test/etc</directory>
<filtering>true</filtering>
+ <excludes>
+ <exclude>*.keystore</exclude>
+ <exclude>*.truststore</exclude>
+ </excludes>
</testResource>
+ <testResource>
+ <directory>src/test/etc</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>*.keystore</include>
+ <include>*.truststore</include>
+ </includes>
+ </testResource>
<!-- copy handler definitions -->
<testResource>
<targetPath>../test-classes</targetPath>
@@ -266,6 +278,22 @@
<value>org.jboss.net.protocol|org.jboss.vfs.protocol|org.jboss.virtual.protocol</value>
</property>
<property>
+ <name>javax.net.ssl.trustStore</name>
+
<value>${project.build.directory}/test-classes/test.truststore</value>
+ </property>
+ <property>
+ <name>javax.net.ssl.trustStorePassword</name>
+ <value>changeit</value>
+ </property>
+ <property>
+ <name>javax.net.ssl.trustStoreType</name>
+ <value>jks</value>
+ </property>
+ <property>
+ <name>org.jboss.security.ignoreHttpsHost</name>
+ <value>true</value>
+ </property>
+ <property>
<name>jboss.home</name>
<value>${jboss.home}</value>
</property>
@@ -294,6 +322,10 @@
<value>${project.build.directory}/test-classes/jbossws-roles.properties</value>
</property>
<property>
+ <name>org.jboss.ws.testsuite.server.keystore</name>
+
<value>${project.build.directory}/test-classes/test.keystore</value>
+ </property>
+ <property>
<name>org.jboss.ws.wsse.keyStore</name>
<value>${test.resources.directory}/jaxws/samples/wssecurity/wsse.keystore</value>
</property>
@@ -370,6 +402,22 @@
<value>org.jboss.net.protocol|org.jboss.vfs.protocol|org.jboss.virtual.protocol</value>
</property>
<property>
+ <name>javax.net.ssl.trustStore</name>
+
<value>${project.build.directory}/test-classes/test.truststore</value>
+ </property>
+ <property>
+ <name>javax.net.ssl.trustStorePassword</name>
+ <value>changeit</value>
+ </property>
+ <property>
+ <name>javax.net.ssl.trustStoreType</name>
+ <value>jks</value>
+ </property>
+ <property>
+ <name>org.jboss.security.ignoreHttpsHost</name>
+ <value>true</value>
+ </property>
+ <property>
<name>jboss.home</name>
<value>${jboss.home}</value>
</property>
@@ -398,6 +446,10 @@
<value>${project.build.directory}/test-classes/jbossws-roles.properties</value>
</property>
<property>
+ <name>org.jboss.ws.testsuite.server.keystore</name>
+
<value>${project.build.directory}/test-classes/test.keystore</value>
+ </property>
+ <property>
<name>org.jboss.ws.wsse.keyStore</name>
<value>${test.resources.directory}/jaxws/samples/wssecurity/wsse.keystore</value>
</property>