Author: svkrish
Date: Sun Oct 21 02:55:58 2007
New Revision: 586881
URL: http://svn.apache.org/viewvc?rev=586881&view=rev
Log:
included a reference that exercises integrity intent that is specified by a
ws-policy
Added:
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/helloworldKeys.jks
(with props)
Modified:
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldClient.java
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
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/wsdl/helloworld.wsdl
Modified:
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldClient.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldClient.java?rev=586881&r1=586880&r2=586881&view=diff
==============================================================================
---
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldClient.java
(original)
+++
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/java/helloworld/HelloWorldClient.java
Sun Oct 21 02:55:58 2007
@@ -32,6 +32,10 @@
String value = helloWorldService.getGreetings("World");
System.out.println(value);
+
+ helloWorldService = scaDomain.getService(HelloWorldService.class,
"HelloWorldWsPolicyServiceComponent");
+ value = helloWorldService.getGreetings("WsPolicyWorld");
+ System.out.println(value);
scaDomain.close();
}
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=586881&r1=586880&r2=586881&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
Sun Oct 21 02:55:58 2007
@@ -102,51 +102,76 @@
</tuscany:wsConfigParam>
</sca:policySet>
- <sca:policySet name="wsIntegrityPolicy"
+ <!-- A policyset that uses WS Policy -->
+ <sca:policySet name="wsSecurityPolicyForIntegrity"
provides="integrity"
appliesTo="sca:binding.ws">
- <tuscany:wsConfigParam>
- <parameter name="InflowSecurity">
- <action>
- <items>Timestamp Signature</items>
-
<signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/security.properties</signaturePropFile>
- </action>
- </parameter>
- <parameter name="OutflowSecurity">
- <action>
- <items>Timestamp Signature</items>
- <user>TuscanyWsUser</user>
-
<signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/security.properties</signaturePropFile>
-
<passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.IntegrityPWCBHandler</passwordCallbackClass>"
+
-
<signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
- </action>
- </parameter>
- </tuscany:wsConfigParam>
- </sca:policySet>
-
- <sca:policySet name="wsConfidentialityPolicy"
- provides="confidentiality"
- appliesTo="sca:binding.ws">
- <tuscany:wsConfigParam>
- <parameter name="InflowSecurity">
- <action>
- <items>Timestamp Signature Encrypt</items>
-
<passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.IntegrityPWCBHandler</passwordCallbackClass>
-
<signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/security.properties</signaturePropFile>
- </action>
- </parameter>
- <parameter name="OutflowSecurity">
- <action>
- <items>Timestamp Signature Encrypt</items>
- <user>TuscanyWsUser</user>
- <encryptionUser>TuscanyWsUser</encryptionUser>
-
<passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.IntegrityPWCBHandler</passwordCallbackClass>
-
<signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/security.properties</signaturePropFile>
-
<signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
-
<encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
- </action>
- </parameter>
- </tuscany:wsConfigParam>
+ <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.ClientPWCBHandler</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>
</sca:policySet>
</sca:definitions>
Added:
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/helloworldKeys.jks
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/helloworldKeys.jks?rev=586881&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/helloworldKeys.jks
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
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=586881&r1=586880&r2=586881&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
Sun Oct 21 02:55:58 2007
@@ -37,9 +37,21 @@
<implementation.java class="helloworld.HelloWorldServiceComponent"/>
</component>
- <reference name="HelloWorldService"
promote="HelloWorldServiceComponent/helloWorldService"
requires="wsAuthentication">
+ <!-- A component with a reference promoted as a composite reference with a
ws policy -->
+ <component name="HelloWorldWsPolicyServiceComponent">
+ <implementation.java class="helloworld.HelloWorldServiceComponent"/>
+ </component>
+
+ <reference name="HelloWorldService"
promote="HelloWorldServiceComponent/helloWorldService"
+ requires="wsAuthentication">
<interface.java interface="helloworld.HelloWorldService" />
<binding.ws
wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
+ </reference>
+
+ <reference name="HelloWorldWsPolicyService"
promote="HelloWorldWsPolicyServiceComponent/helloWorldService"
+ policySets="wsSecurityPolicyForIntegrity">
+ <interface.java interface="helloworld.HelloWorldService" />
+ <binding.ws
wsdlElement="http://helloworld#wsdl.port(HelloWorldWsPolicyService/HelloWorldSoapPort)"/>
</reference>
</composite>
Modified:
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/wsdl/helloworld.wsdl
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/wsdl/helloworld.wsdl?rev=586881&r1=586880&r2=586881&view=diff
==============================================================================
---
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/wsdl/helloworld.wsdl
(original)
+++
incubator/tuscany/java/sca/samples/helloworld-ws-reference-secure/src/main/resources/wsdl/helloworld.wsdl
Sun Oct 21 02:55:58 2007
@@ -75,5 +75,11 @@
<wsdlsoap:address
location="http://localhost:8085/HelloWorldService"/>
</wsdl:port>
</wsdl:service>
+
+ <wsdl:service name="HelloWorldWsPolicyService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding"
name="HelloWorldSoapPort">
+ <wsdlsoap:address
location="http://localhost:8085/HelloWorldWsPolicyService"/>
+ </wsdl:port>
+ </wsdl:service>
</wsdl:definitions>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]