Question

I am developing an asp.net MVC web application that will be deployed in the cloud and should support the following authentication scenarios:

  1. Transparent authentication for domain users on an intranet. These users should be able to access the application without signing in.
  2. Forms login for arbitrary non-domain users on the internet. These users should be presented with a login page using Forms authentication, and membership is managed internally by the application.
  3. Forms login for domain users on the public internet. They should be able to use the same login form as non-domain users, but sign in with their domain credentials instead.

Active Directory Federation Services (ADFS) with passive authentication can cover cases #1 and #3. Since it redirects to the federation provider's login page, it doesn't cover the #2 case. I understand active authentication by my application could possibly support all three cases, however there is not much documentation around on how this would be implemented.

Ideally there should be a way for my application to authenticate a domain username and password with the ADFS federation provider.

Does anyone know whether this is possible, and if so, how?

Was it helpful?

Solution

The standard pattern for this is ADFS with a split DNS - IWA for intranet and Forms for internet.

However, ADFS can ONLY authenticate against AD so option 2 can't be achieved.

I would suggest using IdentityServer for option 2 - you may have to customise it depending on your "flavour" of membership - and then federate ADFS and IdentityServer.

IdentityServer is free / open source.

OTHER TIPS

To expand on nzpcmad's answer, you can set up Claims Provider trusts other than Active Directory in the ADFS Management console under Trust Relationships > Claims Provider Trusts, they effectively chain ADFS with custom STS services.

The entries you add will be added to the Home Realm discovery page within the ADFS web site, such that authenticating users will be presented with a drop-down list to essentially choose the Claims Provider they wish to be authenticated against.

Automatic sign-in will still work for internal users who choose your Active Directory (ADFS provider), whilst members of other Providers will be redirected to their chosen Claims Provider's web site, which will typically present a Forms login page and authenticate against a back-end membership database, all external users (who are not able to present an NTLM or Kerberos token will be required to enter their details - for AD users this will mean they have to enter their domain\user string (or user@domain) and internal password.

Of course, you have to create these providers yourself, in the old WIF days this meant using the fairly clunky Custom STS template, however you can now streamline the procedure with a simple OWIN-based MVC5 site. Alternatively, as nzpcmad suggests, you could look at using IdentityServer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top