Eric's Blog

Day to day experience in .NET
Welcome to Blogs @ IRM Sign in | Join | Help
 Search

Disclaimer

The content of this site is my own personal opinion and does not in any way represent my employer, it's subsideries or affiliates. These postings are provided "AS IS" with no warranties, and confer no rights.

This Blog

Exposing the SAML Token to the Business Logic

When a business service receives a SAML token, WCF will extract the SAML attributes (containing the information) as claims and make it available as a ClaimSet that can be reached through the AuthorizationContext. This not the way I would like my business logic to work with the information available in the SAML token though, because that will thigh my business logic to WCF. I have instead chosen to expose the information in the SAML token through a custom principal object. This custom principal object has some parts that is equal to ClaimsPrincipal that by Michéle Leroux Bustamente presents in her article, but I have also let the principal object to have specific knowledge of some claims. For example there are standard claims for groups (roles) and user name defined in WS-Federation, that I use and extract to be the user name in the identity object and the roles are used for the IsInRole method.
This solves the problem for me that the business logic code does not need to handle claims (at least not through AuthorizationContext), but could instead use the principal and identity objects that is a common practices already. Beside this, I also have chosen to create an ITokenPrincipal interface that exposes the SAML token, which therefore must be stored in the principal object. The reason I do this is that I want to be able to create a custom behavior for my WCF clients (could be a service calling another service) that adds the SAML token to the call so that the SAML token could flow between services. More on this in later post(s).
Published den 11 december 2007 17:23 by ericqu

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Erics Blog said:

This post continues where the last one left off. We now have a SAML token that is re-serializable, which

december 18, 2007 16:06
 

Erics Blog said:

In my requirements for the STS implementation I wanted to be able to use the SAML token in the client

januari 30, 2008 14:56
 

Erics Blog said:

In my requirements for the STS implementation I wanted to be able to use the SAML token in the client

januari 30, 2008 14:58

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server, by Telligent Systems