Skip to main content
SnackBase instances can accept access tokens from an external OIDC provider (SnackBase Cloud platform gateway, Auth0, Keycloak, etc.) in addition to local JWT and API keys. All settings default to unset — without them, the instance behaves exactly as before.

Settings

Configure these environment variables on the SnackBase instance (any tenancy mode): Requires SNACKBASE_SINGLE_TENANT_MODE=true. Multi-tenant instances must not enable platform auth.

Worked example: Auth0

  1. Create an Auth0 API with identifier https://admin.example.com/snackbase.
  2. Create a Machine-to-Machine or SPA application that obtains access tokens for that API.
  3. Ensure access tokens are RS256 and include email (and optionally custom claims).
  4. Set on your SnackBase container:
  1. Mint a token from Auth0 with aud matching SNACKBASE_PLATFORM_AUDIENCE.
  2. Call the admin API with Authorization: Bearer <token> — audit entries record auth_method=platform.

SnackBase Cloud parity

Cloud sets the same three core variables during provision (SNACKBASE_PLATFORM_ISSUER, SNACKBASE_PLATFORM_JWKS_URL, SNACKBASE_PLATFORM_AUDIENCE={ref}). The Cloud Console session replaces manual token handling; self-hosters use their IdP directly.

Security notes

  • Platform auth is optional and default-off.
  • /health and OpenAPI do not disclose whether platform auth is configured.
  • HS256 platform-shaped tokens are rejected.
  • Disabling platform settings removes the alternate auth path entirely.
See also Authentication concepts and Cloud Studio.