OIDC setup
OIDC is the recommended protocol for modern IdPs (Okta, Azure AD, Google Workspace, Keycloak).1. Register the application in your IdP
Create a new application or OAuth 2.0 client in your IdP. Configure it as a server-side (confidential) client with the authorization code flow. Set the redirect URI to:2. Note the IdP values
From your IdP’s application settings, collect:- Issuer URL (also called the discovery URL or
oidc-configurationendpoint) - Client ID
- Client Secret
3. Configure the engine
Set the following environment variables:4. Required claims
The engine reads the following claims from the issued ID token:| Claim | Required | Recorded in audit as |
|---|---|---|
sub | Yes | principal.user_id |
email | Yes | principal.user_email |
sid or jti | No | principal.idp_session_id |
email claim in the ID token. Most IdPs include this by default but it may require adding the profile or email scope.
SAML 2.0 setup
Use SAML for IdPs that do not support OIDC, or when SAML is your organization’s standard (common in government environments with Active Directory Federation Services or similar).1. Obtain the engine’s service provider metadata
After installation, the engine exposes its SAML metadata at:2. Configure the engine
3. Required attributes
The engine reads the following SAML attributes from the assertion:| SAML Attribute | Required | Recorded in audit as |
|---|---|---|
NameID | Yes | principal.user_id |
email or http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress | Yes | principal.user_email |
SessionIndex | No | principal.idp_session_id |
email attribute is included in the SAML assertion.
Supporting both SSO and API keys
To allow both SAML/OIDC users and service account API keys simultaneously:both is set, the engine accepts either a Bearer JWT token (OIDC) or an X-API-Key header. Requests using API keys are attributed to the service account in the audit log. Requests using SSO tokens are attributed to the individual user.
Testing authentication
After configuration, test SSO authentication:200 response confirms authentication is working. A 401 with "code": "token_invalid" indicates a claims or issuer configuration mismatch. Check OIDC_ISSUER_URL and OIDC_AUDIENCE.