You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by Srinath Perera <he...@gmail.com> on 2005/12/28 19:21:12 UTC

Sending BinarySecurityToken in KeyInfo

Hi All;

I use wss4j with Axis2 client (Axis2 security modules ) to sign a
message, in the request Message the key info  do not use
BinarySecurityToken. The Message is something like this

<ds:KeyInfo Id="KeyId-3190337">
       <wsse:SecurityTokenReference wsu:Id="STRId-19697576">
       <ds:X509Data>
       <ds:X509IssuerSerial>
       <ds:X509IssuerName>....</ds:X509IssuerName>
      <ds:X509SerialNumber>76</ds:X509SerialNumber>
      </ds:X509IssuerSerial>
</ds:X509Data>
</wsse:SecurityTokenReference>
</ds:KeyInfo>

But the server do not understand this and expect something like

<ds:KeyInfo>
       <wsse:SecurityTokenReference>
         <wsse:Reference URI="#token1117575311345"/>
     </wsse:SecurityTokenReference>
  </ds:KeyInfo>
<wsse:BinarySecurityToken > ...</wsse:BinarySecurityToken>

Is there a way to configure wss4j to use BinarySecurityToken in the key info?

Thanks
Srinath

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


Re: Sending BinarySecurityToken in KeyInfo

Posted by Ruchith Fernando <ru...@gmail.com>.
Srinath,

For convenience the key identifier constants are available here:
org.apache.axis2.security.handler.WSSHandlerConstants

WSSHandlerConstants.BST_DIRECT_REFERENCE
WSSHandlerConstants.ISSUER_SERIAL
WSSHandlerConstants.X509_KEY_IDENTIFIER
WSSHandlerConstants.SKI_KEY_IDENTIFIER
WSSHandlerConstants.EMBEDDED_KEYNAME
WSSHandlerConstants.THUMBPRINT_IDENTIFIER

On 12/29/05, Srinath Perera <he...@gmail.com> wrote:
> Hi All;
>
> Following call did the trick, :)
> OutflowConfiguration ofc = new OutflowConfiguration();
> ...............
> ofc.setSignatureKeyIdentifier("DirectReference");
> Thanks
> Srinath
>
>
> On 12/28/05, Srinath Perera <he...@gmail.com> wrote:
> > Hi All;
> >
> > I use wss4j with Axis2 client (Axis2 security modules ) to sign a
> > message, in the request Message the key info  do not use
> > BinarySecurityToken. The Message is something like this
> >
> > <ds:KeyInfo Id="KeyId-3190337">
> >        <wsse:SecurityTokenReference wsu:Id="STRId-19697576">
> >        <ds:X509Data>
> >        <ds:X509IssuerSerial>
> >        <ds:X509IssuerName>....</ds:X509IssuerName>
> >       <ds:X509SerialNumber>76</ds:X509SerialNumber>
> >       </ds:X509IssuerSerial>
> > </ds:X509Data>
> > </wsse:SecurityTokenReference>
> > </ds:KeyInfo>
> >
> > But the server do not understand this and expect something like
> >
> > <ds:KeyInfo>
> >        <wsse:SecurityTokenReference>
> >          <wsse:Reference URI="#token1117575311345"/>
> >      </wsse:SecurityTokenReference>
> >   </ds:KeyInfo>
> > <wsse:BinarySecurityToken > ...</wsse:BinarySecurityToken>
> >
> > Is there a way to configure wss4j to use BinarySecurityToken in the key info?
> >
> > Thanks
> > Srinath
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>
>


--
Ruchith

Re: Sending BinarySecurityToken in KeyInfo

Posted by Ruchith Fernando <ru...@gmail.com>.
Srinath,

For convenience the key identifier constants are available here:
org.apache.axis2.security.handler.WSSHandlerConstants

WSSHandlerConstants.BST_DIRECT_REFERENCE
WSSHandlerConstants.ISSUER_SERIAL
WSSHandlerConstants.X509_KEY_IDENTIFIER
WSSHandlerConstants.SKI_KEY_IDENTIFIER
WSSHandlerConstants.EMBEDDED_KEYNAME
WSSHandlerConstants.THUMBPRINT_IDENTIFIER

