Category Archives: IdentityModel

Using IdentityModel: Creating Custom Claim Sets

As part of LeastPrivilege.IdentityModel I wrote a claim set derived class that you can use to create your own custom claim sets. The DeferredLoadClaimSet lazily loads the claims (which potentially involves roundtrips to data stores) on demand when the claims … Continue reading

Posted in IdentityModel | Leave a comment

Using IdentityModel: Typical Operations on Claim Sets

In the previous posts I talked about claims and claim sets. Now how do you use claim sets for authorization? Let’s take WCF as an example. In WCF you get access to the system generated claim sets via the AuthorizationContext … Continue reading

Posted in IdentityModel, WCF | Leave a comment

Using IdentityModel: Windows and X509Certificate Claim Sets

In System.IdentityModel.Claims you can find two more specialized claim sets for Windows accounts and X509 certificates called WindowsClaimSet and X509CertificateClaimSet respectively. WCF uses these classes to create claim sets for Windows/certificate clients. But you can also use them “standalone”. The … Continue reading

Posted in IdentityModel | Leave a comment

Using IdentityModel: Inspecting Claim Sets

The following code is useful for inspecting the contents of claim sets:   public static void ShowClaims(IEnumerable<ClaimSet> claimSets){    int count = 0;    foreach (ClaimSet set in claimSets)    {        Heading(String.Format(“Claim Set #{0}”, ++count), ConsoleColor.Yellow);        ShowClaimSet(set, false);    }} private static void ShowClaimSet(ClaimSet … Continue reading

Posted in IdentityModel | Leave a comment

Using IdentityModel: Claim Sets

In the previous post I talked about claims, what they are and how to create them. Usually a claim doesn’t come on its own – but is grouped into a claim set. To create a claim set you either derive … Continue reading

Posted in IdentityModel | Leave a comment

Using IdentityModel: Claims

A claim is a piece of information that you want to associate with an entity (usually a user) in your system. Commonly used claims are e.g. the name of a user or his roles. The usual course of events is, … Continue reading

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

Using System.IdentityModel and LeastPrivilege.IdentityModel

Michael (a reader) recently wrote: “You posted on your blog that System.IdentityModel is not tied to WCF…I understand how the claims, rights, and resources work. And I have created an Authorization Policy that implements IAuthorizationPolicy. But how do I make … Continue reading

Posted in IdentityModel | Leave a comment