# Ping Identity SAML (QUX)

{% hint style="warning" %}
**Please Note:**

This article is **ONLY** for customers configuring SAML SSO for **Quadrant UX (QUX)** deployments using Ping Identity **as the IdP**.

While similar, there are some differences in the implementation for customers using the Respond UX. If you are unsure which UX you are using, please see: [Vectra Analyst User Experiences (Respond vs Quadrant) for more information](https://docs.vectra.ai/deployment/getting-started/analyst-ux-options-rux-vs-qux).

The Quadrant UX requires different SAML claim names than the Respond UX when setting up SAML 2.0 based SSO but the claim creation process in the IdP is similar.
{% endhint %}

## Ping Identity SAML Support

Ping Identity offers several different products. Vectra has validated SAML SSO functionality using PingOne. PingFederate should also work but our validation was done specifically using PingOne. Vectra's SAML implementation is based on the SAML 2.0 standard and should work with any IdP. A non-vendor specific article is available here:

* [Setup SAML SSO with any IdP (on-prem UI)](https://docs.vectra.ai/configuration/access/saml-sso-qux/any-idp-saml-qux)

## Introduction

* Customers can setup SSO federation to multiple SAML 2.0-based identity providers (IdP).
  * For most customers, only a single IdP is required.
* Once federated, already authenticated users will have one-click login in to the Vectra Quadrant UX.
* Unauthenticated users will get redirected to their IdP’s login portal.
* If multiple IdPs are configured, and the user is not already authenticated, the user will need to enter their email address so the domain name mapping can direct the user to the appropriate IdP.
* Features like password policies and multi-factor authentication will be enforced by the IdP.
* Once authenticated, users are assigned the Vectra role defined for their user or group in the IdP.
  * This will map to a role (and permissions) as defined in the Vectra Quadrant UX UI.

## Multiple SAML Profile Support

Vectra now supports multiple SAML profiles in private preview. Not all customers will require this, and NO changes are required for existing single IdP SAML configurations. If you are interested in this feature prior to it's planned general availability in the v9.10 release, please ask your Vectra account team.

{% hint style="info" %}
**Please Note:**

* Existing customers do **NOT** need to do anything if they will continue to only have a single SAML IdP configured.
* Any new profile that is added, for new or existing customers, will now need to have a **Domains** list configured as part of the Vectra SAML profile.
* If you add a 2nd profile to an existing deployment that did **NOT** have a **Domains** list configured previously, you **MUST** edit that existing profile to add the **Domains** mapping for that IdP.
* Nothing changes on the IdP side of the configuration.
* When multiple profiles are configured, users will be asked to enter their email address to be redirected to the appropriate IdP when they click **Login with SSO** on the Vectra login screen.
  {% endhint %}

## QUX SAML SSO - Notes of Interest

* **Please ensure the users are only mapped to one Vectra Role in the IdP.**
  * At this time, if a user is mapped to more than 1 role in the IdP, the user may not successfully log in with the desired role.
* IdP initiated flows are **NOT** supported.
  * While these flows may work, they are not recommended because they are highly susceptible to Man-in-the-Middle attack using stolen SAML assertions.
* The `SessionNotOnOrAfter` SAML parameter is supported to invalidate user sessions and require a user to re-authenticate.
* Single Log Out (SLO) and IdP initiated log out are **NOT** supported.
  * When a user logs out of the Quadrant UX, they are taken to a screen where they can log in locally or click a link to **Log in via SSO**.

<figure><img src="https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-c3455be19ad71725ab7b0cc0ea47b1f5fa2e064b%2F9c010e9fe101f9505d65aab3753357ab97072add384f3569620b994f0db96d9c.jpg?alt=media" alt="" width="280"><figcaption></figcaption></figure>

* At this time, a user who successfully authenticates through their IdP to Vectra will have a session that is good for one day.
* **Local login is still possible after SAML configuration:**
  * Construct a login URL as shown below.
  * `https//<ip_or_hostname>/accounts/login/?local=True`
* API keys are not supported for SAML users.
  * For API use, Vectra recommends local accounts authenticated locally or against external authentication sources such as RADIUS, LDAP, or TACACS+.
* Token Encryption is currently **NOT** supported.

## SAML Service Provider (SP) Initiated Flow

* This example flow diagram uses Azure as the IdP but SSO should work with any SAML 2.0 compliant IdP.
* Please note that all communication is brokered by the User Agent (user's browser). Vectra never needs to communicate with the IdP.

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-ae2b8d1bb08be8cb845143dbd7a27c38de213bc8%2F646bda414d5f547c525e5c7c8dc6974b6b3fcff0532da96cb3313eef44964b58.png?alt=media)

## Configuration Steps

### Start SAML Profile Creation in Vectra UI

* First we'll need to start creating the SAML Authentication Profile.
  * Additional profiles can be configured if multiple IdPs are required for your deployment.
* Open a new browser tab, log in as you normally do, and navigate to *Configuration → ACCESS → External Authentication.*
* Click on **Create** in the SAML Profiles section.

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-43357412e28cf8704fae2292b03da1ee7ad5b647%2Fany-idp-saml-rux-2.jpg?alt=media)

* A dialog will open and the **SP ACS URL** and **SP Entity Provider** will be displayed there for entry into the corresponding fields in the IdP. Make note of these values for later use with your IdP. The SP is the Service Provider (your Vectra QUX deployment in this case).

{% hint style="info" %}
**Please Note:**

* Not every IdP uses the same terminology to refer to these fields.
* As an example, in Entra ID, Vectra's **SP Entity Provider** URI should be used for the Azure **Identifier (Entity ID)** and Vectra's **SP ACS URL** should be used for the Azure **Reply URL (Assertion Consumer Service URL)**.
  {% endhint %}

<figure><img src="https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fz1J1V6M7uPQtZa5WvE1M%2Fimage.png?alt=media&#x26;token=1980162a-d584-4bb1-b312-bdec313e3b6f" alt="" width="563"><figcaption></figcaption></figure>

* Leave this tab in your browser open and proceed in another tab or window to your IdP configuration so that you can configure the IdP side and retrieve the required metadata XML file needed to complete the Vectra configuration.

{% hint style="info" %}
**Please Note:**

If you want a hostname-based entry instead of IP-based entry for the **SP ACS URL** and **SP Entity Provider**, then you should:

* Configure in Vectra the Brain FQDN, in *Configuration → COVERAGE → Data Sources → Network → Brain Setup → Brain → DNS Name.*
* Check the **DNS Name** radio button for the **For linking in alerts/notifications (except AWS SecurityHub)** section.
* This will populate the SP entries using hostname instead of IP.

**Please Also Note:**

The **DNS Name** should be in lowercase in this area and any place you see it in your IdP.]
{% endhint %}

