Polarity v4 Admin Guide
Polarity v5 Admin Guide
  • Sever Requirements
    • Deployment Methods
      • Deploying Polarity Server on AWS with RDS and Elasticache
      • Deploying Polarity Server Virtual Machine on Azure
      • Deploying via OVA
      • Deploying via RPM
      • Polarity Server BYOL AMI
  • Guides
    • Installing License
    • Authentication
      • SAML
        • Azure ADFS
        • Okta
        • SAML Troublshooting
      • LDAP Troubleshooting
    • Installing Private Certificate Authority
    • Installing SSL Certificate
      • Installing LetsEncrypt SSL Certificate on Polarity Server
    • Configuring a Proxy
    • Migrating Polarity Servers
      • Upgrade PostgreSQL to v13
    • Enabling SMTP
    • Server Environment Variables
    • File System Layout
    • Configuring a FQDN
    • Enabling Source Analytics
      • Elasticsearch
        • Configuring Source Analytics on Elasticsearch
        • Source Analytics Integration with Elasticsearch
    • v5 Server Pre-Flight Upgrade Check
  • Integrations
    • Auto Subscribe CLI Tool
    • Installation
    • Install Multiple Copies of an Integration
    • Modifying Integration Name & Acronym
    • Add Custom Entity Types
Powered by GitBook
On this page
  • Azure - App Creation
  • Azure - Single Sign On
  • Basic SAML Configuration
  • Attributes & Claims
  • SAML Certificates
  • Login URL
  • Azure - Users and groups
  • Polarity Server SAML Configuration
  1. Guides
  2. Authentication
  3. SAML

Azure ADFS

Configure SAML authentication with Microsoft Azure ADFS

PreviousSAMLNextOkta

Last updated 2 years ago

Polarity SAML authentication should work with any identity provider (IdP) given the application is set up correctly within the identity provider's account. This guide walks through configuring Polarity SAML Authentication with Azure ADFS.

The following link provides steps on how to setup SSO in Azure ADFS:

Polarity specific setup instructions can be found below.

Azure - App Creation

Navigate to the Azure Active Directory Admin Center

From the left navigation menu select "Enterprise applications" -> "New Application" -> "Create your own application".

Name your app (e.g., "Polarity") and select the radio button for "Integrate any other application you don't find in the gallery (Non-gallery)".

Azure - Single Sign On

Once the application is created select the option to "Set up single sign on". You may also find this option in the left navigation menu.

Select the "SAML" single sign-on method.

Basic SAML Configuration

In the "Basic SAML Configuration" block, click on the "Edit" icon

On the Basic SAML Configuration page fill in the Identifier and Reply URL as specified below.

Identifier (Entity ID)

https://<your-polarity-server-fqdn>

Reply URL (Assertion Consumer Service URL)

https://<your-polarity-server-fqdn>/v2/saml/assertion

Sign on URL (Optional)

Optional but can be set to:

https://<your-polarity-server-fqdn>

Replace <your-polarity-server-fqdn> with the fully qualified domain name of your Polarity server.

Relay State (Optional)

This is not needed

Logout Url (Optional)

This is not needed

Once you have filled in the "Identifier" and "Reply URL" click on the "Save" button.

Attributes & Claims

Next click on the "Edit" button in the "Attributes & Claims block.

The page will show two columns. A "Claim name" column and a "Value" column. You will need to identify three required values when configuring SAML on the Polarity Server:

  1. An email value

  2. A username value

  3. A full name value

In most cases there will already be an email address (user.mail) and username (user.userprincipalname) claim.

For the full name value we suggest creating a new claim by clicking on the "Add new claim" and filling in the following values:

  • Name: displayname

  • Source: Attribute

  • Source attribute: user.displayname

Click on "Save" when done.

You will now want to save the "Claim name" for the user.mail, user.displayname, and user.userprincipalname values. The Claim name for each of these values will be used when configuring SAML on the Polarity Server.

SAML Certificates

From the "SAML Certificates" block, download the "Certificate (Base64)" file. We will use this file in the next steps when we configure SAML on the Polarity Server.

Login URL

Copy the "Login URL" from the 4th block. You will use this URL as the "SAML endpoint URL" when configuring the SAML on the Polarity Server.

Azure - Users and groups

We recommend controlling access to Polarity by granting access to the Polarity application in Azure via the Users and groups settings within the app.

Polarity Server SAML Configuration

Login to the Polarity Server as an admin via your browser and navigate to "Server Configuration" in the left navigation panel.

Click on the "Client Authentication" tab at the top of the page.

From the "Authentication Method" drop down select "SAML".

Once the SAML authentication method is selected you will need to fill in the following configuration details using information from the Azure app created in the previous steps.

SAML endpoint URL

Enter the "Login URL" which you copied from the "SAML Certificates" block in Azure.

SAML certificate

Open the base64 encoded certificate you downloaded from the "SAML Certificates" block in Azure and paste the contents that falls between "BEGIN CERTIFICATE" and "END CERTIFICATE" into the SAML certificate text area. The content of the certificate should look similar to this:

-----BEGIN CERTIFICATE-----
(this is the certificate content)
-----END CERTIFICATE-----

Only copy the text between the lines -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- when pasting the certificate into the SAML configuration.

If the content of your certificate does not include the BEGIN CERTIFICATE and END CERTIFICATE lines ensure that you downloaded the Base64 version of the certificate note the Raw version.

Sign in button label

You can customize the label on the SAML sign-in button by entering text here.

Username Attribute

The username value should must be a unique value for every user on the system. In most cases s you will want to use the user.userprincipalname value which will have the "Claim name":

http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name

You can also use an email address for the username in which in most cases will be the "Claim name":

http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress

Use the "Claim names" that you copied when configuring SAML in Azure

Email Attribute

The email must be a unique and valid email for each user in Polarity. The Email Attribute will typically use the user.mail value from ADFS.

In most cases, the Email Attribute in Polarity should be set to the following "Claim name":

http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress

Full name attribute

The full name attribute contains the user's given and surname.

In most cases you will want to use the value user.displayname. There is usually no default "Claim name" for the user.displayname attribute. If you added this claim when configuring SAML within Azure then the "Claim name" would be displayname.

displayname

If you did not add a displayname claim when configuring SAML in Azure, you can pick either the user.givenname or user.surname values which are available by default in most cases.

http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname
or
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname

Group attribute

You can optionally set a "Group attribute" which is used to identify which groups the user belongs to. You can then authorize specific groups using the "Authorized groups regular expression" option.

If you leave this blank, all authenticated SAML users will be able authorized to login to the Polarity Server.

We recommend leveraging the "Users and Groups" permissions within Azure ADFS to control which users and groups have access to the Polarity application rather than controlling access from the Polarity Server.

Authorized groups regular expression

Provide one or more groups separated by a pipe (|). More complex group matches can be accomplished with a custom regular expression. The provided regex will be run against the provided "Group attribute" of the user. If the regex passes, the user will be granted access to the Polarity Server.

After entering the required options in Polarity, click on "Apply Changes" in the top right. When you navigate to the Polarity login screen you should now see the option to login via your SAML Identity Provider.

https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/add-application-portal-setup-sso
https://aad.portal.azure.com/