You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by Veli-Pekka Rannila <Ve...@solita.fi> on 2008/03/18 08:03:51 UTC

Signing the BinarySecurityToken

Hi all,

I use Axis2 v1.3, Rampart v1.3 and Java 1.5 in my project.

 

In this project I have to sign Body, Timestamp and BinarySecurityToken
(BST) in my SOAP message. Body and Timestamp seems to work OK but I have
problems with the BST. I have tried to put BinarySecurityElement inside
<signatureParts> element in my Axis2.xml but when I run my client I'll
receive the following error:

 

"org.apache.axis2.AxisFault: WSHandler: Signature: error during message
processingorg.apache.ws.security.WSSecurityException: General security
error (WSEncryptBody/WSSignEnvelope: Element to encrypt/sign not found:
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utili
ty-1.0.xsd, BinarySecurityToken)"

 

By reading the error it seems that BST element has not been created yet
when the signing happens.

 

 

Below is part of my Axis2.xml (OutflowSecurity) when trying to sign only
the BinarySecurityToken:

 

****************************************************

<parameter name="OutflowSecurity">

 <action>

  <items>Timestamp Signature</items>

  <user>client</user>

  <signaturePropFile>client.properties</signaturePropFile>

 
<passwordCallbackClass>org.cco.service.pwdhandler.PWCBHandler</passwordC
allbackClass>

 
<signatureParts>{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-2
00401-wss-wssecurity-utility-1.0.xsd}BinarySecurityToken</signatureParts
>

  <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>

 </action>

</parameter>

****************************************************

 

 

Is there a solution for signing the BST by using the OutflowSecurity
definitions in Axis2.xml (like above)? Has "ProtectTokens" -element
something to do with this case (if it does, can you explain how to use
it)?

 

This is quite urgent for me so any help is very much appreciate
<http://www.ilmainensanakirja.fi/trans?q=P-12.Q-appriciate.Q2-appreciate
> d!

 

Thanks!

 

Best Regards,

VP