![Configuration → COVERAGE → Data Sources → Network → Brain Setup → Brain](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-add172a937e809ffb6e191be256abdba6ae98c89%2F63ab184b40970e8c9b56862267b01c5df005f4f8573ae3ca9e96b474edbd3de3.jpg?alt=media)

### PingOne Group Mapping to Vectra Standardized Role Name

* PingOne does not allow admins to create roles, but the only thing that matters is that the claims passed in a SAML assertion contain the proper attributes that Vectra needs for a user.
* Below you will create groups using each Vectra standardized role name as the group name in Ping and then later map the required attribute for Vectra to the **Group Names** that were configured.
* Other required attributes are already standard when a user is created in Ping and are the **Given Name** and **Email Address**.
* In PingOne, go to *Identifies → Groups* and add groups taking care to ensure the **Group Name** exactly matches all Vectra standardize role names that the customer will be using.
  * Default standardized role names are as follows:
    * `admins`
    * `read_only`
    * `restricted_admins`
    * `security_analyst`
    * `setting_admins`
    * `super_admins`
  * Any custom roles that you define in Vectra will have their own unique standardized role names that can be used as well.

    * Standardized Names are found in the Vectra UI at *Configuration → ACCESS → Roles* and then edit any role to see the **Standardized Name**:

    <figure><img src="https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-e0c69c7e4cbf2df4821e3ae2d0da11fb6cc74d6f%2F3fc25a0084ed385c94616dfe784d3545923c4eb6b424b8e228e6703e29b23476.jpg?alt=media" alt="" width="375"><figcaption></figcaption></figure>
  * When done you should have at least one group to test with:

<figure><img src="https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-2f309e3f21d597775b0eb250ee7a90eb93c4758a%2Fa5e99f12a0380454cda7dd9ed543d0da4adb9b9a9f30897f5aa33a79603c6ab7.jpg?alt=media" alt="" width="375"><figcaption></figcaption></figure>

* Create groups in a similar manner for all Vectra roles that you will be using.
* Finally, map all your PingOne users that will require access to the Vectra UI to the appropriate group.

### PingOne SAML App Setup

* In Ping Identity, go to *Connections → Applications* and create a new application.
  * Enter the application name:
    * e.g. **Test SSO on-prem**.
  * The **Description** field should also be filled in with something explaining the use of the application.
* Choose **SAML Application** and click **Save** and then **Configure**.

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-0c663d41bab40f966498f32ad85cbbcf52c079ee%2F3075f9ba430152d4d543540efb1a56b5d59703edb8639f541b6ea549af5df9db.jpg?alt=media)

* On the next page there are three options:
  * Import Metadata - Not supported by Vectra.
  * Import from URL - Not supported by Vectra.
  * **Manually Enter - Select this option.**
