views:

71

answers:

1

Hi All,

Can someone please let me know if unsigned SAML 2.0 or 1.1 is natively supported on WCF .Net 4.0. I know that Signed SAML 1.1 is natively supported on WCF and SAML 2.0 is natively supported on WIF but I am not able to find any material regarding unsigned SAML.

+1  A: 

Not natively. The out of the box SAML 1.1 and SAML 2.0 token handlers sign the tokens. To supoort unsigned tokens you need to create your own token handlers that inherit from

Microsoft.IdentityModel.Tokens.Saml11.Saml11SecurityTokenHandler
Microsoft.IdentityModel.Tokens.Saml2.Saml2SecurityTokenHandler

override the signiture creation/validation methods, there is a bunch of them, and do nothing in your case. The problem is that you need to control the STS services that issue tokens to you as well which might be difficult if they are not under your control.

Cosmin Onea
Thanks a lot for your reply.
rauts
Good News is that we will be creating a on premise STS service over which we can full control. So if i understand correctly, I can create SAML 1.1 and 2.0 signed and unsigned Tokens. And if i need to support Unsigned 2.0 tokens, i will have to create my own token handlers as u mentioned. Do you have any sample code for this implementation? Thanks a lot again.
rauts
Unfortunately I have no sample code for this, but look at the classes themselves and look at the overridable methods to understand where you need to plug in your code. What I would do is override all methods, just call the base impl in overrides, and set breakpoints in them to see what the flow of processing the token is. Hand craft an unsigned token and pass it to your service and see what method breaks and fix it by simply returning. This is in no way a security design advice :). Can I ask why you dont want to sign the tokens?
Cosmin Onea
There are use cases where I have to support Unsigned SAML tokens as well. the Service request would be signed anyways so signing the SAML token would add an overhead. So we have to support unsigned SAML tokens as well.
rauts
Allright, I have not done this before myself, but you need to play with the guts of the token handlers.
Cosmin Onea
Thanks for all the information. I think i will be able to close this with all the pointers u have provided.
rauts