Access, roles and tokens

Sessions, roles, API tokens, OIDC and TOTP.

Verified against v1.0.0-rc.1 · sources

On this page

All API paths are under /api/v1.

Sessions#

Browser users sign in with POST /api/v1/auth/login. The session is a server-side cookie. Requests that change state need an X-CSRF-Token header. Users can change their password (/auth/password) and enrol TOTP (/auth/totp/enroll, then /auth/totp/confirm). OIDC sign-in uses /auth/oidc/start and /auth/oidc/callback when OIDC is configured.

Roles#

RolePermissionsMax query range
viewersearch7 days
analystsearch, saved31 days
auditorsearch, audit31 days
operatorsearch, saved, jobs, storage31 days
adminsearch, saved, jobs, audit, storage, admin31 days

API tokens#

Create tokens with POST /api/v1/tokens from a signed-in session. A token cannot create another token.

FieldRule
name1 to 64 characters
scopesAt least one of search, saved, jobs, audit, storage, admin
ttl_daysAPI tokens: 1 to 90. MCP tokens (kind: "mcp"): 1 to 30, default 7

A token can do only what its scopes and its owner's role both allow. The secret is shown once. Revoke with DELETE /api/v1/tokens/{id}.

sh
curl -sS http://127.0.0.1:8080/api/v1/me -H "Authorization: Bearer <TOKEN>"

The port above is an example; use your API port.

Sources

This page was checked against: crates/api/src/rbac.rs, crates/api/src/handlers.rs, crates/api/src/lib.rs, crates/api/src/totp.rs, crates/api/src/oidc.rs.

Report an inaccuracy (opens a new issue in the Drillo repository; nothing is sent from this page)