Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom UsernameToken?

 
Justin Olomar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We would like to use the UsernameToken WS-Security standard to implement security in our web services. The only hitch is that we need more than just a username and password...we need a CompanyID, also. Is it possible to create a custom UsernameToken element in the SOAP headers and still be compliant with the WS-Security standards? I apologize if I have not used the correct terminology...hopefully this makes sense.

We are using Tomcat 6, Axis2 v1.5 and Rampart. As an example, we would like the header to look something like this:

Thank you,
Justin
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I don't think that's allowed. But nothing stops you from adding your own custom SOAP header that's outside of the wsse:Security header.
 
Justin Olomar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:No, I don't think that's allowed. But nothing stops you from adding your own custom SOAP header that's outside of the wsse:Security header.
Thank you for the reply. So if we add our own custom headers to accomplish what we want, will our web service still be SOAP compliant and be able to be easily accessed via Java OR .NET clients? (If you can't tell, I'm new to this sort of thing )
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SOAP specifically allows adding custom headers; you may want to read through the SOAP spec for the details - it's not long or complicated.
 
Justin Olomar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:SOAP specifically allows adding custom headers; you may want to read through the SOAP spec for the details - it's not long or complicated.
Thanks Ulf, you've pointed me in the right direction....hopefully.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic