Skip to content

OAuth Client Administration

OAuth clients are service accounts that authenticate via the OAuth 2.0 client_credentials grant. Each client has a client_id, a client_secret (stored as a SHA-256 hash — never retrievable after creation), an assigned scope set, and a rate limit tier.

This guide covers client lifecycle management from the admin console and via the admin API. For the M2M token flow itself, see OAuth 2.0 M2M API.


All endpoints require an admin session or an M2M token with admin:write scope.

Base path: /api/admin/oauth-clients

MethodPathDescription
POST/api/admin/oauth-clients/Create a new client
GET/api/admin/oauth-clients/List clients (paginated)
GET/api/admin/oauth-clients/{client_id}Get a single client
PUT/api/admin/oauth-clients/{client_id}Update client settings
DELETE/api/admin/oauth-clients/{client_id}Delete (revoke) a client

POST /api/admin/oauth-clients/
Content-Type: application/json
{
"name": "SIEM Export Service",
"scopes": ["audit:read"],
"rate_limit_tier": "standard",
"token_lifetime_seconds": 3600
}
FieldTypeRequiredDefaultDescription
namestringYesHuman-readable display name (1–255 chars)
scopesstring[]No[]Scope strings granted to this client
tenant_idUUIDNonullTenant/org UUID for multi-tenant isolation. Null for platform-wide clients.
rate_limit_tierstringNo"standard"Rate limit policy: standard, premium, or unlimited
token_lifetime_secondsintNo3600Access token TTL in seconds. Range: 1–86400 (24 hours).
{
"id": "a1b2c3d4-...",
"client_id": "e5f6a7b8-...",
"client_secret": "arb1_sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"name": "SIEM Export Service",
"scopes": ["audit:read"],
"tenant_id": null,
"created_by": "admin-user-uuid",
"enabled": true,
"rate_limit_tier": "standard",
"token_lifetime_seconds": 3600,
"created_at": "2026-03-12T12:00:00Z",
"last_used": null
}

GET /api/admin/oauth-clients/?limit=50&offset=0

Returns a list of client records (newest first). No client_secret is returned.

ParameterTypeDefaultDescription
limitint50Records per page (1–500)
offsetint0Number of records to skip

GET /api/admin/oauth-clients/{client_id}

Returns a single OAuthClientResponse object. The client_id path parameter is the public client UUID (the client_id field, not the internal id).


PUT /api/admin/oauth-clients/{client_id}
Content-Type: application/json

All fields are optional — only the fields you send are updated.

{
"name": "SIEM Export Service v2",
"scopes": ["audit:read", "api:read"],
"enabled": true,
"rate_limit_tier": "premium",
"token_lifetime_seconds": 7200
}
FieldTypeDescription
namestringDisplay name
scopesstring[]Full scope list (replaces existing)
enabledboolEnable or disable the client
rate_limit_tierstringstandard, premium, or unlimited
token_lifetime_secondsintToken TTL (1–86400 seconds)

Updating scopes replaces the entire scope list. To add a scope, include all existing scopes plus the new one.


To temporarily suspend access without losing the client registration, set enabled to false:

PUT /api/admin/oauth-clients/{client_id}
Content-Type: application/json
{"enabled": false}

A disabled client receives a 401 invalid_client error when attempting to obtain tokens. Re-enable by setting enabled: true.


There is no dedicated rotation endpoint. To rotate a client secret:

  1. Delete the existing client (DELETE /api/admin/oauth-clients/{client_id}).
  2. Create a new client with the same settings (POST /api/admin/oauth-clients/).
  3. Update any services using the old credentials with the new client_id and client_secret.

Deletion immediately invalidates all outstanding tokens issued for that client. There is no grace period.


DELETE /api/admin/oauth-clients/{client_id}

Returns 204 No Content on success. Permanently removes the client record and invalidates all outstanding tokens. This action is not reversible.


Assign scopes based on what the client application needs to access. Use the minimum set required.

ScopeAPI access
api:readRead access to core API endpoints
api:writeWrite access to core API endpoints
admin:readRead access to admin endpoints
admin:writeWrite access to admin endpoints (includes client management)
audit:readAudit log search and export
dlp:readDLP rule and result endpoints

TierDescription
standardDefault. Suitable for most service accounts.
premiumHigher per-minute request limits for high-throughput integrations.
unlimitedNo rate limiting applied. Use for trusted internal services only.

The rate_limit_tier value is embedded in each issued JWT (rate_limit_tier claim) and enforced by the platform rate limit middleware. See Rate limiting for per-tier limits.


token_lifetime_seconds controls how long issued access tokens are valid:

  • Minimum: 1 second
  • Maximum: 86400 seconds (24 hours)
  • Default: 3600 seconds (1 hour)

The effective lifetime is capped at 86400 regardless of the configured value. Short-lived tokens reduce the exposure window if a token is compromised. Use the shortest lifetime your client’s token refresh logic supports.


The OAuth Clients panel in the admin console (/admin/oauth-clients) provides a table view of all registered clients, with inline actions:

  1. Create — Opens a modal to set name, scopes (checkboxes), rate limit tier, and token lifetime.
  2. Enable / Disable — Toggles the enabled field without deleting the record.
  3. Revoke — Permanently deletes the client and its outstanding tokens (confirmation required).

The client_secret reveal panel displays the plaintext secret immediately after creation, with a clipboard copy button. This panel is shown only once — closing it dismisses the secret permanently.

The Last used column tracks the most recent successful token issuance timestamp (last_used field). A value indicates the client has never successfully authenticated.