> ## Documentation Index
> Fetch the complete documentation index at: https://ngrok.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Wallix Trustelem SSO (SAML)

> Use Wallix Trustelem SAML to secure access to ngrok endpoints with single sign-on.

> [!NOTE]
>
> This guide refers to using SSO to authenticate access to your **endpoints**. You cannot use these instructions to set up SSO for logging into your ngrok account in the dashboard.

This guide walks you through configuring Wallix Trustelem as the primary Identity Provider (IdP) for ngrok endpoints using single sign-on (SSO).
By integrating Wallix Trustelem SSO with ngrok, you can:

* Restrict access to ngrok endpoints only to users authenticated via Wallix Trustelem
* Use Wallix Trustelem security policies and multi-factor authentication (MFA) authenticators
* Use Wallix Trustelem's dashboard to facilitate access to ngrok apps

## What you'll need

* A Wallix Trustelem account with administrative rights to create apps.
* An ngrok Pay-as-you-go account with an authtoken or admin access to configure endpoints with SAML.

## 1. Configure Wallix Trustelem

In the WALLIX Trustelem administration console, add a SAML 2 application from the generic models and download its metadata XML.
See WALLIX's [SAML 2 application reference](https://trustelem-doc.wallix.com/books/trustelem-applications/page/saml-2) for the configuration details.

You upload this metadata to ngrok in the next step, then return to the app to enter ngrok's service provider (SP) Entity ID and Assertion Consumer Service (ACS) URL.

## 2. Configure ngrok

> [!WARNING]
>
> The SAML Traffic Policy action is in [early access](https://ngrok.com/docs/gateway/traffic-policy/actions/saml.md).
> [Request access](https://dashboard.ngrok.com/early-access) to configure SAML via Traffic Policy.

Once you have early access, create a `policy.yaml` file with the following content, replacing `YOUR_IDP_METADATA_XML` with the IdP metadata XML from Wallix Trustelem:

```yaml theme={null}
on_http_request:
  - actions:
      - type: saml
        config:
          idp_metadata: 'YOUR_IDP_METADATA_XML'
```

The SAML action generates your ngrok SP Entity ID and ACS URL from your endpoint URL.
See the [SAML action documentation](https://ngrok.com/docs/gateway/traffic-policy/actions/saml.md) for how to retrieve these values.

> [!NOTE]
>
> This step assumes you have an app running locally (for example, on `localhost:3000`) with the ngrok agent installed.

Start an endpoint with this policy, replacing `3000` with your local web app port and `YOUR_DOMAIN` with your ngrok domain:

```bash theme={null}
ngrok http 3000 --traffic-policy-file policy.yaml --url YOUR_DOMAIN
```

Copy the URL next to **Forwarding**.
You use it to test Wallix Trustelem authentication.

## 3. Link Wallix Trustelem with ngrok

* In the WALLIX Trustelem administration console, click **Apps** and then click your application.
* On the **Settings** popup, click **Edit**, then paste your ngrok **SP Entity ID** in the **EntityID** field and your ngrok **ACS URL** in the **Assertion Consumer Service** field.
* Click **Save**.

To sign in, use a Wallix Trustelem account that can reach the app.
Create a test user in Trustelem if you need one.

## 4. Test the integration

* In your browser, launch an incognito window.
* Access your ngrok endpoint (for example, `https://trustelem-sso-test.ngrok.app` or the copied URL).
* When prompted, log in with your Wallix Trustelem credentials.
* After you log in, you see your web app.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.