Auth & Admin

Principals, API keys, roles, and the auth introspection endpoints.

The admin surface manages identities (principals), credentials (API keys), and permission sets (roles). Two introspection routes at /auth/* let callers inspect the permissions a workflow requires.

All /admin/* routes here require either admin:principals:read|manage or admin:roles:read|manage depending on the operation. The built-in admin role grants *.

Principals

Principals model identities. Two types: user (typically external, OIDC-backed) and service_account (typically Flux-internal, API-key-backed). The external_issuer defaults to flux.

GET /admin/principals

List principals.

POST /admin/principals

Create a principal.

GET /admin/principals/{subject}

Look up a principal.

PATCH /admin/principals/{subject}

Update a principal’s display_name or enabled flag.

DELETE /admin/principals/{subject}

Remove a principal.

POST /admin/principals/{subject}/enable

Toggle the enabled flag on. Equivalent to PATCH with {"enabled": true} but cheaper for shell-style calls.

POST /admin/principals/{subject}/disable

Toggle the enabled flag off.

POST /admin/principals/{subject}/roles

Grant a role to a principal.

DELETE /admin/principals/{subject}/roles/{role_name}

Revoke a role.

API keys

API keys belong to a service-account principal. Creating a key for a user principal returns 400.

POST /admin/principals/{subject}/keys

Mint a new API key. The plaintext key is returned exactly once.

GET /admin/principals/{subject}/keys

List the keys (metadata only) issued to a principal.

DELETE /admin/principals/{subject}/keys/{key_name}

Revoke a key by its name.

Roles

Built-in roles (admin, operator, viewer, worker) cannot be modified or deleted.

GET /admin/roles

List all roles.

GET /admin/roles/{name}

Show one role.

POST /admin/roles

Create a custom role.

PATCH /admin/roles/{name}

Add or remove permissions on a custom role.

DELETE /admin/roles/{name}

Delete a custom role.

POST /admin/roles/{name}/clone

Clone an existing role into a new name. Convenient for forking a built-in role into a customisable copy.

Auth introspection

GET /auth/permissions

List the permissions required to read and run workflows.

POST /auth/test-token

Validate a bearer token without using it for a real request. Useful for CI diagnostics.

Provider notes