* Map the **SP ACS URL** and **SP Entity Identifier** we collected from Vectra earlier as follows:
  * Enter the **SP ACS URL** from the Vectra UI into the **ACS URLs** field in Ping.
  * Enter the **SP Entity Identifier** from the Vectra UI into the **Entity ID** field Ping.

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-4f5f454cb6edd19107f88ccb1a9c90a4a28503a3%2F615b4de67b8e9c1eb0a789e31f56001b073f468dd3a3e3112173f3c9e9f1fcc6.jpg?alt=media)

* Click **Save** in Ping.
* In your Ping application go to **Attribute Mapping** and click on the **pencil** to edit.
* Add the following attribute mappings to the default `saml_subject` that Ping provides.

<table><thead><tr><th width="583.94921875">Attributes</th><th width="164.546875">PingOne Mapping</th></tr></thead><tbody><tr><td><code>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name</code></td><td>Given Name</td></tr><tr><td><code>http://schemas.xmlsoap.orq/ws/2005/05/identity/claims/emailaddress</code></td><td>Email Address</td></tr><tr><td><code>https://schema.vectra.ai/role</code></td><td>Group Names</td></tr></tbody></table>

* Click **Save** in Ping.
* In Ping, go to Configuration and **Download Metadata** for use in the next step.

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-4af011978fde9f704c366e8d2e24974a72bf9e7d%2F18facd51e5e7d24879a4ac309a943e83a101cb687a758d75d1a6bc40a7eb1f44.jpg?alt=media)

* Enable the SAML application created in Ping Federate.
  * This toggle is available under *Connections → Applications → the Application you created*:

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-c9648b27f133a481441fa78ddcfb53522126dc8d%2Ffbc8c83102102baccf813d8d2f144a4706af8cf35518c0f74235044b666ca6f1.jpg?alt=media) ![](https://confluence.vectra.io/download/attachments/136026324/image-2023-1-27_13-57-12.png?version=1\&modificationDate=1674845834236\&api=v2)

### Completing Vectra Configuration

* After IdP configuration and downloading the IdP Metadata XML file you can complete the configuration in the Vectra UI.
* Click **Select a file** next to **Upload IDP Metadata XML File** in the **Create SAML Profile** window.
* Fill in the **Profile Name** with a name.
* Fill in the **Domains** field with the domains that should map to the SAML IdP you are configuring.
  * For example, if you username is `user@company.com`, then you would enter `company.com`.
  * When multiple SAML profiles are configured, users will enter an email address after clicking **Login with SSO**.
  * Based on the user input and mapped domains, the user will be redirected to the appropriate IdP for authentication and then redirected back to Vectra with a SAML assertion.
* Click **Create.**

<figure><img src="https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2FkXLRUAFA2UV7Atajiku3%2Fimage.png?alt=media&#x26;token=a9d4d9ab-aea4-4886-bff1-0e76d5521083" alt="" width="563"><figcaption></figcaption></figure>

## Testing

* Once configuration is complete on both the Service Provider (Vectra) and IdP side, you are ready to test SAML SSO to Vectra.
  * Keep in mind that only users and groups who are mapped to standardized Vectra role names in your IdP will succeed.
* Click the **Login with SSO** button on the login page for your Vectra QUX deployment.

<figure><img src="https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2FG2AmR83b8uTqYnRnoEra%2Fimage.png?alt=media&#x26;token=cd8681ff-89c5-44c0-97de-b73e89fe63d6" alt="" width="375"><figcaption></figcaption></figure>

* If you are already authenticated to your IdP, and have a mapping to a standardized role that exists in Vectra, you should be logged in without requiring any additional steps.
* If you are need to authenticate to your IdP, you will be asked for a email address when multiple profiles are configured and redirected to your IdP for authentication and then redirected back to Vectra and presented the UI with your mapped role permissions applied.

<figure><img src="https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-4640c6d79a875d69eb1ff1761b76e16ae9c2e0cf%2Fany-idp-saml-rux-9.jpg?alt=media" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
**Please Note:**

After SAML configuration, local login using username/password is still supported via a different URL constructed as follows:

* `https//<ip_or_hostname>/accounts/login/?local=True`

* For users not participating in SSO, please ensure they have this new URL to login to Vectra.
  {% endhint %}

* After login, you can see your status under *My Profile.*

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-7a0f9ecdc61c3bc588f6aba0d1ca6c480d15b3da%2F7d2ce171c4b24bf5da1e21c41cd5a67ae04a07e09977c419d115971930c253e6.jpg?alt=media)

* If you have rights to the *Configuration → ACCESS > Users* screen, you can see all user logins.
  * SAML users are shown with a `SAML:` prefix.
  * SAML users are not locally defined in your Vectra deployment, they exist in the IdP and the configuration allows them to login to your Vectra deployment.

<figure><img src="https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2FCSAsxrmET8WXZ2dYn2NH%2Fimage.png?alt=media&#x26;token=f43cc6eb-ce1b-4e1a-a6ea-0efbadfe0a23" alt=""><figcaption></figcaption></figure>
