Data FlowData Flow
DataFlow
  • User Manual
  • Developer Manual
  • Examples
  • API Reference
Overview
Getting Started
Pipeline Authoring
Execution
Deployment
Troubleshooting
    Common ErrorsSpark TroubleshootingAuth Troubleshooting
Examples
Troubleshooting

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_EMAIL creates the first admin on startup.

401 Unauthorized

CauseFix
No token attachedLog in through the product UI and use its session, or get a token via the CLI (below)
Token expiredRefresh it - tokens are short-lived
Wrong issuerToken is from a different tenant than OIDC_ISSUER_URI
Wrong audienceToken is not for this API - request it for OIDC_AUDIENCE (the API's client registration)

403 Forbidden

CauseFix
Missing permissionThe call returns ACCESS_DENIED - ask an admin for a role that grants the action
Unknown userInvite-only mode rejects unknown emails - ask an admin to invite you
Disabled userAn admin disabled the account - re-enable it
Subject mismatchThe 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):

TerminalCode
# $TOKEN_ENDPOINT comes from your identity provider's OIDC discovery document curl -X POST "$TOKEN_ENDPOINT" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "grant_type=client_credentials" \ -d "client_id=$CLIENT_ID" \ -d "client_secret=$CLIENT_SECRET" \ -d "scope=$OIDC_AUDIENCE"

Then verify who you are and what you can do:

TerminalCode
curl -H "Authorization: Bearer $TOKEN" http://localhost:8080/api/me # { "email": "...", "roles": [...], "permissions": [...] }

Bootstrapping access

SituationFix
Fresh install, no usersSet SECURITY_SUPER_ADMIN_EMAIL to your email before starting the app - the first SUPER_ADMIN is created on startup
Frictionless local useSet SECURITY_USER_PROVISIONING_MODE=AUTO_PROVISION - accounts are created on first login
ProductionKeep 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
Suggest edit
Last modified on November 26, 2026
Spark Troubleshooting
On this page
  • At a glance
  • 401 Unauthorized
  • 403 Forbidden
  • Getting a token
  • Bootstrapping access
  • Service accounts
  • Roles and permissions
  • Public paths and CORS
  • Related pages