[ 
https://issues.apache.org/jira/browse/RAMPART-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ruchith Udayanga Fernando resolved RAMPART-38.
----------------------------------------------

    Resolution: Fixed

Fixed in the latest SVN trunk (r-541708)

> AsymmetricBinding does not support UsernameToken as a supporting token
> ----------------------------------------------------------------------
>
>                 Key: RAMPART-38
>                 URL: https://issues.apache.org/jira/browse/RAMPART-38
>             Project: Rampart
>          Issue Type: New Feature
>    Affects Versions: 1.2
>         Environment: Axis2 1.2, rampart-head, tomcat 5.5.23
>            Reporter: Angel Todorov
>             Fix For: 1.2
>
>         Attachments: BindingBuilder.diff, policy.xml, RampartUtil.diff, 
> RampartUtil.diff
>
>
> When trying to add a UsernameToken as a supporting token , and 
> AsymmetricBinding is used, the following exception is thrown:
>   [java] INFO: Deploying module: rampart-1.2
>      [java] Exception in thread "main" org.apache.axis2.AxisFault: Unsupprted 
> token in supporting tokens
>      [java]     at 
> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:63)
>      [java]     at org.apache.axis2.engine.Phase.invoke(Phase.java:383)
>      [java]     at 
> org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:203)
>      [java]     at 
> org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:433)
>      [java]     at 
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:330)
>      [java]     at 
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
>      [java]     at 
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520)
>      [java]     at 
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500)
>      [java]     at 
> org.apache.rampart.samples.policy.sample03.Client.main(Unknown Source)
>      [java] Caused by: org.apache.rampart.RampartException: Unsupprted token 
> in supporting tokens
>      [java]     at 
> org.apache.rampart.builder.BindingBuilder.addSignatureParts(BindingBuilder.java:412)
>      [java]     at 
> org.apache.rampart.builder.AsymmetricBindingBuilder.doSignBeforeEncrypt(AsymmetricBindingBuilder.java:297)
>      [java]     at 
> org.apache.rampart.builder.AsymmetricBindingBuilder.build(AsymmetricBindingBuilder.java:85)
>      [java]     at 
> org.apache.rampart.MessageBuilder.build(MessageBuilder.java:130)
>      [java]     at 
> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:57)
>      [java]     ... 8 more
> ---------------------------------------------------------------
> Here is the policy I am using:
> <wsp:Policy wsu:Id="SigEncr" 
> 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:SignedSupportingTokens 
> xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
>                       <wsp:Policy>
>                               <sp:UsernameToken 
> sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient";
>  />
>                       <wsp:Policy>
>               <sp:WssUsernameToken10/>
>             </wsp:Policy>
>                 </wsp:Policy>
>               </sp:SignedSupportingTokens>
>                       <sp:SignedParts 
> xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
>                               <sp:Body/>
>                       </sp:SignedParts>
>                       <sp:EncryptedParts 
> xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
>                               <sp:Body/>
>                       </sp:EncryptedParts>
> Thank you.
> Regards,
> Angel

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to