On 12/29/05, Srinath Perera <he...@gmail.com> wrote:
> Hi All;
>
> Following call did the trick, :)
> OutflowConfiguration ofc = new OutflowConfiguration();
> ...............
> ofc.setSignatureKeyIdentifier("DirectReference");
> Thanks
> Srinath
>
>
> On 12/28/05, Srinath Perera <he...@gmail.com> wrote:
> > Hi All;
> >
> > I use wss4j with Axis2 client (Axis2 security modules ) to sign a
> > message, in the request Message the key info  do not use
> > BinarySecurityToken. The Message is something like this
> >
> > <ds:KeyInfo Id="KeyId-3190337">
> >        <wsse:SecurityTokenReference wsu:Id="STRId-19697576">
> >        <ds:X509Data>
> >        <ds:X509IssuerSerial>
> >        <ds:X509IssuerName>....</ds:X509IssuerName>
> >       <ds:X509SerialNumber>76</ds:X509SerialNumber>
> >       </ds:X509IssuerSerial>
> > </ds:X509Data>
> > </wsse:SecurityTokenReference>
> > </ds:KeyInfo>
> >
> > But the server do not understand this and expect something like
> >
> > <ds:KeyInfo>
> >        <wsse:SecurityTokenReference>
> >          <wsse:Reference URI="#token1117575311345"/>
> >      </wsse:SecurityTokenReference>
> >   </ds:KeyInfo>
> > <wsse:BinarySecurityToken > ...</wsse:BinarySecurityToken>
> >
> > Is there a way to configure wss4j to use BinarySecurityToken in the key info?
> >
> > Thanks
> > Srinath
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>
>


--
Ruchith

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


Re: Sending BinarySecurityToken in KeyInfo

Posted by Ruchith Fernando <ru...@gmail.com>.
Srinath,

For convenience the key identifier constants are available here:
org.apache.axis2.security.handler.WSSHandlerConstants

WSSHandlerConstants.BST_DIRECT_REFERENCE
WSSHandlerConstants.ISSUER_SERIAL
WSSHandlerConstants.X509_KEY_IDENTIFIER
WSSHandlerConstants.SKI_KEY_IDENTIFIER
WSSHandlerConstants.EMBEDDED_KEYNAME
WSSHandlerConstants.THUMBPRINT_IDENTIFIER

On 12/29/05, Srinath Perera <he...@gmail.com> wrote:
> Hi All;
>
> Following call did the trick, :)
> OutflowConfiguration ofc = new OutflowConfiguration();
> ...............
> ofc.setSignatureKeyIdentifier("DirectReference");
> Thanks
> Srinath
>
>
> On 12/28/05, Srinath Perera <he...@gmail.com> wrote:
> > Hi All;
> >
> > I use wss4j with Axis2 client (Axis2 security modules ) to sign a
> > message, in the request Message the key info  do not use
> > BinarySecurityToken. The Message is something like this
> >
> > <ds:KeyInfo Id="KeyId-3190337">
> >        <wsse:SecurityTokenReference wsu:Id="STRId-19697576">
> >        <ds:X509Data>
> >        <ds:X509IssuerSerial>
> >        <ds:X509IssuerName>....</ds:X509IssuerName>
> >       <ds:X509SerialNumber>76</ds:X509SerialNumber>
> >       </ds:X509IssuerSerial>
> > </ds:X509Data>
> > </wsse:SecurityTokenReference>
> > </ds:KeyInfo>
> >
> > But the server do not understand this and expect something like
> >
> > <ds:KeyInfo>
> >        <wsse:SecurityTokenReference>
> >          <wsse:Reference URI="#token1117575311345"/>
> >      </wsse:SecurityTokenReference>
> >   </ds:KeyInfo>
> > <wsse:BinarySecurityToken > ...</wsse:BinarySecurityToken>
> >
> > Is there a way to configure wss4j to use BinarySecurityToken in the key info?
> >
> > Thanks
> > Srinath
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>
>


--
Ruchith

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


Re: Sending BinarySecurityToken in KeyInfo

Posted by Srinath Perera <he...@gmail.com>.
Hi All;

Following call did the trick, :)
OutflowConfiguration ofc = new OutflowConfiguration();
...............
ofc.setSignatureKeyIdentifier("DirectReference");	
Thanks
Srinath


