How to implement SAML 2.0 in ASP.NET MVC 4

  • Thread starter Thread starter Mandy Ace
  • Start date Start date
M

Mandy Ace

Guest
I'm developing an MVC 4 web application in C# and want to handle login using an existing SAML 2.0 identity provider. I am using HTTP POST binding with SimpleSAMLphp.

It seems like, in .NET 4.5, I should be using Windows Identity Foundation. I tried to install the Identity and Access Tool. (I am using Visual Studio 2013, which is supposed to have this tool integrated, but VS2013's version doesn't support "re-entrancy", meaning I can't use it to add WIF support to my existing application.)

After pointing the Identity and Access Tool to my IDP's metadata, I get this error message:

1465956.png

Apparently, this is the error message that indicates that SAMLP 2.0 is not supported by WIF. This seems to be distinct from SAML 2.0 tokens, which are supported.

After entering my entity ID and SAML endpoint, the SamlConfigTool promptly crashed. Okay, maybe I don't need to use the configuration tool and I can just copy what's done in the sample ServiceProvider VS project. After migration, I'm able to open the project in VS2012, but it's not clear to me exactly how it works — it doesn't seem to contain any C# code, just new entries in Web.config. It's not clear to me how I should adapt this configuration to replace the custom login code in my MVC 4 app, and in any case relying on a dead library from 3 years ago doesn't seem like a great idea.

So, what is the best way to implement SAML 2.0 in ASP.NET MVC 4?

Continue reading...
 

Similar threads

H
Replies
0
Views
82
How to implement SAML with ASP.NET application
H
T
Replies
0
Views
82
Tarık Memil
T
D
Replies
0
Views
145
Deep K
D
Back
Top