ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanka Samaranayake <ssa...@gmail.com>
Subject Re: WS Commons Policy
Date Mon, 23 Jan 2006 10:48:32 GMT
Hi Benjamin, All,


On 1/23/06, Benjamin Schmeling <Benjamin_Schmeling@gmx.de> wrote:
> I think the implementation of the RMPolicyProcessor is not as complex as
> the WSSPolicyProcessor because there are no complex elements (assertion
> tokens which contain other tokens), is there a skeleton implementation
> available yet? I would try to implement this in a simple way.

yes, you are absolutely correct. The WSRM policy assertions are much
simpler and easy to process compared to WSSecurity policy assertions.
There is fine example on how to process a WSSecurity policy by
Dittmann, Werner  at:
https://svn.apache.org/repos/asf/webservices/commons/trunk/policy/examples/wsse

I copied that code and simplifed it to process any RM Policy
assertions and retrive the configuration information out from those
assertions. I will commit that to sandesha2 repostiory as soon as I
finish it.

It might help you a bit if you want to do the same in Sandesha1


>
> Another question is how to combine the WSSPolicy and the WSRMPolicy
> processors to find a complete compability between a clients and a
> servers policy. Has anyone made considerations about this?

Please see:

http://mail-archives.apache.org/mod_mbox/ws-axis-dev/200511.mbox/%3c438162FB.1030805@gmail.com%3e
http://mail-archives.apache.org/mod_mbox/ws-axis-dev/200511.mbox/%3c1e8c1ed40511230104y151c08erbc7e4bcb9ad35cf4@mail.gmail.com%3e

Hope this will help !!

Best,
Sanka

>
> Thanks,
>
> Benjamin
>
> >Hi Benjamin,
> >
> >
> >On 1/23/06, Benjamin Schmeling <Benjamin_Schmeling@gmx.de> wrote:
> >
> >
> >>Okay, but I could use the Ws Commons Policy implementation to intersect
> >>the policies of the server and the client (Assuming I know how to
> >>retrieve them). I tried it out with examples of RM-Policy, but the
> >>results of the intersection is not as I expected:
> >>
> >>Policy A is:
> >>
> >><wsp:Policy xmlns:tns="example.com"
> >>            xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> >>            xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
> >>
> >>xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
> >>xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> >>            wsu:Id="MyPolicy">
> >>    <wsrm:RMAssertion>
> >>        <wsrm:InactivityTimeout Milliseconds="240000"/>
> >>        <wsrm:BaseRetransmissionInterval Milliseconds="3000"/>
> >>        <wsrm:ExponentialBackoff/>
> >>        <wsrm:AcknowledgementInterval Milliseconds="200"/>
> >>    </wsrm:RMAssertion>
> >>     <!-- omitted assertions -->
> >></wsp:Policy>
> >>
> >>Policy B is:
> >>
> >><wsp:Policy xmlns:tns="example.com"
> >>            xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> >>            xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
> >>
> >>xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
> >>xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> >>            wsu:Id="MyPolicy">
> >>    <wsrm:RMAssertion>
> >>        <wsrm:InactivityTimeout Milliseconds="1000"/>
> >>        <wsrm:BaseRetransmissionInterval Milliseconds="3000"/>
> >>        <wsrm:ExponentialBackoff/>
> >>        <wsrm:AcknowledgementInterval Milliseconds="200"/>
> >>    </wsrm:RMAssertion>
> >>     <!-- omitted assertions -->
> >></wsp:Policy>
> >>
> >>The intersection is:
> >>
> >><wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
> >>wsu:Id="MyPolicy">
> >>    <wsp:ExactlyOne>
> >>        <wsp:All>
> >>            <wsrm:RMAssertion
> >>xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy">
> >>                <wsrm:InactivityTimeout Milliseconds="100" />
> >>                <wsrm:BaseRetransmissionInterval Milliseconds="3000" />
> >>                <wsrm:ExponentialBackoff /><wsrm:AcknowledgementInterval
> >>Milliseconds="200" />
> >>            </wsrm:RMAssertion>
> >>            <wsrm:RMAssertion
> >>xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy">
> >>                <wsrm:InactivityTimeout Milliseconds="240000" />
> >>                <wsrm:BaseRetransmissionInterval Milliseconds="3000" />
> >>                <wsrm:ExponentialBackoff />
> >>                <wsrm:AcknowledgementInterval Milliseconds="200" />
> >>            </wsrm:RMAssertion>
> >>        </wsp:All>
> >>    </wsp:ExactlyOne>
> >></wsp:Policy>
> >>
> >>I expected, that there is no common agreement between client and server,
> >>because of the different InactivityTimeout. Is that because of the
> >>general definition of WS-Policy ?
> >>
> >>
> >
> >yes, thats the exact definition of policy intersect according
> >WS-Policy specification. The result you got is correct according to
> >the sepc.
> >
> >
> >
> >>Do we need another implementation for
> >>the concrete domain specific policy assertions (e.g. RMPolicy)?
> >>
> >>
> >
> >Rather you need a domain specific policy processor (say
> >RMPolicyProcessor) to evaluate those two RMAssertions and to throw a
> >fault saying that there is a policy violation or policy
> >incompatibility .
> >
> >Sanka
> >
> >
> >
> >>Thanks,
> >>
> >>Benjamin
> >>
> >>
> >>
> >>>Hi Benjamin,
> >>>
> >>>Sandesha 1 works with Axis 1 and it supports only the static policy.
> >>>That is policy is read from a file in both client and server side.
> >>>WS-Commons policy will be used in Axis2 and Sandesha2 to get the
> >>>policies dynamically from server. Still the client side of Axis2 needs
> >>>some work regarding dynamic policies.
> >>>It will be there soon.
> >>>
> >>>Thanks,
> >>>Jaliya
> >>>
> >>>
> >>>
> >>>----- Original Message ----- From: "Benjamin Schmeling"
> >>><Benjamin_Schmeling@gmx.de>
> >>>To: <general@ws.apache.org>
> >>>Sent: Friday, January 20, 2006 10:07 AM
> >>>Subject: WS Commons Policy
> >>>
> >>>
> >>>
> >>>
> >>>>Hi,
> >>>>
> >>>>I am using Apache Sandesha 1.0 and Axis for reliable messaging. Now I
> >>>>want
> >>>>to attach a policy to my web service, so the client can get the
> >>>>policy of
> >>>>that web service (which should only accept reliable messaging calls)
and
> >>>>check if the clients policy is supported by this service. I am using
> >>>>Axis
> >>>>1.2.1.
> >>>>
> >>>>Is there any possibility to do this with WS Commons Policy ? I saw that
> >>>>there are provided a policy model and merging, normalizing operations.
I
> >>>>don't know how to get the policy from the server and if it is
> >>>>possible to
> >>>>do this with Axis 1.x.
> >>>>
> >>>>Thanks,
> >>>>
> >>>>Benjamin
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
> >>For additional commands, e-mail: sandesha-dev-help@ws.apache.org
> >>
> >>
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
> >For additional commands, e-mail: sandesha-dev-help@ws.apache.org
> >
> >
> >
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org


Mime
View raw message