Setting up single sign-on using Active Directory with ADFS and SAML

Recognize supports single sign-on (SSO) logins through SAML 2.0. A SAML 2.0 identity provider (IDP) can take many forms, one of which is a self-hosted Active Directory Federation Services (ADFS) server. ADFS is a service provided by Microsoft as a standard role for Windows Server that provides a web login using existing Active Directory credentials.

Please note this instructions are for ADFS v3.0 and up.

Requirements

To use ADFS to log in to your Recognize account, you need the following components:

  • An Active Directory instance where all users have an email address attribute.
  • A Recognize account with one of our paid packages.
  • A server running Microsoft Server 2012 or 2008. This guide uses screenshots from Server 2012R2, but similar steps should be possible on other versions.
  • A SSL certificate to sign your ADFS login page and the fingerprint for that certificate.

After you meet these basic requirements, you need to install ADFS on your server. Configuring and installing ADFS is beyond the scope of this guide, but is detailed in a Microsoft KB article.

When you have a fully installed ADFS installation, note down the value for the 'SAML 2.0/W-Federation' URL in the ADFS Endpoints section. If you chose the defaults for the installation, this will be '/adfs/ls/'.

Step 1 - Adding a Relying Party Trust

At this point you should be ready to set up the ADFS connection with your Recognize account. The connection between ADFS and Recognize is defined using a Relying Party Trust (RPT).

Select the Relying Party Trusts folder from AD FS Management, and add a new Standard Relying Party Trust from the Actions sidebar. This starts the configuration wizard for a new trust.

wizzard_start.png

  1. In the Select Data Source screen, select the last option, Enter Data About the Party Manually.
    wizzard_metadata.png
  2. On the next screen, enter a Display name that you'll recognize in the future, and any notes you want to make.
  3. On the next screen, select the ADFS FS profile radio button.
    wizzard_profile.png
  4. On the next screen, leave the certificate settings at their defaults.
    wizzard_cert.png
  5. On the next screen, check the box labeled Enable Support for the SAML 2.0 WebSSO protocol. The service URL will be https://recognizeapp.com/domain/saml/acs, replacing domain with your Recognize domain. Note that there's no trailing slash at the end of the URL.
  6. On the next screen, add a Relying party trust identifier of recognizeapp.com.
  7. On the next screen, you may configure multi-factor authentication but this is beyond the scope of this guide.
    wizzard_multi-factor.png
  8. On the next screen, select the Permit all users to access this relying party radio button.
    wizzard_auth.png
  9. On the next two screens, the wizard will display an overview of your settings. On the final screen use the Close button to exit and open the Claim Rules editor.
    wizzard_finished.png

Step 2 - Creating claim rules

Once the relying party trust has been created, you can create the claim rules and update the RPT with minor changes that aren't set by the wizard. By default the claim rule editor opens once you created the trust.

  1. To create a new rule, click on Add Rule. Create a Send LDAP Attributes as Claims rule.
    claim_LDAP_1.png
  2. On the next screen, using Active Directory as your attribute store, do the following:
        1. From the LDAP Attribute column, select E-Mail Addresses.
        2. From the Outgoing Claim Type, select E-Mail Address.
    claim_ldap_2.png
  3. Click on OK to save the new rule.
  4. Create another new rule by clicking Add Rule, this time selecting Transform an Incoming Claim as the template.
    claim_transform_1.png
  5. On the next screen:
        1. Select E-mail Address as the Incoming Claim Type.
        2. For Outgoing Claim Type, select Name ID.
       
    3. For Outgoing Name ID Format, select Email.
    Leave the rule to the default of Pass through all claim values.
    claim_transform_2.png
  6. Finally, click OK to create the claim rule, and then OK again to finish creating rules.

Step 3 - Adjusting the trust settings

You still need to adjust a few settings on your relying party trust. To access these settings, select Properties from the Actions sidebar while you have the RPT selected.

  1. In the Advanced tab, switch from SHA-256 to SHA-1.
  2. In the Endpoints tab, click on add SAML to add a new endpoint.
  3. For the Endpoint type, select SAML Logout.
  4. For the Binding, choose POST.
  5. For the Trusted URL, create a URL using:
        1. The web address of your ADFS server
        2. The ADFS SAML endpoint you noted earlier
        3. The string '?wa=wsignout1.0'
    The URL should look something like this: https://sso.yourdomain.tld/adfs/ls/?wa=wsignout1.0. 
  6. Confirm you changes by clicking OK on the endpoint and the RPT properties. You should now have a working RPT for Recognize.

Step 4 - Configuring Recognize

After setting up ADFS, you need to configure your Recognize account to authenticate using SAML. You'll use your full ADFS server URL with the SAML endpoint as the SSO URL, and the login endpoint you created as the logout URL. The certificate will be the token signing certificate installed in your ADFS instance. 

You can get the certificate by running the following PowerShell command on the system with the installed certificate:

C:\> Get-AdfsCertificate -CertificateType Token-Signing

The certificate needs to be the base64 encoded version, the DER encoded certificate. See these articles:

  • https://blogs.technet.microsoft.com/adhall/2014/02/19/how-to-export-the-ad-fs-token-signing-certificate-with-powershell/
  • https://mssec.wordpress.com/2014/03/06/what-is-the-difference-between-the-formats-der-encoded-and-base64-encoded-when-exporting-a-certificate/

 

After you're done, the SSO Settings page in the Recognize Company Admin should look similar to this:

Screenshot_2017-10-30_11.51.20.png

You should now have a working ADFS SSO implementation for your Recognize account.

ADFS_login.png

 

Attribution credit to Zendesk for their great article on SAML setup here: https://support.zendesk.com/hc/en-us/articles/203663886-Setting-up-single-sign-on-using-Active-Directory-with-ADFS-and-SAML-Professional-and-Enterprise-

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.