SAML SSO
SAML (Security Assertion Markup Language) SSO allows your users to authenticate using your organization's identity provider (IdP). This guide walks you through configuring SAML SSO for your Opik organization.
Prerequisites
Section titled “Prerequisites”Before you begin, ensure you have:
- Organization admin access to Opik
- Admin access to your identity provider (Okta, Azure AD, OneLogin, etc.)
- Enterprise plan enabled for your organization
- Email domain you want to use for SSO (e.g.,
company.com)
Configuration overview
Section titled “Configuration overview”Setting up SAML SSO involves two main steps:
- Configure your IdP: Add Opik as a SAML application in your identity provider.
- Configure Opik: Enter your IdP's SAML settings in Opik's admin dashboard.
Step 1: Choose Opik's Service Provider (SP) URLs
Section titled “Step 1: Choose Opik's Service Provider (SP) URLs”Choose matching Service Provider (SP) URLs and enter them in both Opik and your identity provider (IdP).
- In Opik, navigate to Admin Dashboard > Organization > Authentication.
- Toggle Enable SSO Authentication on. The SP and IdP form fields appear only once SSO is enabled.
- Set both the SP Entity ID and the SP ACS URL to the same URL, in the format
https://<your-app-base-url>/sso/saml/acs/<organization-id>. Your app base URL is the origin you use to access the admin dashboard (for example,https://www.comet.com). Your organization ID is visible in the admin dashboard URL. The last path segment is used internally as the routing key for SAML responses to your organization.
Step 2: Configure your identity provider
Section titled “Step 2: Configure your identity provider”Add Opik as a new SAML application in your IdP. The specific steps vary by provider, but you'll generally need to:
- Create a new SAML application.
- Enter Opik's SP Entity ID and ACS URL.
- Configure attribute mappings (see below).
- Download or copy the IdP metadata (Entity ID, SSO URL, certificate).
Required attribute mappings
Section titled “Required attribute mappings”Your IdP must send the following attributes in the SAML assertion:
| Attribute name | Description | Required |
|---|---|---|
guid |
Unique identifier for the user | Yes |
email |
User's email address | Yes |
firstName |
User's first name | Recommended |
lastName |
User's last name | Recommended |
Workspace sync attributes (optional)
Section titled “Workspace sync attributes (optional)”If you want to automatically assign users to workspaces based on IdP attributes:
| Attribute name | Description |
|---|---|
workspaces |
Comma-separated list of workspace names |
groups |
User's group memberships (can be mapped to workspaces) |
Step 3: Configure Opik
Section titled “Step 3: Configure Opik”Once your IdP is configured, enter the settings in Opik:
- Navigate to Admin Dashboard > Organization > Authentication.
- Select SAML as the SSO protocol.
- Enter the following settings:
Required SAML settings
Section titled “Required SAML settings”| Field | Description | Example |
|---|---|---|
| Domain | Email domain for SSO users | company.com |
| SP Entity ID | Your Service Provider Entity ID | https://<your-app-base-url>/sso/saml/acs/<organization-id> |
| SP ACS URL | Assertion Consumer Service URL | https://<your-app-base-url>/sso/saml/acs/<organization-id> |
| IdP Entity ID | Your IdP's Entity ID | https://idp.company.com/... |
| IdP SSO URL | URL where users authenticate | https://idp.company.com/sso/saml |
| IdP X.509 Certificate | Public certificate for signature verification | -----BEGIN CERTIFICATE-----... |
Optional SAML settings
Section titled “Optional SAML settings”| Field | Description | Default |
|---|---|---|
| SP Private Key | Private key for signed requests | Not required |
| Sync Workspaces | Enable automatic workspace assignment | Disabled |
| IdP Debug | Enable verbose logging for troubleshooting | Disabled |
| Default Workspace | Workspace for users without workspace attributes | Organization default |
Field reference
Section titled “Field reference”SP Entity ID
Section titled “SP Entity ID”The Service Provider Entity ID uniquely identifies Opik to your IdP. This value should be:
- A URL of the form
https://<your-app-base-url>/sso/saml/acs/<organization-id>, set to the same value as the SP ACS URL. - Entered identically in both Opik's SSO configuration form and your IdP's SAML application configuration.
- Consistent between Opik and your IdP (case-sensitive).
ACS URL (Assertion Consumer Service)
Section titled “ACS URL (Assertion Consumer Service)”The ACS URL is where your IdP sends the SAML assertion after successful authentication:
- Must be an HTTPS URL.
- Must match exactly between Opik and your IdP configuration.
- Opik validates this URL when processing assertions.
IdP Entity ID
Section titled “IdP Entity ID”Your identity provider's unique identifier. Find this in your IdP's SAML metadata or configuration:
- Okta: Found in the SAML setup instructions or metadata XML.
- Azure AD: The "Identifier (Entity ID)" in the SAML configuration.
- OneLogin: The "Issuer URL" in the SSO settings.
IdP SSO URL
Section titled “IdP SSO URL”The URL where users are redirected to authenticate. This is the entry point for the SAML authentication flow:
- Usually ends in
/sso/samlor similar. - Found in your IdP's SAML configuration or metadata.
IdP X.509 Certificate
Section titled “IdP X.509 Certificate”The public certificate used to verify SAML assertion signatures:
- Must be in PEM format (starting with
-----BEGIN CERTIFICATE-----). - Download from your IdP's SAML configuration.
- Multiple certificates can be provided if your IdP is rotating keys.
Workspace synchronization
Section titled “Workspace synchronization”Enable workspace sync to automatically assign users to workspaces based on IdP attributes.
Enabling workspace sync
Section titled “Enabling workspace sync”- In the SSO configuration, enable Sync Workspaces.
- Configure your IdP to send workspace information as a SAML attribute.
- Map the attribute to Opik workspace names.
How workspace sync works
Section titled “How workspace sync works”When a user authenticates via SAML with workspace sync enabled:
- Opik reads the workspace attribute from the SAML assertion.
- User is added to the specified workspaces (created if they don't exist).
- User is removed from workspaces not listed in the attribute.
Attribute format for workspaces
Section titled “Attribute format for workspaces”The workspace attribute should contain a comma-separated list of workspace names:
engineering,data-science,ml-platformEnsure workspace names match exactly (case-sensitive).
IdP-specific configuration guides
Section titled “IdP-specific configuration guides”Configuring Okta
- In Okta Admin Console, go to Applications > Create App Integration.
- Select SAML 2.0 and click Next.
- Enter an app name (e.g., "Opik") and click Next.
- Configure SAML settings:
- Single Sign-On URL: Your ACS URL from Opik
- Audience URI (SP Entity ID): Your SP Entity ID from Opik
- Name ID format: EmailAddress
- Application username: Email
- Add attribute statements:
guid→user.idemail→user.emailfirstName→user.firstNamelastName→user.lastName
- Complete the wizard and assign users/groups.
- Copy the IdP Issuer, Single Sign-On URL, and X.509 Certificate to Opik.
Configuring Azure AD
- In Azure Portal, go to Azure Active Directory > Enterprise applications.
- Click New application > Create your own application.
- Select Integrate any other application you don't find in the gallery.
- Go to Single sign-on > SAML.
- Edit Basic SAML Configuration:
- Identifier (Entity ID): Your SP Entity ID from Opik
- Reply URL (ACS URL): Your ACS URL from Opik
- Edit Attributes & Claims:
- Ensure
emailclaim is configured - Add custom claims for
guid,firstName,lastName
- Ensure
- Download the Certificate (Base64).
- Copy the Azure AD Identifier and Login URL to Opik.
Configuring OneLogin
- In OneLogin Admin, go to Applications > Add App.
- Search for "SAML Custom Connector (Advanced)" and add it.
- Configure the application:
- Audience (EntityID): Your SP Entity ID from Opik
- ACS URL: Your ACS URL from Opik
- ACS URL Validator: Your ACS URL (escaped for regex)
- Go to Parameters and add:
guid→ User IDemail→ EmailfirstName→ First NamelastName→ Last Name
- Go to SSO tab and copy:
- Issuer URL → IdP Entity ID
- SAML 2.0 Endpoint → IdP SSO URL
- X.509 Certificate → IdP Certificate
Testing the configuration
Section titled “Testing the configuration”After configuring both Opik and your IdP:
- Open an incognito/private browser window (to avoid cached sessions).
- Navigate to Opik's login page.
- Enter an email address with your configured domain.
- You should be redirected to your IdP for authentication.
- After authenticating, you should be redirected back to Opik and logged in.
Troubleshooting
Section titled “Troubleshooting”Common issues
Section titled “Common issues”| Issue | Possible cause | Solution |
|---|---|---|
| "Invalid SAML response" | Certificate mismatch | Verify the IdP certificate is correctly copied |
| User not redirected to IdP | Domain not configured | Check the domain setting matches user email |
| "User not found" | Missing required attributes | Verify guid and email attributes are mapped |
| Wrong workspace assignment | Attribute mapping issue | Check workspace attribute format and sync settings |
| Certificate validation error | Expired certificate | Update the IdP certificate |
Troubleshooting checklist
Section titled “Troubleshooting checklist”- Verify domain configuration: Ensure the email domain matches your SSO configuration.
- Check Entity IDs: Both SP and IdP Entity IDs must match exactly (case-sensitive).
- Validate ACS URL: The ACS URL must be identical in both Opik and your IdP.
- Review attribute mapping: Ensure
guidandemailattributes are sent by your IdP. - Check certificate format: Certificate should be in PEM format with headers.
- Test with debug enabled: Enable IdP Debug to see detailed error messages.
- Check IdP logs: Review your identity provider's logs for SAML errors.
Getting help
Section titled “Getting help”If you continue to experience issues:
- Gather debug logs with IdP Debug enabled.
- Capture the SAML assertion (available in browser developer tools or IdP logs).
- Contact Opik support with the logs and assertion for assistance.
Next steps
Section titled “Next steps”- Configure OIDC as an alternative SSO method.
- Set up JWT authentication for programmatic access.
- Manage users and their workspace assignments.