Intents in composite getting attributed to all services by default
------------------------------------------------------------------
Key: TUSCANY-3579
URL: https://issues.apache.org/jira/browse/TUSCANY-3579
Project: Tuscany
Issue Type: Bug
Components: Java SCA Policy
Affects Versions: Java-SCA-1.6
Environment: Java 6
Reporter: Anil GVN
Priority: Critical
The issue is:
There are 2 services in a composite. One for which no security is required but
the other needs security. But when the "intent" attribute is specified for one
service, its getting attributed to the other service aswell by default.
Interestingly what is noticed is that the moment "constrains" is specified for
a newly specified intent, in definitions.xml, the policy is getting engaged by
default for the constrained binding types even thought "intent" attribute is
not specified for any service in composite.
Here's the definitions.xml:
<?xml version="1.0" encoding="ASCII"?>
<definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://example" xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
xmlns:exam="http://example">
<sca:intent name="authToken" constrains="sca:binding.jms sca:binding.ws">
<description>Authentication and Authorization Intent on WS and
JMS</description>
</sca:intent>
<sca:policySet name="JMSTokenAuthenticationPolicySet"
provides="exam:authToken"
appliesTo="sca:binding.jms">
<exam:JMSAuthTokenPolicy tokenName="exam:AuthToken"/>
</sca:policySet>
<sca:policySet name="WSTokenAuthenticationPolicySet" provides="exam:authToken"
appliesTo="sca:binding.ws">
<exam:WSAuthTokenPolicy tokenName="exam:AuthToken"/>
</sca:policySet>
</definitions>
And here's the composite file.
<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:exam="http://example"
targetNamespace="http://example/ExampleService"
name="ExampleService_Server_Composite">
<component name="ExampleServiceComponent">
<implementation.java
class="org.exam.sample.sca.server.ExampleServiceImpl"/>
<service name="ExampleService" requires="exam:authToken">
<interface.java interface="org.exam.remote.sca.ExampleService"/>
<binding.sca/>
<binding.ws uri="http://localhost:8020/exam/ExampleService"/>
</service>
</component>
<component name="UnsecuredServiceComponent">
<implementation.java class="org.exam.remote.sca.UnsecuredServiceImpl"/>
<service name="UnsecuredService">
<interface.java interface="org.exam.remote.sca.UnsecuredService"/>
<binding.sca/>
<binding.ws uri="http://localhost:8020/exam/UnsecuredService"/>
</service>
</component>
</composite>
Even if the "requires" attribute for ExampleService is removed, policy gets
engaged for both the services.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.