OIDC SSO
Claustrum supports OIDC login per workspace with provider-managed identity and role sync.
Identity Model
- User identity key is
(issuer + subject)from OIDC claims. - Email is treated as profile data only and may change.
- Identity records are stored in
user_identities.
Provider Configuration
Admin UI path:
- Workspace -> SSO Settings (OIDC)
Provider fields:
issuer_urlclient_idclient_secretclaim_groups_name(default:groups)claim_groups_format(idrecommended)scopes(default:openid profile email)enabled
Login Flow
Endpoints:
GET /v1/auth/oidc/:workspace_key/startGET /v1/auth/oidc/:workspace_key/callback
Flow:
- Start endpoint creates PKCE challenge + signed state token.
- User authenticates in IdP.
- Callback exchanges code for tokens.
id_tokensignature is verified via IdP JWKS.(issuer, sub)is upserted touser_identities.- Group mappings are applied to workspace/project memberships.
- Session token is issued.
Group Claim Format
id: Stable group IDs from IdP (recommended).name: Human-readable names. Renames in IdP can break mapping behavior.
Provider Examples
Okta
- Issuer:
https://<your-okta-domain>/oauth2/default - Scopes:
openid profile email groups - Groups claim: often
groups(configure in authorization server claims)
Microsoft Entra ID
- Issuer:
https://login.microsoftonline.com/<tenant-id>/v2.0 - Scopes:
openid profile email - Group claim: configure app manifest for group IDs (recommended)
Security Notes
- Never use email as stable identity key.
- Use
claim_groups_format=idwhenever possible. - Keep client secrets rotated and restricted to required redirect URIs.