Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to integrate AD authentication + SSO with exsisting Forms authenticated Saas web application

We are running a Saas ASP.NET 3.5 Web application using Forms authentication on a IIS 7.5 public server with protected content for thousands of users. We also have some subapplications running ASP.NET MVC 2.

Usernames and passwords are stored in our database and every user has roles and groups attached, with privileges and access rights defined.

Now we have been asked to also facilitate for simple SSO login via Active Directory so that users do not have to enter username and passwords twice to login. These users will originate from different networks and domains.

No user "sync" should take place from our servers to LDAP serves. We are not sure that any communication with LDAP is needed since all users will be created in our system and maintained there. Forms authentication will be used for most of our users.

From here on we are unsure which is the best path to choose. For our scenario what would be the "best practice" way to proceed?

like image 890
Kenneth Avatar asked Feb 19 '13 15:02

Kenneth


People also ask

How does SSO work for SaaS?

SSO works by taking your initial login to a system (for example your PC), encrypting it so it is secure (also called tokenisation) and then using that token to access all other systems automatically without further need for username and password submission.

Which two authentication methods are available for SaaS applications on Azure AD?

Available verification methods The following additional forms of verification can be used with Azure AD Multi-Factor Authentication: Microsoft Authenticator app. Windows Hello for Business. FIDO2 security key.


1 Answers

The simple answer is SAML. It is considered the "best practice" and many large SAAS providers support it.

SAML protocol defines the single sign on flow between multiple systems. It establishes trust between systems using certificates. Your application accepts an assertion containing attributes (user id, name, email address, etc.) from other systems. Your app will map the user into your user store.

In .NET world there are several options. You can find a library that implements SAML (ComponentSpace has one) and hook it into ASP.NET authentication. You can create your own using Windows Identify Framework (WIF). Here's the boatload of WIF videos http://www.cloudidentity.com/blog/2010/06/23/ALL-WILL-BE-REVEALED-7-HOURS-RECORDINGS-FROM-THE-WIF-WORKSHOPS/. You can try IdentityServer http://thinktecture.github.io/

Depending on how secure your app must be, you can opt for a simple option of passing user id from trusted networks using a simplified method. I've seen apps that allow user id to be sent via URL parameter or form field. Of course, this is horribly insecure, and you are taking on more risk, because the trust between two networks is not cryptographically enforced. You can mitigate it somewhat by checking referrer string or IP address (if you can isolate IP range of a corporate network for example). But you are still open to spoofing because any user can impersonate others by simply replacing user id within HTTP request.

It probably doesn't answer your question fully, but hopefully points you in the right direction.

like image 63
Sergey Avatar answered Oct 11 '22 14:10

Sergey