Set Up Okta Directory

In this guide, you will configure Okta as a SAML identity provider for Guardrails. This is a three-step process: create a SAML app in Okta, create the SAML directory in Guardrails, then update the Okta app with the callback URL from Guardrails.

If you want SAML group syncing after setup, see the group sync section at the end of this guide.

Prerequisites

Step 1: Create a SAML App in Okta

  1. Sign in to the Okta admin console.

  2. Navigate to Applications > Applications > Create App Integration.

  3. Select SAML 2.0 as the sign-on method and click Next.

  4. Enter an app name (e.g., Turbot Guardrails) and click Next.

  5. On the SAML settings page, enter placeholder values for now. These will be updated after creating the directory in Guardrails:

    • Single sign-on URL: enter any URL (e.g., https://placeholder.example.com)
    • Audience URI (SP Entity ID): enter any URL
  6. Click Next, then Finish to create the app.

  7. On the app page, go to the Sign On tab and click View SAML setup instructions (or View IdP metadata). Copy these three values. You'll need them for the Guardrails directory:

    • Identity Provider Single Sign-On URL (this becomes the Entry Point)
    • Identity Provider Issuer (this becomes the Issuer)
    • X.509 Certificate (this becomes the Certificate)

Step 2: Create the SAML Directory in Guardrails

  1. Navigate to Workspace > Directories.

  2. Click Create Directory and select SAML.

Create SAML Directory form with Title, Entry Point, Issuer, Certificate, and Profile ID Template fields

  1. Fill in the directory details:
FieldDescription
TitleDisplayed on the login screen. Example: Acme Corp SSO.
DescriptionOptional.
Entry PointThe Identity Provider Single Sign-On URL from Okta.
IssuerThe Identity Provider Issuer from Okta. If this value points to https://www.okta.com/{hash} rather than your workspace URL, do not enable Strict Audience Validation.
CertificateThe X.509 Certificate from Okta. Paste the full certificate including -----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----.
Profile ID TemplateDefault {{profile.email}} works for most cases. Cannot be changed after creation.
  1. Expand Advanced and configure as needed:
OptionGuidance
Allow IdP-Initiated SSOEnable if users will launch Guardrails from the Okta app dashboard. Carries inherent security risks. Consult your security team.
Require Signed Authentication ResponseEnable if your organization requires signed SAML responses.
Strict Audience ValidationOnly enable if the Issuer matches your workspace URL.
  1. Click Create.

  2. Click the new directory to open its detail view. Copy the Callback URL. You'll need this for the next step.

Step 3: Configure Attribute Statements and Callback in Okta

  1. In Okta, navigate to your Guardrails application and click the General tab.

  2. Click Edit next to SAML Settings.

  3. Update the SAML settings:

    • Single sign-on URL: paste the Callback URL from Guardrails.
    • Audience URI (SP Entity ID): paste the Issuer value you entered in the Guardrails directory.
  4. In the Attribute Statements section (not Group Attribute Statements), add the following:

NameName FormatValue
emailUnspecifieduser.email
firstNameUnspecifieduser.firstName
lastNameUnspecifieduser.lastName
loginUnspecifieduser.login
displayNameUnspecifieduser.displayName

[!IMPORTANT] Add these under Attribute Statements, not Group Attribute Statements. Using the wrong section is a common cause of empty profile fields in Guardrails.

  1. Click Next, then Finish.

Step 4: Activate and Test

  1. Back in Guardrails, navigate to Workspace > Directories.

  2. Click the Activate action on the new SAML directory.

  3. Open an incognito or private browser window.

  4. Navigate to your Guardrails workspace URL.

  5. Select the new directory from the login dropdown and sign in with an Okta user assigned to the application.

  6. After signing in, verify the profile was created correctly. Check that the display name, email, and other fields are populated.

  7. The user has no permissions until an administrator grants them.

Group Sync (Optional)

To sync Okta groups to Guardrails profiles:

  1. In the Guardrails directory settings, set Profile Groups Attribute to the SAML attribute name you'll use for groups, enable Allow Group Syncing, and optionally configure a Group Filter regex to limit which groups sync.

  2. In Okta, go to your Guardrails application's General > SAML Settings > Group Attribute Statements. Add a statement with the attribute name matching what you set in Guardrails, and use a regex filter to select the groups you want to sync.

Okta Group Attribute Statements configuration

  1. Groups sync on each user login, not proactively. When a user signs in, their group memberships are updated in Guardrails.

Troubleshooting

IssueSolution
InResponseTo is missing from responseEnable Allow IdP-Initiated SSO in the Guardrails directory advanced settings.
SAML assertion audience mismatchDisable Strict Audience Validation in the Guardrails directory advanced settings, or ensure the Issuer field matches your workspace URL.
Profile fields are empty after loginVerify attribute statements are under Attribute Statements (not Group Attribute Statements) in Okta. Attribute names are case-sensitive.
Directory doesn't appear on the login screenConfirm the directory is Active on the Workspace > Directories page.
User assigned in Okta but can't see the appVerify the user is assigned to the application in Okta under the Assignments tab.

Next Steps