AD FS 2.0: How to Change the Local Authentication Type

AD FS 2.0: How to Change the Local Authentication Type

AD FS 2.0, out of the box, supports four local authentication types:

  1. Integrated Windows authentication (IWA) - can utilize Kerberos or NTLM authentication. You should always prefer Kerberos authentication over NTLM and configure the appropriate service principal name (SPN) for the AD FS 2.0 service account so that Kerberos can be used. Credential collection can happen in two ways depending on how your browser is configured:
    1. automatic logon with current user name and  password - used when AD FS 2.0 URL is in IE Intranet Zone or another IE Zone which is configured to automatically logon with current user name and password
    2. Browser-based HTTP 401 authentication prompt - used when credentials cannot be automatically supplied to the 401 challenge for credentials
  2. Forms-based authentication (FBA) - A forms-based .aspx page is presented to the user containing username and password fields. This page is fully customizable so that you can add new sign-in logic or page customizations (logos, style sheet, etc.)
  3. Transport layer security client authentication - a.k.a. Client certificate authentication or Smart Card authentication. The credential is supplied by selecting an appropriate client authentication certificate.
  4. Basic authentication - The web browser displays a credential prompt and the credentials supplied are sent across the network. The advantage of Basic authentication is that it is part of the Hypertext Transfer Protocol (HTTP) specification, and is supported by most browsers. The disadvantage is that Web browsers that use Basic authentication transmit passwords in an unencrypted form. If a non-user monitors communications on your network, they can easily intercept and decipher these passwords by using publicly available tools. Therefore, Basic authentication is not recommended unless you are confident that the connection between the user and your Web server is secure; direct cable connections or a dedicated lines are secure connections.

By default AD FS 2.0 Federation Servers use IWA and AD FS 2.0 Federation Server Proxy servers use FBA. The reason for this is because we assume that you would prefer no credential prompt for your internal users who can directly contact your internal Federation Servers, and we also assume that users who are coming from the internet via the Federation Server Proxy servers would not be able to experience integrated Windows authentication, thus a customizable forms-based page is the best fit.

If you prefer to select a non-default local authentication type, perform the following steps:

  1. In Windows Explorer, browse to C:\inetpub\adfs\ls (assuming that inetpub lives in C:\)
  2. Select web.config and Edit in Notepad
  3. Find (Ctrl+F) <localAuthenticationTypes>
  4. There are four lines below <localAuthenticationTypes>. Each line represents one of the local authentication types listed above.
  5. Cut your preferred local authentication type (the entire line), and Paste it to the top of the list (under <localAuthenticationTypes>)
  6. Save and Close the web.config file

Note: There is no need to restart IIS or make any further changes. Your change will be immediately picked up by IIS since you edited the web.config.

Example:

If I want to change the local authentication type for my internal Federation Servers from IWA to FBA, the resultant web.config section would look like this:

  <microsoft.identityServer.web>
    <localAuthenticationTypes>
      <add name="Forms" page="FormsSignIn.aspx" />
      <add name="Integrated" page="auth/integrated/" />
      <add name="TlsClient" page="auth/sslclient/" />
      <add name="Basic" page="auth/basic/" />
    </localAuthenticationTypes>


Also see Windows Identity Foundation (WIF): How to Utilize the WS-Federation WAUTH Parameter to Specify an Authentication Type

 

Leave a Comment
  • Please add 7 and 6 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Adam Conkle - MSFT edited Original. Comment: Author should be Adam Conkle - MSFT

Page 1 of 1 (1 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Adam Conkle - MSFT edited Original. Comment: Author should be Adam Conkle - MSFT

  • What if you wanted a mix of IWA and FBA.  I have some users that use common workstations.  For most users we want IWA but for a few we want FBA.  Or a special link that forces FBA when the default is IWA.  Somthing similar to ?LoginToRp

  • Hi realcoder,

    WS-Federation provides WAUTH as a query string parameter, and SAML 2.0 provides RequestedAuthNContext for authN method selection at runtime. You could also modify the AD FS 2.0 sign-in pages to implement authN method selection in the UI, multi-factor authN, or similar.

    Sorry for the severe lapse in time before responding. :)

    Thanks,

    Adam

  • Can I add two <localAuthenticationTypes>

    I have two pages for FormsSignIn.aspx and FormsSignInMobile.aspx

    one is for normail browser, another is for mobile phone browser.

Page 1 of 1 (4 items)