What version of CXF are you using?

Colm.


On Wed, Apr 3, 2013 at 11:23 AM, sumit_chauhan <[email protected]>wrote:

> I am implementing alternate authentication using UsernameToken or SAMLToken
> (Signed). I have configured below policy in my wsdl:
>
>         <wsp:Policy wsu:Id="DoubleItPlaintextPolicy">
>                 <wsp:ExactlyOne>
>                         <wsp:All>
>                                 <sp:SupportingTokens
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702";>
>                                         <wsp:Policy>
>                                                 <sp:SamlToken
> sp:IncludeToken="
> http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient
> ">
>                                                         <wsp:Policy>
>
> <sp:WssSamlV20Token11/>
>                                                         </wsp:Policy>
>                                                 </sp:SamlToken>
>                                         </wsp:Policy>
>                                 </sp:SupportingTokens>
>                         </wsp:All>
>                         <wsp:All>
>                                 <sp:SupportingTokens>
>                                         <wsp:Policy>
>                                                 <sp:UsernameToken>
>                                                         <wsp:Policy>
>
> <sp:HashPassword/>
>                                                         </wsp:Policy>
>                                                 </sp:UsernameToken>
>                                         </wsp:Policy>
>                                 </sp:SupportingTokens>
>                         </wsp:All>
>                 </wsp:ExactlyOne>
>         </wsp:Policy>
>
> Also, I have configured the backend validators in spring beans file. I am
> able to receive requests with UsernameToken. However, SAMLToken requests
> are
> failing with below error:
>
>   <faultstring>These policy alternatives can not be satisfied:
> {
> http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SupportingTokens
> {http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SamlToken
> {http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}UsernameToken
> </faultstring>
>
> I am attaching a sample SAML request which I am trying to handle.
> getTrustedDomainsByUserAddress_SAML_request.xml
> <
> http://cxf.547215.n5.nabble.com/file/n5725739/getTrustedDomainsByUserAddress_SAML_request.xml
> >
> Can someone please let me know the correct policy for handling this kind of
> request.
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/SAMLToken-Signed-request-failing-because-of-WS-Policy-tp5725739.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to