Auth Troubleshooting
Every /api/** call needs a Bearer JWT from the platform's configured identity provider - the right issuer, the right audience, and a user with the right permission. This page maps each failure to its cause.
At a glance
- Three things to check - the issuer, the audience, and the user's permission.
- 401 vs 403 - a 401 is the token; a 403 is the user or their role.
- Bootstrap -
SECURITY_SUPER_ADMIN_EMAILcreates the first admin on startup.
401 Unauthorized
| Cause | Fix |
|---|---|
| No token attached | Log in through the product UI and use its session, or get a token via the CLI (below) |
| Token expired | Refresh it - tokens are short-lived |
| Wrong issuer | Token is from a different tenant than OIDC_ISSUER_URI |
| Wrong audience | Token is not for this API - request it for OIDC_AUDIENCE (the API's client registration) |
403 Forbidden
| Cause | Fix |
|---|---|
| Missing permission | The call returns ACCESS_DENIED - ask an admin for a role that grants the action |
| Unknown user | Invite-only mode rejects unknown emails - ask an admin to invite you |
| Disabled user | An admin disabled the account - re-enable it |
| Subject mismatch | The token's sub does not match the account - log in again |
Getting a token
Log in through the product UI, or request a token from your identity provider for the API audience (OIDC_AUDIENCE):
Code
Then verify who you are and what you can do:
Code
Bootstrapping access
| Situation | Fix |
|---|---|
| Fresh install, no users | Set SECURITY_SUPER_ADMIN_EMAIL to your email before starting the app - the first SUPER_ADMIN is created on startup |
| Frictionless local use | Set SECURITY_USER_PROVISIONING_MODE=AUTO_PROVISION - accounts are created on first login |
| Production | Keep invite-only - an admin invites users with POST /api/security/users/invite |
Service accounts
Tokens with a client-id claim (azp by default, SECURITY_CLIENT_ID_CLAIM) map to service accounts - they must exist and be enabled, like users. Give them a dedicated role instead of sharing an admin identity.
Roles and permissions
Authorization is permission-based: 40 permissions like pipeline:execute and connection:create, granted through roles (SUPER_ADMIN, ADMIN, DEVELOPER, plus custom roles). An IdP groups claim can also map to roles via the group-role mapping table. A refused call returns ACCESS_DENIED with a generic message - inspect a user's permissions with GET /api/me.
Public paths and CORS
- Unauthenticated paths:
/actuator/**,/v3/api-docs/**,/swagger-ui/**, and tokenized file downloads - Browser errors that look like auth (403 on preflight): the docs/product origin is not in
CORS_ALLOWED_ORIGIN_PATTERNS
Related pages
- Common Errors - the full error-code table
- Getting Started - roles and access, user-view
- Architecture Overview - the security model
- API Reference - the protected surface