On 12/28/05, Srinath Perera <he...@gmail.com> wrote:
> Hi All;
>
> I use wss4j with Axis2 client (Axis2 security modules ) to sign a
> message, in the request Message the key info  do not use
> BinarySecurityToken. The Message is something like this
>
> <ds:KeyInfo Id="KeyId-3190337">
>        <wsse:SecurityTokenReference wsu:Id="STRId-19697576">
>        <ds:X509Data>
>        <ds:X509IssuerSerial>
>        <ds:X509IssuerName>....</ds:X509IssuerName>
>       <ds:X509SerialNumber>76</ds:X509SerialNumber>
>       </ds:X509IssuerSerial>
> </ds:X509Data>
> </wsse:SecurityTokenReference>
> </ds:KeyInfo>
>
> But the server do not understand this and expect something like
>
> <ds:KeyInfo>
>        <wsse:SecurityTokenReference>
>          <wsse:Reference URI="#token1117575311345"/>
>      </wsse:SecurityTokenReference>
>   </ds:KeyInfo>
> <wsse:BinarySecurityToken > ...</wsse:BinarySecurityToken>
>
> Is there a way to configure wss4j to use BinarySecurityToken in the key info?
>
> Thanks
> Srinath
>

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


Re: Sending BinarySecurityToken in KeyInfo

Posted by Srinath Perera <he...@gmail.com>.
Hi All;

Following call did the trick, :)
OutflowConfiguration ofc = new OutflowConfiguration();
...............
ofc.setSignatureKeyIdentifier("DirectReference");	
Thanks
Srinath


On 12/28/05, Srinath Perera <he...@gmail.com> wrote:
> Hi All;
>
> I use wss4j with Axis2 client (Axis2 security modules ) to sign a
> message, in the request Message the key info  do not use
> BinarySecurityToken. The Message is something like this
>
> <ds:KeyInfo Id="KeyId-3190337">
>        <wsse:SecurityTokenReference wsu:Id="STRId-19697576">
>        <ds:X509Data>
>        <ds:X509IssuerSerial>
>        <ds:X509IssuerName>....</ds:X509IssuerName>
>       <ds:X509SerialNumber>76</ds:X509SerialNumber>
>       </ds:X509IssuerSerial>
> </ds:X509Data>
> </wsse:SecurityTokenReference>
> </ds:KeyInfo>
>
> But the server do not understand this and expect something like
>
> <ds:KeyInfo>
>        <wsse:SecurityTokenReference>
>          <wsse:Reference URI="#token1117575311345"/>
>      </wsse:SecurityTokenReference>
>   </ds:KeyInfo>
> <wsse:BinarySecurityToken > ...</wsse:BinarySecurityToken>
>
> Is there a way to configure wss4j to use BinarySecurityToken in the key info?
>
> Thanks
> Srinath
>

Re: Sending BinarySecurityToken in KeyInfo

Posted by Srinath Perera <he...@gmail.com>.
Hi All;

Following call did the trick, :)
OutflowConfiguration ofc = new OutflowConfiguration();
...............
ofc.setSignatureKeyIdentifier("DirectReference");	
Thanks
Srinath


On 12/28/05, Srinath Perera <he...@gmail.com> wrote:
> Hi All;
>
> I use wss4j with Axis2 client (Axis2 security modules ) to sign a
> message, in the request Message the key info  do not use
> BinarySecurityToken. The Message is something like this
>
> <ds:KeyInfo Id="KeyId-3190337">
>        <wsse:SecurityTokenReference wsu:Id="STRId-19697576">
>        <ds:X509Data>
>        <ds:X509IssuerSerial>
>        <ds:X509IssuerName>....</ds:X509IssuerName>
>       <ds:X509SerialNumber>76</ds:X509SerialNumber>
>       </ds:X509IssuerSerial>
> </ds:X509Data>
> </wsse:SecurityTokenReference>
> </ds:KeyInfo>
>
> But the server do not understand this and expect something like
>
> <ds:KeyInfo>
>        <wsse:SecurityTokenReference>
>          <wsse:Reference URI="#token1117575311345"/>
>      </wsse:SecurityTokenReference>
>   </ds:KeyInfo>
> <wsse:BinarySecurityToken > ...</wsse:BinarySecurityToken>
>
> Is there a way to configure wss4j to use BinarySecurityToken in the key info?
>
> Thanks
> Srinath
>

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