security
Intended Documentation
Identity Provider Operations
Inspect tenant identity readiness, run the OIDC/SAML SSO flows, and operate SCIM v2 provisioning — exact endpoints, readiness states, auth requirements, and failure modes.
Identity Provider Operations#
The identity surface has three parts: a readiness view that tells you whether a tenant's SSO is fully configured, the SSO runtime endpoints that execute the OIDC/SAML flows, and SCIM v2 endpoints for provisioning users and groups from your IdP.
Inspect tenant identity readiness#
The identity object reports readiness, identityProviderType (oidc · saml · null), the issuer / metadata URL, domainHints, allowPasswordFallback, breakGlassEnabled / breakGlassContacts, and a metadata.runtime block listing exactly which configuration fields are still missing.
Readiness states#
Readiness is derived from the configuration, not stored independently:
| State | Meaning |
|---|---|
not_configured | No identity provider configuration is present |
partial | Some configuration exists, but required fields are missing — metadata.runtime.notes lists them (e.g. "OIDC client secret is required.") |
ready | All required fields are present; the SSO flow will run |
For OIDC, ready requires issuer, client ID, client secret, and redirect URI. For SAML, it requires the SP entity ID, the ACS URL, the IdP signing certificate, and an IdP metadata URL or SSO URL.
SSO runtime endpoints#
The SSO flows are public (skip-auth) routes — they are how a user obtains a session — so they are not behind the admin permission check. The portal app uses the /amp/* prefix; the backoffice app uses /ebo/*.
Portal (OIDC + SAML):
GET /amp/auth/sso/startGET /amp/auth/sso/callbackPOST /amp/auth/sso/saml/acs
Backoffice (OIDC):
GET /ebo/auth/sso/startGET /ebo/auth/sso/callback
SAML ACS is portal-only
The SAML assertion consumer endpoint (POST /amp/auth/sso/saml/acs) exists only on the portal (/amp) flow. The backoffice (/ebo) flow is OIDC start/callback only — there is no /ebo/auth/sso/saml/acs. SSO callbacks only succeed when the tenant's identity readiness is ready.
SCIM v2 provisioning#
SCIM lets your IdP provision and deprovision users and groups directly. Six endpoints are implemented (no DELETE — deactivation is via a SCIM PATCH setting active: false):
GET /scim/v2/Users·POST /scim/v2/Users·PATCH /scim/v2/Users/:idGET /scim/v2/Groups·POST /scim/v2/Groups·PATCH /scim/v2/Groups/:id
SCIM authentication and scope#
SCIM does not use the enterprise admin permission model. Instead each call requires a verified tenant context (legacy_header credentials are rejected) plus a SCIM-capable scope or permission:
- An API key must carry one of the scopes
admin:config:write,account:team:invite, oraccount:team:read. - A portal session must hold the
admin:config:writepermission.
The x-tenant-id header, if present, must match the verified tenant context.
SCIM is verified-context only
SCIM provisioning requires an intended_live_ API key or a portal session that the gate has cryptographically verified. Local development legacy identity headers (x-user-*) are explicitly rejected with 403 TRUST_CONTEXT_INSUFFICIENT.
Create a user#
SCIM role values from the IdP are mapped to portal roles (owner/admin → admin, reviewer/approver → approver, operator/developer → operator, auditor/read_only → viewer, otherwise viewer).
Failure modes#
Admin identity endpoint:
| Status | Code | Cause |
|---|---|---|
| 400 | INVALID_ADMIN_IDENTITY_QUERY | Missing/invalid tenantId |
| 403 | TENANT_MISMATCH | x-tenant-id ≠ query tenantId |
| 403 | FORBIDDEN (+ permission: "trust:read") | Role lacks trust:read |
SCIM endpoints:
| Status | Code | Cause |
|---|---|---|
| 401 | TENANT_CONTEXT_REQUIRED | No verified tenant context |
| 401 | AUTH_CONTEXT_INVALID | Could not resolve an authenticated actor |
| 403 | TRUST_CONTEXT_INSUFFICIENT | Credential is unverified or a legacy header |
| 403 | TENANT_MISMATCH | x-tenant-id ≠ verified tenant |
| 403 | FORBIDDEN | API-key scope / portal permission insufficient for SCIM |
| 400 | VALIDATION_ERROR | SCIM body failed schema validation |
| 404 | SCIM_USER_NOT_FOUND / SCIM_GROUP_NOT_FOUND | Target resource not in this tenant |
| 429 | SCIM_RATE_LIMITED | SCIM request rate exceeded |