Reputation: 1490
What is the difference between SOAP security header (WSSE) and general SOAP header? What if I use just simple soap headers for sending my credentials?
Why I should use this:
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-1">
<wsse:Username>login</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXXX</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
And should not use this:
<S:Header>
<Username xmlns="http://ws.enterprise.com/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next">
Username text
</Username>
</S:Header>
Thanks in advance!
Upvotes: 2
Views: 12554
Reputation: 3424
Both would meet the functional need of passing a username and password.
Both are equally simple.
One is an open standard (actually one small one in a set of well-thought out standards for end-to-end SOAP message security needs, ranging from authentication, message confidentiality, non-repudiation, etc). The other is specific to your application; proprietary, but might be all you need.
Possible advantages of using WS-Security:
WS-Security UsernameToken
and clients can Google the rest)Possible disadvantages:
Upvotes: 4