Skip to main content

SAML

Pactflow supports single sign on using the SAML authentication protocol.

Once SAML has been configured, if the database contains no users, the first user to log in will be assigned the Administrator role, and every user thereafter will receive the default (User) role.

Configuration

A SAML provider is configured by a set of environment variables prefixed with PACTFLOW_SAML_. See the SAML section of the environment variables page for the full list.

Assertion Consumer URL

This is the endpoint to which the IDP will post the SAML assertion after the user is authenticated. It is also called the "sign on URL", "reply URL", and "callback URL", depending on your IDP. You will need to configure this value in your IDP when you set up the Pactflow service provider.

The URL is https://<your Pactflow host>/auth/saml/callback.

Metadata URL

The Pactflow SAML service provider metadata URL is available at https://<your Pactflow host>/auth/saml/metadata.

Configuring multiple SAML providers

In Pactflow 1.7.0 and later, multiple SAML providers may be configured. To configure a second SAML provider, create another set of the SAML environment variables with the prefix PACTFLOW_SAML_2_ (and PACTFLOW_SAML_3_ for the third, etc). The PACTFLOW_SAML_ISSUER does not need to be specified again, as it is shared between all SAML providers.

The callback path for the second provider is /auth/saml/2/callback, and for the third /auth/saml/3/callback etc. The path for the metadata for subsequent SAML providers will be /auth/saml/2/metadata, /auth/saml/3/metadata etc.

Configuring Azure Active Directory

  • Follow the Microsoft documentation for creating a non gallery application.

    • Choose Non-gallery application at the Add your own app screen.
    • Set the name to Pactflow On-Premesis when prompted.
  • When the application has been created, assign the users that should be allowed to login to Pactflow.

  • Once the users have been assigned, select the Single sign-on tab. Select SAML.

  • Set the Identifier (Entity ID) to https://pactflow.<your company domain> eg. https://pactflow.mycompany.com. This field must match the [PACTFLOW_SAML_ISSUER]../(environment-variables#pactflow_saml_issuer) environment variable.

  • Set the Reply URL to https://<your Pactflow host>/auth/saml/callback

  • Leave the Sign On URL, Relay State and Logout Url fields blank.

Configure the Pactflow environment variables

You can find a template for the required environment variables here.