Author: svkrish
Date: Tue Nov 27 07:33:18 2007
New Revision: 598673
URL: http://svn.apache.org/viewvc?rev=598673&view=rev
Log:
some simple cleanup
Modified:
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/definitions.xml
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/helloworldwsclient.composite
Modified:
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/definitions.xml
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/definitions.xml?rev=598673&r1=598672&r2=598673&view=diff
==============================================================================
---
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/definitions.xml
(original)
+++
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/definitions.xml
Tue Nov 27 07:33:18 2007
@@ -20,7 +20,8 @@
<sca:definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://www.osoa.org/xmlns/sca/1.0"
xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0">
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+ xmlns:hw="http://helloworld">
<sca:intent name="soap"
constrains="sca:binding.ws">
@@ -50,12 +51,12 @@
</description>
</sca:intent>
- <sca:intent name="wsAuthentication"
+ <sca:intent name="hw:wsAuthentication"
constrains="sca:binding.ws">
<description>
Communitcation thro this binding required
Authentication.
</description>
- </sca:intent>
+ </sca:intent>
<sca:intent name="integrity"
constrains="sca:binding.ws">
@@ -64,6 +65,13 @@
</description>
</sca:intent>
+ <sca:intent name="hw:wsIntegrity"
+ constrains="sca:binding.ws">
+ <description>
+ Protect messages from unauthorized reading or
modification
+ </description>
+ </sca:intent>
+
<sca:intent name="confidentiality"
constrains="sca:binding.ws">
<description>
@@ -73,22 +81,8 @@
</sca:intent>
<!-- WS Security POLICY SETS -->
- <sca:policySet name="wsAuthenticationPolicy"
- provides="authentication"
- appliesTo="sca:binding.ws"
- >
- <tuscany:wsConfigParam>
- <parameter name="InflowSecurity">
- <action>
- <items>UsernameToken</items>
-
<passwordCallbackClass>helloworld.ServerPWCBHandler</passwordCallbackClass>
- </action>
- </parameter>
- </tuscany:wsConfigParam>
- </sca:policySet>
-
<sca:policySet name="wsClientAuthenticationPolicy"
- provides="wsAuthentication"
+ provides="hw:wsAuthentication"
appliesTo="sca:binding.ws">
<tuscany:wsConfigParam>
<parameter name="OutflowSecurity">
@@ -104,7 +98,7 @@
<!-- A policyset that uses WS Policy -->
<sca:policySet name="wsSecurityPolicyForIntegrity"
- provides="integrity"
+ provides="hw:wsIntegrity"
appliesTo="sca:binding.ws">
<wsp:Policy wsu:Id="SignOnly"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
@@ -169,6 +163,95 @@
</ramp:signatureCrypto>
</ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ </sca:policySet>
+
+
+ <!-- Policysets for unit tests that use the testHelloworldws.composite -->
+ <!-- Since we use the helloworld-ws-service for the unit testing we need to
+ declare these policy sets and with the 'provides' set to the intents
that the
+ composite in the helloworld-ws-service uses. -->
+ <sca:policySet name="wsAuthenticationPolicy"
+ provides="authentication"
+ appliesTo="sca:binding.ws"
+ >
+ <tuscany:wsConfigParam>
+ <parameter name="InflowSecurity">
+ <action>
+ <items>UsernameToken</items>
+
<passwordCallbackClass>helloworld.ServerPWCBHandler</passwordCallbackClass>
+ </action>
+ </parameter>
+ </tuscany:wsConfigParam>
+ </sca:policySet>
+
+ <sca:policySet name="wsServerSecurityPolicyForIntegrity"
+ provides="integrity"
+ appliesTo="sca:binding.ws">
+ <wsp:Policy wsu:Id="SignOnly"
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+
<wsp:Policy>
+
<sp:WssX509V3Token10/>
+
</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:WssX509V3Token10/>
+
</wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+
<sp:TripleDesRsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+
<sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+
<sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+
+ <ramp:RampartConfig
xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>TuscanyWsUser</ramp:user>
+
<ramp:encryptionUser>TuscanyWsUser</ramp:encryptionUser>
+
<ramp:passwordCallbackClass>helloworld.ServerPWCBHandler</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto
provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property
name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property
name="org.apache.ws.security.crypto.merlin.file">helloworldKeys.jks</ramp:property>
+ <ramp:property
name="org.apache.ws.security.crypto.merlin.keystore.password">TuscanyWsUserPasswd</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ </ramp:RampartConfig>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
Modified:
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/helloworldwsclient.composite
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/helloworldwsclient.composite?rev=598673&r1=598672&r2=598673&view=diff
==============================================================================
---
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/helloworldwsclient.composite
(original)
+++
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/helloworldwsclient.composite
Tue Nov 27 07:33:18 2007
@@ -27,7 +27,7 @@
-->
<component name="HelloTuscanyServiceComponent">
<implementation.java class="helloworld.HelloWorldServiceComponent"/>
- <reference name="helloWorldService" requires="wsAuthentication">
+ <reference name="helloWorldService" requires="hw:wsAuthentication">
<binding.ws
wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
</reference>
</component>
@@ -43,13 +43,13 @@
</component>
<reference name="HelloWorldService"
promote="HelloWorldServiceComponent/helloWorldService"
- requires="wsAuthentication">
+ requires="hw:wsAuthentication">
<interface.java interface="helloworld.HelloWorldService" />
<binding.ws
wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
</reference>
<reference name="HelloWorldWsPolicyService"
promote="HelloWorldWsPolicyServiceComponent/helloWorldService"
- policySets="wsSecurityPolicyForIntegrity">
+ requires="hw:wsIntegrity">
<interface.java interface="helloworld.HelloWorldService" />
<binding.ws
wsdlElement="http://helloworld#wsdl.port(HelloWorldWsPolicyService/HelloWorldSoapPort)"/>
</reference>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]