Skip to content
Last updated

Configuring a SAML 2.0 Identity Provider for SSO

Treasure AI single sign-on (SSO) uses the SAML 2.0 protocol, so an identity provider (IdP) that supports SAML 2.0 can be connected to a Treasure account. Connecting your IdP lets your users sign in to Treasure Console with the credentials your company already manages, and the sign-in policies you set in your IdP apply to them. Use this page when your IdP doesn't have its own setup guide. For IdPs that do, such as Okta, Microsoft Entra ID, PingFederate, and PingOne, follow the provider guides listed in Single Sign on instead.

Before You Begin

Make sure you have the following before you start:

  • SSO is enabled for your Treasure account. Contact your Customer Success representative to enable it. They provide your account name and Entity ID.
  • Owner or administrator access to Treasure Console.
  • Administrator access to your IdP, so you can create a SAML application and assign users to it.
  • For an IdP that isn't in the Identity Provider Name list, a Treasure AI API key. Get the key from My Settings in Treasure Console.
  • From your IdP: the sign-in endpoint URL, and the signing certificate in .pem format or a metadata XML file. The sign-out endpoint URL is optional.

Know the Limitations

Keep these limitations in mind before you configure SSO:

  • Treasure AI supports only SP-initiated sign-in. Users must start sign-in from the Treasure sign-in URL described in Get the Values from Treasure AI. Sign-in started from an application tile in your IdP's dashboard (IdP-initiated sign-in) isn't supported.
  • Enabling SSO disables Google SSO sign-in for the users of that account.
  • Treasure AI doesn't import users from your IdP. Add each user in Control Panel > Users and set their sign-in method to your IdP.
  • Users added for SSO don't receive an invitation email.
  • Multiple IdPs for one account require enabling by your Customer Success representative.

Get the Values from Treasure AI

Your Customer Success representative provides the account name for your Treasure account. Treasure Console shows the Entity ID in Sign-in Settings. The Entity ID uses this format:

urn:treasuredata:sso:<SITE>:<ACCOUNT_NAME>

Replace <SITE> with the site of your Treasure account, which is one of aws, aws-tokyo, eu01, or ap02. Replace <ACCOUNT_NAME> with your account name.

Users start sign-in from the following URL, which you use as the sign-in URL for your region:

  • US: https://console.us01.treasuredata.com/users/initiate_sso?account_name=<ACCOUNT_NAME>
  • Japan: https://console.treasuredata.co.jp/users/initiate_sso?account_name=<ACCOUNT_NAME>
  • Europe: https://console.eu01.treasuredata.com/users/initiate_sso?account_name=<ACCOUNT_NAME>

For other regions, use the sign-in URL that your Customer Success representative provides.

Register Treasure AI in Your IdP

Your IdP administrator registers Treasure AI as a SAML 2.0 application. Menu names vary by IdP, so use the terms your IdP shows for each value:

  1. Create a new SAML 2.0 application for Treasure AI. Give it a name your users recognize.
  2. Set the Assertion Consumer Service (ACS) URL, which your IdP may call the Single Sign-On URL, Reply URL, or Recipient URL, to https://sso.treasuredata.com/login/callback. This value is the same for all sites and regions.
  3. Set the Audience URI (SP Entity ID) to the Entity ID from Get the Values from Treasure AI.
  4. Set the NameID format to unspecified or emailAddress. Choose the user attribute that identifies each user, such as the email address or a custom identifier. The value your IdP sends must match the identifier set for the user in Treasure Console. See Add Users and Set Their Identifiers.
  5. Get the sign-in endpoint URL from your IdP. Optionally, get the sign-out endpoint URL too.
  6. Download the signing certificate in .pem format, or the metadata XML file if your IdP provides one.

Don't enter the Treasure sign-in URL in the ACS field. The ACS URL is https://sso.treasuredata.com/login/callback. The sign-in URL is the address where users start sign-in.

Configure Sign-in Settings in Treasure Console

If your IdP appears in the Identity Provider Name list, configure the sign-in settings in Treasure Console as described in this section. If your IdP doesn't appear in the list, the console doesn't offer it, so configure it with the REST API instead. See Configure Sign-in Settings with the REST API.

You might be asked to re-authenticate before you can change sign-in settings.

  1. Open Treasure Console and select Control Panel.
  2. Select Sign-in Settings. The Account Name and Entity ID fields are already filled in.
  3. Select the edit tool.
  4. Select your IdP in the Identity Provider Name list.
  5. Enter the Sign-in Endpoint URL, which is the URL your IdP uses for sign-in.
  6. Optionally, enter the Sign-out Endpoint URL.
  7. Upload the Certificate File in .pem format. If your IdP provides a metadata XML file, you can upload it instead of entering the values in steps 5 through 7.
  8. Select Save.

Configure Sign-in Settings with the REST API

