summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/assembly-xml/src/test/resources/org
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-02-20 20:10:37 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-02-20 20:10:37 +0000
commit3a8a64103bcc4891fb1a1f4cc4538f9d5b62a7ba (patch)
treeccd8919c277ad88c032acb3167fdd4645586cb07 /java/sca/modules/assembly-xml/src/test/resources/org
parent7b9fa54dced70baffa6578b0be902b06092584a7 (diff)
Start to implement the SCA policy framework 1.1 spec draft from OASIS OpenCSA
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@746356 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/assembly-xml/src/test/resources/org')
-rw-r--r--java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/TestAllCalculator.composite5
-rw-r--r--java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/TestAllPolicyCalculator.composite3
-rw-r--r--java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/another_test_definitions.xml7
-rw-r--r--java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/test_definitions.xml339
4 files changed, 188 insertions, 166 deletions
diff --git a/java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/TestAllCalculator.composite b/java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/TestAllCalculator.composite
index 5091ff700b..79b97e9799 100644
--- a/java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/TestAllCalculator.composite
+++ b/java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/TestAllCalculator.composite
@@ -36,13 +36,11 @@
<operation name="add" policySets="sns:SecureReliablePolicy" requires="cns:confidentiality" />
<binding.ws name="CalculatorWS" policySets="sns:SecureReliablePolicy" port="" requires="cns:confidentiality" uri="http://calc/ws">
- <operation name="add" policySets="sns:SecureReliablePolicy" requires="cns:confidentiality" />
</binding.ws>
<callback policySets="sns:SecureReliablePolicy" requires="cns:confidentiality">
<ext:testExtension/>
<binding.ws name="CalculatorCallbackWS" policySets="" port="" requires="" uri="http://calc/callback/ws">
- <operation name="addCallback" policySets="sns:SecureReliablePolicy" requires="cns:confidentiality" />
</binding.ws>
</callback>
</service>
@@ -97,16 +95,13 @@
<reference name="MultiplyService" promote="CalculatorServiceComponent/multiplyService" policySets="sns:SecureReliablePolicy"
requires="cns:confidentiality">
<interface.java interface="calculator.MultiplyService" callbackInterface="calculator.MultiplyCallback" />
- <operation name="multiply" policySets="sns:SecureReliablePolicy" requires="cns:confidentiality" />
<binding.ws name="MultiplyWS" port="" policySets="sns:SecureReliablePolicy" requires="cns:confidentiality" uri="http://calc/ws">
- <operation name="multiply" policySets="sns:SecureReliablePolicy" requires="cns:confidentiality" />
</binding.ws>
<callback policySets="sns:SecureReliablePolicy" requires="cns:confidentiality">
<binding.ws name="MultiplyCallbackWS" port="" uri="http://calc/callback/ws" policySets="sns:SecureReliablePolicy"
requires="cns:confidentiality">
- <operation name="multiplyCallback" policySets="sns:SecureReliablePolicy" requires="cns:confidentiality" />
</binding.ws>
</callback>
</reference>
diff --git a/java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/TestAllPolicyCalculator.composite b/java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/TestAllPolicyCalculator.composite
index 7bc7ccdb83..3ac4b17117 100644
--- a/java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/TestAllPolicyCalculator.composite
+++ b/java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/TestAllPolicyCalculator.composite
@@ -49,7 +49,6 @@
<ext:testExtension/>
<service name="CalculatorService" requires="cns:tuscanyIntent_3">
<interface.java interface="calculator.CalculatorService" callbackInterface="calculator.CalculatorCallback" />
- <operation name="add" requires="cns:tuscanyIntent_6 cns:tuscanyIntent_7"/>
<binding.ws name="CalculatorCallbackWS" policySets="" port="" requires="cns:tuscanyIntent_4" uri="http://calc/callback/ws">
</binding.ws>
<callback>
@@ -60,7 +59,6 @@
requires="cns:tuscanyIntent_3 cns:tuscanyIntent_2.qualified" wiredByImpl="false">
<ext:testExtension/>
<interface.java interface="calculator.AddService" callbackInterface="calculator.AddCallback" />
- <operation name="add" requires="cns:tuscanyIntent_8 cns:tuscanyIntent_9"/>
<binding.ws name="addServiceWSRef" policySets="" port="" requires="cns:tuscanyIntent_4" uri="http://calc/callback/ws">
</binding.ws>
</reference>
@@ -102,7 +100,6 @@
<reference name="MultiplyService" promote="CalculatorServiceComponent/multiplyService"
requires="cns:tuscanyIntent_2">
<interface.java interface="calculator.MultiplyService" callbackInterface="calculator.MultiplyCallback" />
- <operation name="multiply" requires="cns:tuscanyIntent_6"/>
<binding.ws name="MultiplyWS" port="" requires="cns:tuscanyIntent_3" uri="http://calc/ws">
</binding.ws>
diff --git a/java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/another_test_definitions.xml b/java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/another_test_definitions.xml
index bcc8c54dc8..5729038344 100644
--- a/java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/another_test_definitions.xml
+++ b/java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/another_test_definitions.xml
@@ -19,7 +19,7 @@
-->
<sca:definitions xmlns="http://test"
targetNamespace="http://test"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0">
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200712">
<!-- simple intent -->
<sca:intent name="tuscanyIntent_1"
@@ -27,6 +27,7 @@
<sca:description>
Sample Intent
</sca:description>
+ <sca:qualifier name="qualified" default="true"/>
</sca:intent>
<sca:intent name="tuscanyIntent_2"
@@ -34,6 +35,7 @@
<sca:description>
Sample Intent
</sca:description>
+ <sca:qualifier name="qualified" default="true"/>
</sca:intent>
<sca:intent name="tuscanyIntent_3"
@@ -91,7 +93,4 @@
Sample Intent
</sca:description>
</sca:intent>
- <!-- qualified intents -->
- <sca:intent name="tuscanyIntent_1.qualified" />
- <sca:intent name="tuscanyIntent_2.qualified" />
</sca:definitions> \ No newline at end of file
diff --git a/java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/test_definitions.xml b/java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/test_definitions.xml
index b79cb6b7b7..216cb29b0a 100644
--- a/java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/test_definitions.xml
+++ b/java/sca/modules/assembly-xml/src/test/resources/org/apache/tuscany/sca/assembly/xml/test_definitions.xml
@@ -17,159 +17,190 @@
* specific language governing permissions and limitations
* under the License.
-->
-<sca:definitions xmlns="http://test"
- targetNamespace="http://test"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0">
-
- <!-- qualified intents -->
- <sca:intent name="confidentiality.transport" />
- <sca:intent name="confidentiality.message" />
- <sca:intent name="confidentiality.message.whole" />
- <sca:intent name="confidentiality.message.body" />
-
- <!-- POLICY SETS -->
- <sca:policySet name="SecureReliablePolicy"
- provides="confidentiality.transport integrity"
- appliesTo="//sca:binding.ws | //sca:binding.sca"
- xmlns="http://test"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:PolicyAttachment>
- <!-- policy expression and policy subject for
- "basic authentication" -->
- </wsp:PolicyAttachment>
- <wsp:PolicyAttachment>
- <!-- policy expression and policy subject for
- "reliability" -->
- </wsp:PolicyAttachment>
- </sca:policySet>
-
- <sca:policySet name="SecureMessagingPolicies"
- provides="confidentiality"
- appliesTo="//sca:binding.ws"
- xmlns="http://test"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <sca:intentMap provides="confidentiality" default="transport">
- <sca:qualifier name="transport">
- <wsp:Policy>
- <!-- policy expression and policy subject for "transport" alternative -->
- </wsp:Policy>
- <wsp:Policy>...</wsp:Policy>
- </sca:qualifier>
- <sca:qualifier name="message">
- <wsp:Policy>
- <!-- policy expression and policy subject for "message" alternative" -->
- </wsp:Policy>
- </sca:qualifier>
- </sca:intentMap>
-</sca:policySet>
-
-<sca:policySet name="SecurityPolicy" provides="confidentiality"
- xmlns="http://test"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" >
- <sca:intentMap provides="confidentiality" default="message">
- <sca:qualifier name="message">
- <sca:intentMap provides="message" default="whole">
- <sca:qualifier name="body">
- <wsp:Policy>
- <!-- policy attachment for body encryption -->
- </wsp:Policy>
- </sca:qualifier>
- <sca:qualifier name="whole">
- <wsp:Policy>
- <!-- policy attachment for whole message encryption -->
- </wsp:Policy>
- </sca:qualifier>
- </sca:intentMap>
- </sca:qualifier>
- <sca:qualifier name="transport">
- <wsp:Policy>
- <!-- policy attachment for transport encryption -->
- </wsp:Policy>
- </sca:qualifier>
- </sca:intentMap>
-</sca:policySet>
-
-<sca:policySet name="BasicAuthMsgProtSecurity"
- provides="authentication confidentiality"
- appliesTo="//sca:binding.ws"
- xmlns="http://test">
- <sca:policySetReference name="AuthenticationPolicies"/>
- <sca:policySetReference name="ConfidentialityPolicies"/>
-</sca:policySet>
-
-<sca:policySet name="AuthenticationPolicies"
- provides="authentication"
- appliesTo="//sca:binding.ws"
- xmlns="http://test"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <wsp:PolicyAttachment>
- <!-- policy expression and policy subject for "basic
+<definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712" targetNamespace="http://test"
+ xmlns:test="http://test" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200712">
+
+ <!-- Extension Types Metadata -->
+ <implementationType type="sca:implementation.java" alwaysProvides="test:logging" mayProvide="test:tracing" />
+ <bindingType type="sca:binding.ws" alwaysProvides="test:confidentiality" mayProvide="test:integrity" />
+
+ <!-- Intents and Policysets to assume targetnamespace -->
+ <intent name="TestIntentOne" constrains="sca:binding">
+ <description>
+ Test Intent
+ </description>
+ </intent>
+
+ <intent name="TestIntentTwo" constrains="sca:binding" requires="test:TestIntentOne">
+ <description>
+ Protect messages from unauthorized reading or modification
+ </description>
+ </intent>
+
+ <policySet name="TestPolicySetOne" provides="test:TestIntentOne" appliesTo="sca:binding.ws"
+ xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:PolicyAttachment>
+ <!-- policy expression and policy subject for
+ "basic authentication" -->
+ </wsp:PolicyAttachment>
+ <wsp:PolicyAttachment>
+ <!-- policy expression and policy subject for
+ "reliability" -->
+ </wsp:PolicyAttachment>
+ </policySet>
+
+ <!-- POLICY SETS -->
+ <policySet name="SecureReliablePolicy" provides="test:confidentiality.transport test:integrity" appliesTo="sca:binding.ws"
+ xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:PolicyAttachment>
+ <!-- policy expression and policy subject for
+ "basic authentication" -->
+ </wsp:PolicyAttachment>
+ <wsp:PolicyAttachment>
+ <!-- policy expression and policy subject for
+ "reliability" -->
+ </wsp:PolicyAttachment>
+ </policySet>
+
+ <policySet name="SecureMessagingPolicies" provides="test:confidentiality" appliesTo="binding.ws"
+ xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <intentMap provides="test:confidentiality" default="transport">
+ <qualifier name="transport">
+ <wsp:PolicyAttachment>
+ <!-- policy expression and policy subject for "transport" alternative -->
+ </wsp:PolicyAttachment>
+ <wsp:PolicyAttachment>...</wsp:PolicyAttachment>
+ </qualifier>
+ <qualifier name="message">
+ <wsp:PolicyAttachment>
+ <!-- policy expression and policy subject for "message" alternative" -->
+ </wsp:PolicyAttachment>
+ </qualifier>
+ </intentMap>
+ </policySet>
+
+ <policySet name="SecurityPolicy" provides="test:confidentiality" appliesTo="binding.ws"
+ xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <intentMap provides="test:confidentiality" default="message">
+ <qualifier name="message">
+ <wsp:PolicyAttachment>
+ <!-- policy attachment for body encryption -->
+ </wsp:PolicyAttachment>
+ <wsp:PolicyAttachment>
+ <!-- policy attachment for whole message encryption -->
+ </wsp:PolicyAttachment>
+ </qualifier>
+ <qualifier name="transport">
+ <wsp:PolicyAttachment>
+ <!-- policy attachment for transport encryption -->
+ </wsp:PolicyAttachment>
+ </qualifier>
+ </intentMap>
+ </policySet>
+
+ <policySet name="BasicAuthMsgProtSecurity" provides="test:authentication test:confidentiality" appliesTo="binding.ws"
+ xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712">
+ <policySetReference name="test:AuthenticationPolicies" />
+ <policySetReference name="test:ConfidentialityPolicies" />
+ </policySet>
+
+ <policySet name="AuthenticationPolicies" provides="test:authentication" appliesTo="binding.ws"
+ xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:PolicyAttachment>
+ <!-- policy expression and policy subject for "basic
authentication" -->
- </wsp:PolicyAttachment>
-</sca:policySet>
-
-<sca:policySet name="ConfidentialityPolicies"
- provides="confidentiality"
- bindings="binding.ws"
- xmlns="http://test"
- xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
- <sca:intentMap provides="confidentiality" default="transport">
- <sca:qualifier name="transport">
- <wsp:Policy>
- <!-- policy expression and policy subject for "transport"
+ </wsp:PolicyAttachment>
+ </policySet>
+
+ <policySet name="ConfidentialityPolicies" provides="test:confidentiality" appliesTo="binding.ws"
+ xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <intentMap provides="test:confidentiality" default="transport">
+ <qualifier name="transport">
+ <wsp:PolicyAttachment>
+ <!-- policy expression and policy subject for "transport"
alternative -->
- </wsp:Policy>
- <wsp:Policy>...</wsp:Policy>
- </sca:qualifier>
- <sca:qualifier name="message">
- <wsp:Policy>
- <!-- policy expression and policy subject for "message"
- alternative" -->...
- </wsp:Policy>
- </sca:qualifier>
- </sca:intentMap>
-</sca:policySet>
-
-<!-- profile intent -->
- <sca:intent name="reliableMessageProtection"
- constrains="sca:binding"
- requires="messageProtection">
- <sca:description>
- Protect messages from unauthorized reading or modification
- </sca:description>
- </sca:intent>
-
- <sca:intent name="messageProtection"
- constrains="sca:binding"
- requires="confidentiality integrity">
- <sca:description>
- Protect messages from unauthorized reading or modification
- </sca:description>
- </sca:intent>
-
-<!-- simple intent -->
- <sca:intent name="confidentiality"
- constrains="sca:binding">
- <sca:description>
- Communitcation thro this binding must prevent
- unauthorized users from reading the messages.
- </sca:description>
- </sca:intent>
-
- <sca:intent name="integrity"
- constrains="sca:binding">
- <sca:description>
- Communitcation thro this binding must prevent
- unauthorized modification of the messages.
- </sca:description>
- </sca:intent>
-
- <sca:intent name="authentication"
- constrains="sca:binding">
- <sca:description>
- Communitcation thro this binding required
- Authentication.
- </sca:description>
- </sca:intent>
-
-</sca:definitions> \ No newline at end of file
+ </wsp:PolicyAttachment>
+ <wsp:PolicyAttachment>...</wsp:PolicyAttachment>
+ </qualifier>
+ <qualifier name="message">
+ <wsp:PolicyAttachment>
+ <!-- policy expression and policy subject for "message"
+ alternative" -->
+ ...
+ </wsp:PolicyAttachment>
+ </qualifier>
+ </intentMap>
+ </policySet>
+
+ <policySet name="SecureWSPolicy" provides="test:confidentiality" appliesTo="sca:binding.ws"
+ xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712" xmlns:sp="http://schemas.xmlsoap.org/ws/2002/12/secext"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:Policy>
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SecurityToken>
+ <sp:TokenType>sp:X509v3</sp:TokenType>
+ </sp:SecurityToken>
+ <sp:UsernameToken />
+ <sp:SignedParts />
+ <sp:EncryptedParts>
+ <sp:Body />
+ </sp:EncryptedParts>
+ <sp:TransportBinding>
+ <sp:IncludeTimeStamp />
+ </sp:TransportBinding>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ </policySet>
+
+ <!-- profile intent -->
+ <intent name="reliableMessageProtection" constrains="sca:binding" requires="test:messageProtection">
+ <description>
+ Protect messages from unauthorized reading or modification
+ </description>
+ </intent>
+
+ <intent name="messageProtection" constrains="sca:binding" requires="test:confidentiality test:integrity">
+ <description>
+ Protect messages from unauthorized reading or modification
+ </description>
+ </intent>
+
+ <!-- simple intent -->
+ <intent name="confidentiality" constrains="sca:binding">
+ <description>
+ Communitcation thro this binding must prevent
+ unauthorized users from reading the messages.
+ </description>
+ <qualifier name="transport" />
+ <qualifier name="message" default="true" />
+ </intent>
+
+ <intent name="integrity" constrains="sca:binding">
+ <description>
+ Communitcation thro this binding must prevent
+ unauthorized modification of the messages.
+ </description>
+ </intent>
+
+ <intent name="authentication" constrains="sca:binding">
+ <description>
+ Communitcation thro this binding required
+ Authentication.
+ </description>
+ </intent>
+
+ <intent name="logging" constrains="sca:implementation">
+ <description>
+ All messages to and from this implementation must be logged
+ </description>
+ </intent>
+
+ <intent name="tracing" constrains="sca:implementation.java">
+ <description>
+ Need to figure out some description for this
+ </description>
+ </intent>
+
+</definitions> \ No newline at end of file