summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/itest/ws
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-02-26 13:44:40 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-02-26 13:44:40 +0000
commita968a1ff5448680cb24918e6fa31db6158cf9944 (patch)
tree2681333b61338d25005af2240fef80498769816f /sca-java-2.x/trunk/itest/ws
parentb94f0eefa25f47579547e39de6a283d05a035af3 (diff)
Create a new key store and enable the test. Using a ws binding without an explicit HTTPS url doesn't work at the moment. The providers need to do more work based on the the security configuration.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@916679 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/itest/ws')
-rw-r--r--sca-java-2.x/trunk/itest/ws/http-ssl/README68
-rw-r--r--sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml4
-rw-r--r--sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite4
-rw-r--r--sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.jksbin0 -> 1378 bytes
-rw-r--r--sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.keyStorebin1265 -> 0 bytes
-rw-r--r--sca-java-2.x/trunk/itest/ws/pom.xml2
6 files changed, 73 insertions, 5 deletions
diff --git a/sca-java-2.x/trunk/itest/ws/http-ssl/README b/sca-java-2.x/trunk/itest/ws/http-ssl/README
new file mode 100644
index 0000000000..41dcb8680b
--- /dev/null
+++ b/sca-java-2.x/trunk/itest/ws/http-ssl/README
@@ -0,0 +1,68 @@
+The module tests web service communications running over HTTPS. HTTPS is configured
+in this embedded test environment by adding the confidentiality intent to both
+reference and service and by configuring reference and service side policy sets
+to configure the web service binding appropriately to enable SSL.
+
+When running the web service binding in a container that itself is configured
+to provide SSL support these policy sets are not required. TODO can they themselves
+detect that they are not required.
+
+The SSL configuration depends on public/private key pairs and a keystore. This is how
+they are organized and generated
+
+
+Generate Private/Public keys into a keystore for use at the server
+------------------------------------------------------------------
+
+keytool -genkey -keyalg RSA -sigalg MD5withRSA -keysize 1024 -alias TuscanyUser -dname "CN=Tuscany Service, OU=Tuscany, O=Apache, L=Hursley, S=Hampshire, C=UK" -storetype JKS -keystore tuscany.jks -validity 9999 -keypass tuscany -storepass tuscany
+
+View the contents of the key store that result
+----------------------------------------------
+
+keytool -list -v -keystore tuscany.jks -storepass tuscany
+
+Keystore type: JKS
+Keystore provider: SUN
+
+Your keystore contains 1 entry
+
+Alias name: tuscanyuser
+Creation date: 26-Feb-2010
+Entry type: PrivateKeyEntry
+Certificate chain length: 1
+Certificate[1]:
+Owner: CN=Tuscany Service, OU=Tuscany, O=Apache, L=Hursley, ST=Hampshire, C=UK
+Issuer: CN=Tuscany Service, OU=Tuscany, O=Apache, L=Hursley, ST=Hampshire, C=UK
+Serial number: 4b87b4d7
+Valid from: Fri Feb 26 11:47:35 GMT 2010 until: Mon Jul 13 12:47:35 BST 2037
+Certificate fingerprints:
+ MD5: C3:0C:D6:DF:F6:27:26:47:AD:41:44:CA:D7:98:FA:41
+ SHA1: 2E:82:AD:F6:54:E0:C6:A5:47:5C:8C:9F:3B:5A:65:8E:F9:5A:40:07
+ Signature algorithm name: MD5withRSA
+ Version: 3
+
+
+IN THIS EMBEDDED TEST THE FOLLOWING ARE NOT REQUIRED AS BOTH REFERENCE AND SERVICES
+ARE RUNNING IN THE SAME JVM AND HAVE ACCESS TO THE SERVICE SIDE KEY STORE
+
+Generate the client side certificate
+------------------------------------
+
+keytool -export -alias TuscanyUser -file tuscany.cer -keystore tuscany.jks -storepass tuscany
+
+Print the contents of the generated certificate file
+----------------------------------------------------
+
+keytool -printcert -v -file tuscany.cer
+
+Owner: CN=Tuscany Service, OU=Tuscany, O=Apache, L=Hursley, ST=Hampshire, C=UK
+Issuer: CN=Tuscany Service, OU=Tuscany, O=Apache, L=Hursley, ST=Hampshire, C=UK
+Serial number: 4b87b4d7
+Valid from: Fri Feb 26 11:47:35 GMT 2010 until: Mon Jul 13 12:47:35 BST 2037
+Certificate fingerprints:
+ MD5: C3:0C:D6:DF:F6:27:26:47:AD:41:44:CA:D7:98:FA:41
+ SHA1: 2E:82:AD:F6:54:E0:C6:A5:47:5C:8C:9F:3B:5A:65:8E:F9:5A:40:07
+ Signature algorithm name: MD5withRSA
+ Version: 3
+
+ \ No newline at end of file
diff --git a/sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml b/sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml
index 480c913861..5daeed06f2 100644
--- a/sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml
+++ b/sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml
@@ -27,8 +27,8 @@
provides="confidentiality.transport"
appliesTo="sca:binding.ws">
<tuscany:https>
- <tuscany:keyStore type="JKS" file="target/classes/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.keyStore" password="apache"/>
- <tuscany:trustStore type="JKS" file="target/classes/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.keyStore" password="apache"/>
+ <tuscany:keyStore type="JKS" file="target/classes/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.jks" password="tuscany"/>
+ <tuscany:trustStore type="JKS" file="target/classes/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.jks" password="tuscany"/>
</tuscany:https>
</sca:policySet>
diff --git a/sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite b/sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite
index 5f9a8239d7..47128b8db3 100644
--- a/sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite
+++ b/sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite
@@ -25,14 +25,14 @@
<component name="HelloWorldClient">
<implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldClient"/>
<reference name="helloWorldWS" requires="confidentiality">
- <binding.ws uri="https://localhost:443/HelloWorld" />
+ <binding.ws uri="https://localhost:8443/HelloWorld" />
</reference>
</component>
<component name="HelloWorldService">
<implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldService"/>
<service name="HelloWorld" requires="confidentiality">
- <binding.ws uri="https://localhost:443/HelloWorld" />
+ <binding.ws uri="https://localhost:8443/HelloWorld" />
</service>
</component>
diff --git a/sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.jks b/sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.jks
new file mode 100644
index 0000000000..d67bccdf8b
--- /dev/null
+++ b/sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.jks
Binary files differ
diff --git a/sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.keyStore b/sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.keyStore
deleted file mode 100644
index 7ea23f7ff4..0000000000
--- a/sca-java-2.x/trunk/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.keyStore
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/trunk/itest/ws/pom.xml b/sca-java-2.x/trunk/itest/ws/pom.xml
index 1aadcf4c90..54ef630ce9 100644
--- a/sca-java-2.x/trunk/itest/ws/pom.xml
+++ b/sca-java-2.x/trunk/itest/ws/pom.xml
@@ -32,8 +32,8 @@
<modules>
<module>defaults</module>
<module>authentication-basic</module>
+ <module>http-ssl</module>
<!--
- <module>https</module>
<module>jms</module>
<module>mtom</module>
<module>authentication-wssecurity</module>