Friday, September 25, 2015

WIF : Replacement for SelfSTS.

If you've been around like I have since the early days of WIF 1.0, VS 2010 and FedUtil, you will know about Vittorio's magic tool called SelfSTS which provided a really simple STS with configurable claims that you could use for testing without the hassle of running up a real IDP.

And then it disappeared and there was much chaos in the ranks over at stackoverflow.

There was also the "Identity and Access Tool" from VS 2012 - also late lamented and gone.

I found EmbeddedSts from thinktecture a while back but ran it up recently when I needed a quick STS for prototyping and was impressed.

It uses the .NET 4.5 library.

It's a NuGet package installed via:

Install-Package Thinktecture.IdentityModel.EmbeddedSts

There is a json file called "EmbeddedStsUsers.json" in the application's App_Data folder, If it's not there, it simply creates one viz:

Then you change the WIF web.config entry e.g.

wsFederation passiveRedirectEnabled="true" issuer="https://EmbeddedSts" realm="https://xxx" requireHttps="true" 

and when you access the application, you get:

Depending on who you sign on as, you get a different set of claims.

Note: Just like SelfSTS, you don't actually have to authenticate by typing in a user name and password. Clicking the "Sign In" button automatically generates a SAML token.

Very neat!


No comments: