Hello everyone!
I want to integrate authentication using Azure ACS in our Azure application. Currently we simply store a username/password combination in the database, authenticate with a WCF SOAP service using a
UserNamePasswordValidator, and let the user fill in his credentials in a forms page inside our Silverlight application. But moving towards ASP.NET MVC 4 hosting, additionally ASP.NET Web API services and the
demand to offer single sign on using the active directory, we see urge to work on this.
I already managed to get basic authentication working using some tutorials on the internet. I added the Azure ACS STS to my project, added our project as a Relying Party Application and added Live as an Identity Provider. Now I automatically get authenticated
using my Live login, and I get an obscure identification value in the nameidentifier-claim. But from here I'm clueless and unsure how to go on. Ultimately we need to be able to use our existing created users in the database.
First problem would be: How do I identify the users? So I got this cool unique nameidentifier. But how can I now connect this to my user? My first thoughts are to add a custom ClaimsAuthenticationManager. Here I retrieve the nameidentifier, look up the database
if this nameidentifier is connected to any user (User 1:n NameIdentifier) and return a custom ClaimsPrincipal containing my an data object with the user information. In order to connect the nameidentifier to a user, I'd always redirect to a special identification-page,
where the (with ACS) authenticated user can enter their application username and password, attaching the nameidentifier to the user. Is this a good approach, or are there any other suggestions?
Additionally to a Live / ADFS identity provider I'd need to offer a fallback solution, by letting the user just enter their username and password. Can I somehow do this just having a formular in my web application? Or do I need to write a new identity provider?
For the second case, can I integrate this into my existing MVC 4 project? Information, suggestions and articles are most welcome!
Due to special needs every customer has their own database and their own deployment. Some of them also have their own active directory, some not. Therefor I'd need to have different Relying Party Applications and different Identity Provider. But how would
I set up which Relying Party Application this currently is? I obviously can't change the the web.config at run time, so I need to have a way to set this up by code at run time. All customer related settings are stored in the ServiceConfiguration file.
When I have multiple Identity Provider, does the user still authenticate automatically, when he is logged in in any of those?
At the end we want to use this authentication in our normal ASP.NET MVC 4 web project, in a legacy SOAP service, in a ASP.NET WebAPI, using normal MVC 4 applications, Silverlight (inside browser and out of browser), Windows Phone 7 and Javascript clients.
I hope someone can enlighten and help me a bit. :)