Workflows are not supported in your browser.
Please use a recent version of Chrome, Edge, Firefox or Safari to display this page.

SAML Single Sign-On (SSO) for v7

Metric Insights supports Single Sign-On (SSO) authentication, with Users being able to log into Metric Insights via a central Location (Identity Provider - IdP).

  • Metric Insights uses SAML (Security Assertion Markup Language) for authentication,
  • Some common SAML implementations that can be used are by Okta, Microsoft (ADFS), Oracle.

What version of MI are you using?

Video Tutorial - Example of OKTA Setup

Generate Metadata XML from Metric Insights

Download and Verify .xml File Received from IdP

Verify that your IdP defined firstName, lastName, Email and UID attributes in the Metadata key file (the .xml file ).

If not provided in the saml.xml file, these attributes values are to be populated in saml.php file manually:

define('SAML_UID_FIELD', '<name as defined in IdP>'); 
define('SAML_EMAIL_FIELD', '<name as defined in IdP>');
define('SAML_FNAME_FIELD', '<name as defined in IdP>');
define('SAML_LNAME_FIELD', '<name as defined in IdP>');

You can find more information on how to configure Okta (one of IdP providers) for MI SAML SSL setup in our Knowledge Base article

Create saml.php File.

The saml.php file from 5.x can be used on v6.x if the hostname is identical for both instances (the IdP looks for incoming requests from the 'approved' hostname/URL only). You can just place this file in the /opt/mi/external_config directory inside the web container. 

If the hostname has changed for 6.x instance, a new saml.php must be created using metadata for the 6.x instance and a new profile is to be set in the IdP to represent v6.x.

What version of MI are you using?

  1. Copy the .xml file provided by IdP to the MI app server
  2. All the required metadata is going to be given in the response. Copy it and paste into the saml.php file located at /opt/mi/iv/engine/config/saml.php
  3. Parse the .xml file by running the following command:
/opt/mi/iv/data/bin/mi-saml-config.php --input-file <path to saml.xml> --saml-type adfsv3

Check saml.php File Permissions and Owner

SAML Single Sign-On (SSO) | Controlling Access to Metric Insights | Help & Documentation - Google Chrome

We recommend to set:

  • the file access level for 644 (-rw-r--r--)  
  • the owner of the file for www-data:www-data (www-data user in  www-data user group).

You can change the files access using chmod linux command, to change the owner use chown

Enable SAML in Metric Insights

Access Admin > System > System Variables

Enable SAML in Metric Insights
  1. Enter "SAML" in search field
  2. Set the SAML_ENABLED field to 'Y' using edit icon on right
  3. [Commit Changes]

Configure MI Loading Screen Behavior

Optionally, you can change the loading screen behavior from the default message to spinner.

  1. Enter "SAML_LOADING_SCREEN_OPTION" in search field
  2. Click on the gear icon
  3. Configure SAML_LOADING_SCREEN_OPTION:
    • "message": Display text message
    • "spinner": Display loading indicator
  4. [Save]
  5. [Commit changes]

TEST SAML Configuration

1. Change the Admin Password in the saml.php File
2. Login to the SimpleSAML Installation Page as Admin
  1. Click [Login as administrator]
3. Test Authentication Sources

Access the Authentication tab

SimpleSAMLphp installation page - Google Chrome
  1. Click [Test configured authentication sources]
  2. Remembering that you used metricinsights-sp in our very first step, (first step), click on metricinsights-sp to test

If setup correctly, then you will be redirected to your IdP to sign in.

4. Check SAML Fields
Enter your username and password - Google Chrome

Upon successful login you will be redirected back to Metric Insights and the screen will show you the values of SAML FIELDS, so you can check your mapping in saml.php.

Metric Insights supports Single Sign-On (SSO) authentication, with Users being able to log into Metric Insights via a central Location (Identity Provider - IdP).

  • Metric Insights uses SAML (Security Assertion Markup Language) for authentication,
  • Some common SAML implementations that can be used are by Okta, Microsoft (ADFS), Oracle.

This article describes how to configure Metric Insights to work with a SAML-based IdP using Okta as an example. This process comprises the following steps:

  1. Generate Metadata XML from Metric Insights
    1. Access the Installation Page for SimpleSAML in Metric Insights
    2. Copy Metadata
  2. Obtain Metadata XML from Idp
    1. Create New Application in Okta
    2. Configure Application
    3. Provide General Settings
    4. Provide Attribute Statements
    5. Finish Creating Application
    6. View IdP Metadata
    7. Copy IdP Metadata
  3. Finish SAML Configuration in MI Console
  4. Configure MI Loading Screen Behavior

If you're getting the "<Attribute Name> attribute is missing in the assertion or not mapped properly." error, see Getting "attribute is missing in the assertion or not mapped properly." Error.

Congratulations, you are done!