# PingIdentity Configuration

## Steps to follow

* [Create a new Application](#create-a-new-application)
* [Set up Single Sign-On](#set-up-single-sign-on)
  * [Configure Attributes](#configure-attributes)
* [Enter PingIdentity's metadata into Sleuth](#enter-pingidentitys-metadata-into-sleuth)
  * Option 1: Link to metadata file
  * Option 2: Input metadata manually
* [Assign Groups to the Application](#assign-groups-to-the-application)

## Create a new Application

Sign in to **PingIdentity** as an administrator. In the left-hand menu, expand the " **Applications**" section and click "**Applications**:

<figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2FGz8NwBn0Vs0JqklznYWN%2Fimage.png?alt=media&#x26;token=ac27d652-d62e-4957-83a9-e961a3f619ed" alt=""><figcaption></figcaption></figure>

On the "**Applications** "page click the :heavy\_plus\_sign:  icon to add a new Application. In the "**Add Application**" pane provide an "**Application Name**" (*e.g., Sleuth*), a "**Description**" and an "**Icon**" for the Application, select "**SAML Application**" as the "**Application Type**", and click "**Configure**":

<figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2Fxd7EArIjEJEhKy4q6tW6%2Fimage.png?alt=media&#x26;token=13c23918-eacc-4438-9689-72358f4ec18e" alt=""><figcaption></figcaption></figure>

## Set up Single Sign-On

You have the choice between **Importing Metadata** (*from a file you downloaded from Sleuth*), **Importing from URL**, or **Manually Entering** the metadata into PingIdentity.

{% tabs %}
{% tab title="Import Metadata" %}
On the "**SAML Configuration**" page, select "**Import Metadata**", and click "**Select a file**" to find and select the metadata file on your computer (*click* [*here*](https://help.sleuth.io/settings/organization/signup/saml#gather-sleuth-service-provider-metadata) *to find out how to download the file*):

<figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2FHs2yTEjoGTTFUehPuYw1%2Fimage.png?alt=media&#x26;token=8ba54e9c-db68-4059-81a9-8f2bb2b200f0" alt=""><figcaption></figcaption></figure>

The "**ACS URLs**" and "**Entity ID**" fields will populate automatically. Click "**Save**".
{% endtab %}

{% tab title="Import From URL" %}
On the "**SAML Configuration**" page, select "**Import From URL**", **paste the following URL** into the "**Import URL**" field, and click "**Import**":

```url
https://app.sleuth.io/saml/metadata/
```

<figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2FUDhiTFx5zxtDL7gHlMn2%2Fimage.png?alt=media&#x26;token=93f15bbe-88fd-4408-ba7c-1117df1210a8" alt=""><figcaption></figcaption></figure>

The "**ACS URLs**" and "**Entity ID**" fields will populate automatically. Click "**Save**".
{% endtab %}

{% tab title="Manually Enter" %}
On the "**SAML Configuration**" page, select "**Manually Enter**", and **fill in the necessary metadata** (*found in Sleuth*), using the following reference:

| PINGIDENTITY  | SLEUTH                     | EXAMPLE                                |
| ------------- | -------------------------- | -------------------------------------- |
| **ACS URLs**  | Assertion Consumer Service | `https://app.sleuth.io/complete/saml/` |
| **Entity ID** | SAML Entity ID             | `https://app.sleuth.io/saml/metadata/` |

Click "**Save**".
{% endtab %}
{% endtabs %}

On the Application, switch to the "**Configuration**" tab, and click the **pencil icon** to enter edit mode:

<figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2Fx4yKF5c2yv5X9b0YKz04%2Fimage.png?alt=media&#x26;token=4af62f04-94c8-4448-8f8f-fd3b2800cbd3" alt=""><figcaption></figcaption></figure>

**Fill in any missing metadata** (*found in Sleuth*), using the following reference:

| PINGIDENTITY                 | SLEUTH                     | EXAMPLE                                                                                |
| ---------------------------- | -------------------------- | -------------------------------------------------------------------------------------- |
| **ACS URLS**                 | Assertion Consumer Service | `https://app.sleuth.io/complete/saml/`                                                 |
| **ENTITY ID**                | SAML Entity ID             | `https://app.sleuth.io/saml/metadata/`                                                 |
| **SLO ENDPOINT**             | Single Logout Service      | `https://app.sleuth.io/saml/sls/`                                                      |
| **SUBJECT NAMEID FORMAT**    | n/a                        | `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`                               |
| **TARGET APPLICATION URL**   | Default Relay State        | (unique to each Sleuth org, usually your `orgSlug`)                                    |
| **VERIFICATION CERTIFICATE** | Sleuth x509 Certificate    | if not already filled in, can be found in Sleuth (*needs to be saved as a `crt` file*) |

Leave other settings as they are and click "**Save**".

### Configure Attributes

Once again on the Application, switch to the "**Attribute Mappings**" tab, and click the **pencil icon** to enter edit mode:

<figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2FgkiForKZiEw024Xld5tE%2Fimage.png?alt=media&#x26;token=2117ce50-f2c5-4c7f-a67d-d915f302e9a2" alt=""><figcaption></figcaption></figure>

Edit the default Attribute `saml_subject` from `User ID` to `Email Address`, click the `...` to reveal the contextual menu, and click `Update NameFormat`:

<figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2FNFIVtYkdNLIzB2gThQZu%2Fimage.png?alt=media&#x26;token=3eb3168c-80b7-4c02-82b7-226b43734f9f" alt=""><figcaption></figcaption></figure>

Select `urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified` from the list of options and click "**Update**":

<figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2FkIUJR5kzNrguAR0RmUeu%2Fimage.png?alt=media&#x26;token=3337b15b-f85a-4c91-8969-23b336aaee00" alt=""><figcaption></figcaption></figure>

Add the remaining required Attributes using the following reference and click "**Save**" when done:

| Attributes   | PingOne Mappings | NameFormat                                          |
| ------------ | ---------------- | --------------------------------------------------- |
| `first_name` | Given Name       | `urn:oasis:names:tc:SAML:2.0:attrname-format:basic` |
| `last_name`  | Family Name      | `urn:oasis:names:tc:SAML:2.0:attrname-format:basic` |
| `email`      | Email Address    | `urn:oasis:names:tc:SAML:2.0:attrname-format:basic` |

{% hint style="info" %}
Don't forget to **enable your Application** by flipping the toggle!
{% endhint %}

<figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2FLbUNo1jxLtwcy6vLpnn6%2Fimage.png?alt=media&#x26;token=0c1ad185-9b65-4219-b033-a56dd7eb802c" alt=""><figcaption></figcaption></figure>

## Enter PingIdentity's metadata into Sleuth

You can choose between **pointing Sleuth to a URL** where the IdP's metadata is now available, or **entering the metadata into Sleuth manually**.

{% tabs %}
{% tab title="Option 1: Link to metadata file" %}
In PingIdentity on the "**Configuration**" tab on your Application, click the **clipboard icon** next to the "**IDP Metadata URL**" to copy the URL:

<figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2Fci2hKyCqYMVz2FjGxuhk%2Fimage.png?alt=media&#x26;token=14a1e3b1-f07b-4073-b19e-e02c87a724a7" alt=""><figcaption></figcaption></figure>

In Sleuth, click the "**point Sleuth to metadata file URL**" link to trigger the input modal and **paste the copied URL** into the field, then click "**Save**":

<figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2FAxfT0SbWdK5mjkXsWdwC%2Fimage.png?alt=media&#x26;token=4bae5556-7734-4e24-a425-480d1b48960f" alt=""><figcaption></figcaption></figure>

The remaining fields in Sleuth will get **populated automatically**, just click "**Test Metadata and Save**":

<figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2FvBJMz38DQ6iJq50SjmqX%2Fimage.png?alt=media&#x26;token=e066bed2-e82a-462e-aad8-7041909ab091" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Sleuth defaults all of the Advanced configuration to the most commonly used values, but depending on your IdP configuration you might need to adjust "**Advanced settings**".
{% endhint %}
{% endtab %}

{% tab title="Option 2: Input metadata manually" %}
You'll find the data needed for this in PingIdentity on the "**Configuration**" tab on your Application under "**Connection Details**":

<figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2FHOnRuDOhXJpFHrw0InuT%2Fimage.png?alt=media&#x26;token=83e5e20f-99eb-4d53-a210-30bb5b9b36ba" alt=""><figcaption></figcaption></figure>

**Fill in the necessary metadata**, using the following reference, and click "**Test Metadata and Save**":

| SLEUTH          | PINGIDENTITY                 | EXAMPLE                                                                                                         |
| --------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------- |
| **Entity ID**   | Issuer ID                    | `https://auth.pingone.eu/<...>`                                                                                 |
| **SSO URL**     | Single Signon Service        | `https://auth.pingone.eu/<...>/saml20/idp/sso`                                                                  |
| **SLO URL**     | Single Logout Service        | `https://auth.pingone.eu/<...>/saml20/idp/slo`                                                                  |
| **Certificate** | Download Signing Certificate | <p><code>-----BEGIN CERTIFICATE-----</code><br><code><...></code><br><code>-----END CERTIFICATE-----</code></p> |

<figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2FSliMTAg8sH2oJjwEm8Jn%2Fimage.png?alt=media&#x26;token=ca4b942f-35f2-415d-a777-7f4fc7eab439" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Sleuth defaults all of the Advanced configuration to the most commonly used values, but depending on your IdP configuration you might need to adjust "**Advanced settings**".
{% endhint %}
{% endtab %}
{% endtabs %}

## Assign Groups to the Application

On the Application, switch to the "**Access**" tab, and click the **pencil icon** to enter edit mode, and select Group which should have access to this Application, and click "**Save**":

<figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2FLdfcCmQCiNTReFmbmc05%2Fimage.png?alt=media&#x26;token=59a5477d-192e-4e11-a82a-02b22c1f3019" alt=""><figcaption></figcaption></figure>
