Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Posting a SAML token to ASP.NET MVC website

I have a claims aware MVC website setup using the Thinktecture Identity Server. I now have a requirement to allow a 3rd party to access certain parts of the website.

Is it possible to programmatically authenticate with the Identity Server and post this to the website so that the user at the 3rd party is not required to manually go through the normal login process?

I have previously used the identity server to obtain a SAML token for the purpose of making WCF calls, I was wondering if it would be possible to re-use some of this approach?

The complications arise from the fact that the 3rd party are using a desktop based Java app with some browser component built in for accessing the MVC website. Users are already authenticated with the desktop app so we don't want them entering credentials again to view these web pages.

like image 277
KevB Avatar asked Jan 13 '14 11:01

KevB


1 Answers

Hmm, tough one to solve in a secure fashion. Basically I don't trust desktop apps ;-)

You might be looking for some sort of federation. Basically it is about letting your Identity Server trust the 3rd party (by means of signature). Your Identity Server would then use a SAML token from 3rd party as login information and generate a new SAML token (signed by you) to forward to the the MVC web application. I think Dominick has a video or two about it, but not sure it meets your requirements. Take a look at https://github.com/thinktecture/Thinktecture.IdentityServer.v2/wiki

The Java desktop app probably cannot create a signed SAML token, so you could consider using "something else". Preferably something signed from where they logged in the first time.

You should avoid having your web app trust anyone but your own Identity Server / Identity Provider.

Hope this helps? Happy to help where I can :-)

like image 167
Henrik N. Avatar answered Nov 10 '22 13:11

Henrik N.