Identity and access
Manage multi-tenant organizations, workspaces, member invitations, service accounts, OIDC SSO, RBAC roles (runner, builder, admin), and API keys.
Service authenticates principals (human user accounts and automated service accounts) via browser login sessions or workspace-scoped API keys, and authorizes every request against the principal's current grants on the organization and workspace.
Organizations and workspaces
- Organization: Top-level tenant boundary created at bootstrap, grouping members and workspaces.
- Workspace: Owns agents, threads, environments, providers, connections, and API keys. Create workspaces in Organization settings → Workspaces (
POST /api/v1/organizations/{organization_id}/workspaces), and archive retired ones viaPOST /api/v1/workspaces/{workspace_id}/archive. Login sessions select a workspace viaX-Workspace-ID; API keys are already bound to one workspace.
Roles
| Role | Effective verbs | Typical assignment |
|---|---|---|
viewer | read | Inspect agents, conversations, and results |
runner | read, run | Execute agents, manage threads, and use environments |
builder | read, run, write | Create and edit agents, templates, and providers |
admin | read, run, write, admin | Manage members, keys, workspace settings, and audit |
Organization grants apply across every workspace in the organization and combine additively with workspace grants.
Invitations, members, and grants
Invitations
Invite new users in Invitations (POST /api/v1/workspaces/{workspace_id}/invitations or the organization equivalent with {email, role}, requires a login session). Service emails the link when SMTP is configured or returns a one-time invitation_url.
Members and grants
Manage existing principals' access via GET /api/v1/organizations/{organization_id}/members and POST / PATCH / DELETE on /api/v1/workspaces/{workspace_id}/grants (or /api/v1/organizations/{organization_id}/grants) with {principal_id, role}.
API keys
Issue personal keys in API keys (POST /api/v1/users/me/keys with {name, workspace_id, expires_at?}, login session required). Copy the returned secret once and send it as Authorization: Bearer $A13N_API_KEY:
curl "$A13N_URL/api/v1/workspaces/$WORKSPACE_ID" -H "Authorization: Bearer $A13N_API_KEY"Revoke keys via DELETE /api/v1/users/me/keys/{key_id} (or /api/v1/workspaces/{workspace_id}/keys as workspace admin) with If-Match.
Service accounts
Create dedicated per-workspace service accounts for applications in Workspace settings → Service accounts (POST /api/v1/workspaces/{workspace_id}/service-accounts with {"name": "Support app", "role": "runner"}), then issue keys at POST …/service-accounts/{account_id}/keys. Pause with PATCH {"status": "disabled"} or retire with DELETE (with If-Match).
Sign in, sessions, and OIDC SSO
- Login sessions: Cookie-authenticated browser requests (
/api/v1/auth/login,/session,/logout) requireX-CSRF-Tokenon state-changing calls. Users manage active sessions, passwords, email, and self-disablement (POST /api/v1/users/me/disable) under Personal settings, and organization admins can issue password-reset links from Members. - OIDC SSO (
[auth.oidc]/A13N_AUTH__OIDC): Register callback{server.public_url}/api/v1/auth/oidc/{provider_id}/callbackat your IdP (Discovery, PKCE S256,RS256/ES256,openid profile email) and configuredefaultsplus optional claim-basedrole_rules(A13N_AUTH__OIDCreplaces the entire[auth.oidc]table):
{
"defaults": [{"workspace_id": "ws_example", "role": "runner"}],
"providers": {
"team": {
"label": "Team Identity",
"issuer": "https://identity.example.com/realms/team",
"client_id": "a13n-console",
"client_secret": "replace-at-deploy-time",
"extra_scopes": ["groups"],
"role_rules": [
{"match": {"groups": "console-admins"}, "organization_id": "org_example", "role": "admin"}
]
}
}
}- Sign out at the IdP: For providers that publish an
end_session_endpoint, Console sends the browser there after ending its Service session. Register{server.public_url}/loginas an allowed post-logout redirect URI. Service sends the client ID without an ID token hint; confirm that your IdP supports that flow. - Sign out from the IdP: If your IdP supports Back-Channel Logout, register
{server.public_url}/api/v1/auth/oidc/{provider_id}/backchannel-logoutfor the same OIDC client. Enable session IDs at the IdP if it offers that setting and you want per-device logout. Sessions created without a session ID can still be revoked by subject notifications. API keys and Schedules keep their own validity. - Bundled sign-in icons (
brand): Console automatically matches common issuer URLs (Google, Microsoft Entra, Authentik, Keycloak) or whole brand tokens in the provider ID/label. Override explicitly withbrand(google,microsoft,okta,auth0,github,gitlab,cloudflare,authentik,keycloak,authelia,zitadel, orgenericfor the default shield). - Display email (
require_email_verified): Service stores the ID token'semailstrictly as display metadata (oidc_email) whenemail_verifiedis booleantrue(require_email_verified = trueby default; display email never links accounts or grants access). For providers that omitemail_verified(Microsoft Entra ID workforce tenants) or default it toFalse(Authentik), setrequire_email_verified = falseon[auth.oidc.providers.<id>]only when users cannot set arbitrary unverified addresses. - OIDC-only sign-in: After promoting an OIDC account to manual organization
adminand verifying sign-in, setA13N_AUTH__PASSWORD_ENABLED=falseon API replicas. Keep the bootstrap password admin for emergency recovery (or disable it viaa13n-service user disable --email <bootstrap-email>—never delete rows directly fromprincipalsin PostgreSQL). OIDC sessions expire afterauth.oidc.session_seconds(default 12 hours).
Operator account control
Operators can suspend or restore any user account from the CLI (use --principal-id usr_... for OIDC accounts), or reset an active local-password user's password directly when email recovery is unavailable:
a13n-service --config service.toml user disable --email [email protected]
a13n-service --config service.toml user enable --email [email protected]
a13n-service --config service.toml user reset-password --email [email protected]user reset-password prompts for the new password interactively (or reads it from stdin with --password-stdin), revokes the user's existing login sessions and outstanding recovery links, and refuses disabled or OIDC-only accounts.
Audit
Inspect immutable access and security events (actor_id, action, outcome) under Organization settings → Audit (/api/v1/organizations/{organization_id}/audit-events), Workspace settings → Audit (/api/v1/workspaces/{workspace_id}/audit-events), or GET /api/v1/users/me/audit-events.