Category Archives: IdentityModel

Using IdentityModel: Some Samples

Here are some typical usage scenario of IdentityPrincipal in ASP.NET. Simple IsInRole calls (checks for a status claim with a value of ‘Gold’): HttpContext.Current.User.IsInRole(“Gold”);   Retrieving the OrderHistory claim: IdentityPrincipal ip = IdentityPrincipal.Current;Claim orderHistory = ip.ClaimSets.FindClaim(  Constants.OrderHistoryClaimType,   Constants.ApplicationIssuerIdentityClaim); var … Continue reading

Posted in ASP.NET, IdentityModel, WCF | Leave a comment

Using IdentityModel: Adding ASP.NET Support Part 2 (Claims Manager)

The last step for integrating claims into ASP.NET is to write a module that loads authorization policies, creates an AuthorizationContext and persists that on Context.User/Thread.CurrentPrincipal. My module has this simple configuration section: <claimsManager enabled=“true“               addAuthenticationClaims=“true“               roleClaimType=“urn:leastprivilege/claims/customers/status“>  <authorizationPolicies>    <policy type=“LeastPrivilege.CustomerIdAuthorizationPolicy, App_Code“ … Continue reading

Posted in ASP.NET, IdentityModel | Leave a comment

Using IdentityModel: Adding ASP.NET Support Part 1 (Authentication based Claims)

Adding claims support to ASP.NET is a perfect candidate for an HTTP module. As a reminiscence to RoleManager, I called mine ClaimsManager. The job of the claims manager is this: Creating claims based on the technical authentication details (Windows, Forms, … Continue reading

Posted in ASP.NET, IdentityModel | Leave a comment

Using IdentityModel: IdentityPrincipal

Since V1 of .NET there is a “slot” to store authorization information about the current user: Thread.CurrentPrincipal. This data gets propagated to newly created threads and is deeply integrated into other application frameworks like ASP.NET. To integrate claims into ASP.NET … Continue reading

Posted in ASP.NET, IdentityModel, WCF | Leave a comment

Using IdentityModel: Adding Claims Support to ASP.NET (Spoiler)

Many people asked me how to use claims based authorization in ASP.NET. While I have it working here on my machine (hey – it works on my machine!), I still need to polish the bits before I can release them. … Continue reading

Posted in ASP.NET, IdentityModel | Leave a comment

STS? Available!

In my Post STS? Coming Soon! I linked to information about the upcoming framework for writing STSes (and more) from Microsoft. Unfortunately this is not yet available. Along with Barry and David I am very happy to announce SharpSTS – … Continue reading

Posted in IdentityModel, WCF | Leave a comment

Using IdentityModel: Authorization Context and Claims Transformation outside of WCF

Here I showed you how to transform authentication specific claims to general application claims. The same model can be also used outside of WCF. I will use a client application here as an example and save ASP.NET for a later … Continue reading

Posted in IdentityModel | Leave a comment

Using IdentityModel: Simplifying Calculation of Information Card Unique IDs in WCF

The key to information card backed systems is calculating a stable unique identifier for your users based on the card claims. Typically this is done by hashing the issuer public key (plus some other information like a PPID for managed … Continue reading

Posted in IdentityModel, WCF | Leave a comment

Using IdentityModel: Claims Transformation in WCF

In the previous post I talked about claims transformation. Two authorization policies are necessary for the scenario I described. The first one maps the “technical” identity to an application identity and the second one creates application specific claims based on … Continue reading

Posted in IdentityModel, WCF | Leave a comment

Using IdentityModel: Authorization Policies, Context and Claims Transformation

In the previous posts I talked about claims and claim sets – but where do claim sets come from? The answer is easy – from authorization policies ;) OK – let’s have a closer look. The “container” for claim sets … Continue reading

Posted in IdentityModel, WCF | Leave a comment