|
| 1 | +--- |
| 2 | +title: Setting Up Auth0 SAML for Single Sign-On |
| 3 | +slug: auth0-saml-setup |
| 4 | +description: Configure Auth0 as a SAML identity provider for PlaidCloud Single Sign-On |
| 5 | +date: 2024-01-01T00:00:00 |
| 6 | +tags: |
| 7 | +- plaidcloud |
| 8 | +- sso |
| 9 | +- saml |
| 10 | +- auth0 |
| 11 | +categories: |
| 12 | +- PlaidCloud |
| 13 | +- Access Management |
| 14 | +--- |
| 15 | + |
| 16 | +PlaidCloud supports Single Sign-On (SSO) via SAML 2.0. This guide walks through configuring Auth0 as a SAML identity provider so your organization's users can authenticate through Auth0 when accessing PlaidCloud. |
| 17 | + |
| 18 | +{{< note >}} |
| 19 | +The PlaidCloud-side configuration is handled by the PlaidCloud team. Your responsibility is to set up the SAML application in Auth0 and provide PlaidCloud with your **Identity Provider Metadata URL**. PlaidCloud support will complete the remaining configuration. |
| 20 | +{{< /note >}} |
| 21 | + |
| 22 | +## Prerequisites |
| 23 | + |
| 24 | +- An Auth0 tenant |
| 25 | +- An Auth0 account with the **Administrator** role |
| 26 | +- Contact with PlaidCloud support to coordinate the setup and exchange configuration values |
| 27 | + |
| 28 | +## Overview |
| 29 | + |
| 30 | +The setup process involves two parties exchanging SAML metadata: |
| 31 | + |
| 32 | +1. **You configure** an application in Auth0 with the SAML2 Web App addon enabled and provide PlaidCloud with your Identity Provider Metadata URL. |
| 33 | +2. **PlaidCloud provides** you with the Service Provider (SP) Entity ID and ACS URL (Assertion Consumer Service URL) needed to complete your Auth0 application configuration. |
| 34 | + |
| 35 | +Coordinate with PlaidCloud support to obtain the SP values before completing Step 3 below. |
| 36 | + |
| 37 | +## Step 1: Create an Application |
| 38 | + |
| 39 | +1. Sign in to the [Auth0 Dashboard](https://manage.auth0.com). |
| 40 | +2. In the left sidebar, navigate to **Applications** > **Applications**. |
| 41 | +3. Click **Create Application**. |
| 42 | +4. Enter a name for the application (e.g., `PlaidCloud SSO`). |
| 43 | +5. Select **Regular Web Applications** as the application type. |
| 44 | +6. Click **Create**. |
| 45 | + |
| 46 | +## Step 2: Enable the SAML2 Web App Addon |
| 47 | + |
| 48 | +1. On the application detail page, select the **Addons** tab. |
| 49 | +2. Click the **SAML2 Web App** addon to enable it. |
| 50 | +3. The addon settings panel will open. Leave it open — you will configure it in the next step. |
| 51 | + |
| 52 | +## Step 3: Configure SAML Settings |
| 53 | + |
| 54 | +{{< note >}} |
| 55 | +You will need the **SP Entity ID** and **ACS URL** from PlaidCloud before completing this step. Contact PlaidCloud support to obtain these values. |
| 56 | +{{< /note >}} |
| 57 | + |
| 58 | +In the **SAML2 Web App** addon settings panel: |
| 59 | + |
| 60 | +1. In the **Application Callback URL** field, enter the ACS URL provided by PlaidCloud. |
| 61 | +2. In the **Settings** JSON editor, set the `audience` field to the SP Entity ID provided by PlaidCloud: |
| 62 | + |
| 63 | +```json |
| 64 | +{ |
| 65 | + "audience": "your-sp-entity-id-from-plaidcloud", |
| 66 | + "mappings": { |
| 67 | + "email": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", |
| 68 | + "given_name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname", |
| 69 | + "family_name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" |
| 70 | + }, |
| 71 | + "nameIdentifierFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", |
| 72 | + "nameIdentifierProbes": [ |
| 73 | + "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" |
| 74 | + ] |
| 75 | +} |
| 76 | +``` |
| 77 | + |
| 78 | +3. Click **Enable** (or **Save**) to apply the settings. |
| 79 | + |
| 80 | +## Step 4: Retrieve and Send the Identity Provider Metadata URL |
| 81 | + |
| 82 | +Once the addon is enabled, locate the metadata URL and send it to PlaidCloud so the integration can be completed. |
| 83 | + |
| 84 | +1. In the **SAML2 Web App** addon settings panel, select the **Usage** tab. |
| 85 | +2. Copy the **Identity Provider Metadata** URL (formatted as `https://{your-auth0-domain}/samlp/metadata/{client-id}`). |
| 86 | + |
| 87 | +**Send this Metadata URL to PlaidCloud support.** This is the Entity Descriptor URL that PlaidCloud needs to configure the trust relationship on the identity provider side. Once PlaidCloud receives this URL, the team will complete the Keycloak configuration and notify you when SSO is ready to test. |
| 88 | + |
| 89 | +## Step 5: Configure Attribute Mappings for Groups (Optional) |
| 90 | + |
| 91 | +If your PlaidCloud configuration uses group-based security role assignments, you can pass group membership through the SAML assertion using Auth0 rules or actions. |
| 92 | + |
| 93 | +### Using Auth0 Actions |
| 94 | + |
| 95 | +1. In the left sidebar, navigate to **Actions** > **Library**. |
| 96 | +2. Click **Build Custom** and create a new action for the **Login / Post Login** trigger. |
| 97 | +3. Add logic to append group information to the SAML assertion. For example, if groups are stored as user metadata: |
| 98 | + |
| 99 | +```javascript |
| 100 | +exports.onExecutePostLogin = async (event, api) => { |
| 101 | + const groups = event.user.app_metadata?.groups || []; |
| 102 | + api.samlResponse.setAttribute("groups", groups); |
| 103 | +}; |
| 104 | +``` |
| 105 | +
|
| 106 | +4. Deploy the action and add it to the **Login** flow. |
| 107 | +
|
| 108 | +{{< note >}} |
| 109 | +Discuss with PlaidCloud support which group attribute name and format are expected so that group-based security role assignments work correctly in PlaidCloud. |
| 110 | +{{< /note >}} |
| 111 | +
|
| 112 | +## Step 6: Control User Access |
| 113 | +
|
| 114 | +Auth0 controls which users can authenticate based on the connections and rules attached to the application. |
| 115 | +
|
| 116 | +1. On the application detail page, select the **Connections** tab. |
| 117 | +2. Enable the appropriate connections (e.g., your organization's database connection, Active Directory, or social connections) for this application. |
| 118 | +3. Disable any connections that should not have access to PlaidCloud. |
| 119 | +
|
| 120 | +To restrict access to specific users within a connection, use Auth0 Actions or Rules to allow or deny authentication based on user attributes or group membership. |
| 121 | +
|
| 122 | +## Testing the Integration |
| 123 | +
|
| 124 | +After PlaidCloud confirms the configuration is complete: |
| 125 | +
|
| 126 | +1. Navigate to your organization's PlaidCloud Workspace (e.g., `https://my-workspace.plaid.cloud`). |
| 127 | +2. You will be redirected to the Auth0 sign-in page (or your configured connection's login). |
| 128 | +3. Sign in with your Auth0 credentials. |
| 129 | +4. Upon successful authentication, you will be redirected back to PlaidCloud. |
| 130 | +
|
| 131 | +If you encounter errors, verify that: |
| 132 | +- The Application Callback URL and audience match exactly what PlaidCloud provided |
| 133 | +- The SAML2 Web App addon is enabled on the application |
| 134 | +- The `nameIdentifierFormat` is set to the email address format |
| 135 | +- The Metadata URL you sent to PlaidCloud is accessible |
| 136 | +- The user's connection is enabled on the application |
0 commit comments