Use the REST API when your IdP isn't in the Identity Provider Name list. The request creates the SSO setting for your Treasure account. For all request parameters, see REST API for Identity Federation.

  1. Collect the sign-in endpoint URL and the X.509 certificate from your IdP. Collect the sign-out endpoint URL too, if your IdP provides one.
  2. Convert the certificate to a single line. Keep the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- lines, and separate each base64 line with \r\n.
  3. Create a file named sso_setting.json with the following content. Replace each placeholder with your values. Set setting_name to a unique value without spaces. If your IdP has no sign-out endpoint, set sign_out_endpoint to null.
{
  "sso_setting": {
    "strategy": "samlp",
    "identity_provider_name": "<IDP_DISPLAY_NAME>",
    "setting_name": "<UNIQUE_SETTING_NAME>",
    "sign_in_endpoint": "<SIGN_IN_ENDPOINT_URL>",
    "sign_out_endpoint": "<SIGN_OUT_ENDPOINT_URL>",
    "cert": "-----BEGIN CERTIFICATE-----\r\n<CERTIFICATE_LINES>\r\n-----END CERTIFICATE-----"
  }
}
  1. Replace <API_BASE_URL> with the Treasure API base URL for your account's region and <YOUR_API_KEY> with the API key from My Settings in Treasure Console. Use the same base URL for both requests. For the full list of regional endpoints, see Treasure API base URLs.

    Account RegionTreasure API Base URL
    US (US01)https://api.treasuredata.com
    Japan (AP01)https://api.treasuredata.co.jp
    Europe (EU01)https://api.eu01.treasuredata.com
    Korea (AP02)https://api.ap02.treasuredata.com
    API_BASE_URL='<API_BASE_URL>'
    curl -X POST "${API_BASE_URL}/v3/account/sso_setting" \
      -H "Authorization: TD1 <YOUR_API_KEY>" \
      -H "Content-Type: application/json" \
      -d @sso_setting.json

    A successful request returns 200 OK with the saved sso_setting.

  2. In the same shell, confirm the saved setting with a GET request. Replace <YOUR_API_KEY> with the same API key.

    curl --request GET \
      --url "${API_BASE_URL}/v3/account/sso_setting" \
      --header 'Authorization: TD1 <YOUR_API_KEY>'

Add Users and Set Their Identifiers

Treasure AI matches the identifier your IdP sends to the Unique Identifier of each Treasure user. By default, the identifier is the user's email address. You can also use a custom identifier, such as an employee ID, if your IdP sends that value.

To add a user, follow these steps:

  1. In Treasure Console, select Control Panel > Users.
  2. Select Add User. Enter the user's email address, select your IdP in the Sign-in Method list, and select Same as email address as the Unique Identifier.
  3. Select Add.
  4. In your IdP, assign the user to the Treasure AI application. Users who aren't assigned can't complete sign-in.

To change an existing user to SSO, select the user, select the edit pencil under Details, select your IdP in the Sign-in Method list in the Personal Info dialog, and select Save.

Test Sign-In

Test the connection with a user who is assigned in your IdP:

  1. In Sign-in Settings, select Copy Console Sign-in URL and open the URL in a browser.
  2. Enter your email address or ID as shown on your IdP's sign-in page, and complete authentication.
  3. Confirm that you reach Treasure Console. You can also check your sign-in method in My Settings.

For day-to-day sign-in behavior, see Signing in as an SSO User.

Troubleshooting

Sign-in returns to the default Treasure Console sign-in page

The IdP's ACS URL is set to something other than https://sso.treasuredata.com/login/callback, or the Treasure sign-in URL was entered as the ACS URL. Set the ACS URL in your IdP to https://sso.treasuredata.com/login/callback, and confirm that the sign-in endpoint in Treasure Console is your IdP's URL.

To check the SAML response, capture the sign-in traffic with a browser SAML tracing tool. In the response, the Destination attribute and the SubjectConfirmationData Recipient attribute should both be https://sso.treasuredata.com/login/callback. Treat captures as sensitive, because they contain authentication data.

Sign-in shows the error "Oops, something went wrong"

One of the following is usually the cause:

  • Sign-in started from your IdP's dashboard. Start sign-in from the Treasure sign-in URL instead.
  • The user's Unique Identifier doesn't match the identifier your IdP sends. Set the identifier in the user's Personal Info dialog to match.
  • The NameID format isn't recognized. Set the NameID format in your IdP to unspecified or emailAddress.

The IdP authenticates the user, but sign-in fails

Confirm that the user is assigned to the Treasure AI application in your IdP, and that the user's Sign-in Method in Treasure Console is set to your IdP.

The REST API request fails

Check the following:

  • The certificate has \r\n between each line, and the BEGIN and END lines are included.
  • The setting_name is unique for each SSO setting in the account.
  • The API key has permission to configure SSO.

Next Steps