Skip to main content

Auth And Access

This page describes the access and permissions module.

Access model​

  • Console users authenticate with OTP and receive JWT tokens.
  • Machine workloads authenticate with API keys.
  • Governance APIs under /v1/* accept JWT or API key, subject to scope. Member, API key management, billing, and entitlement endpoints accept only a JWT. Approval actions accept only a user JWT. The auditor role can only read; see auditor.
  • JWT authorization is role-based.
  • API key authorization is scope-based.

This module keeps human sign-in and machine access separate so customers can manage permissions cleanly.

JWT roles​

Roles are normalized to:

  • super_admin
  • billing_admin
  • user
  • auditor

Role capabilities in Console​

super_admin​

  • Full workspace access, including every write endpoint in the permission matrix.
  • Can view and manage API keys, webhooks, and asset discoveries.
  • Can approve, reject, and revoke approvals for all assets.
  • Can invite, activate, and deactivate members.

billing_admin​

  • Read-only access to governance data in Console: assets, groups, policies, approvals, audit, decision explorer, and usage.
  • Can run decisions (evaluate, proxy evaluate, and playground) for all assets.
  • Can view organization settings and use the billing endpoints (checkout and billing portal).
  • Can list API keys. Secrets are never returned. Cannot create, rotate, or revoke API keys.
  • Cannot view webhooks or asset discoveries.
  • Cannot perform governance write actions.

user​

  • Read-only access to governance data for assets the user owns: assets, policies, approvals, audit, and decision explorer return only records for owned assets. Groups and usage are not filtered.
  • Can run decisions and approve, reject, or revoke approvals for owned assets. Approval actions are refused when the approver is the requester.
  • Cannot view API keys, webhooks, or asset discoveries. Cannot start checkout or open the billing portal.
  • Cannot perform governance write actions.

auditor​

  • Read-only, organization-wide access for reviewers. An auditor sees all records, not only owned assets.
  • An auditor can call only these GET routes: /me, /settings, /v1/audit, /v1/audit/operations/{operation_id}, /v1/audit/outcome-coverage, /v1/decision-explorer, /v1/decisions/{decision_id}/explanation, /v1/assets, /v1/groups, /v1/policies, /v1/policies/{id}/revisions, /v1/approvals, /v1/approvals/{id}, /v1/usage, and /v1/integration-presets. Every other request is refused with 403 and code read_only_role. That includes every write and routes such as /members, API keys, webhooks, billing, asset discoveries, and decisions.
  • GET /settings returns only the auditor's own member record, not the member directory or API key metadata.
  • An auditor cannot approve, reject, or revoke approvals.
  • An auditor always has an access expiry (see Time-bound access). When it passes, every request is refused with 401.
  • In Console, an auditor sees a read-only banner and only the sections backed by the routes above.
  • Viewing an operation's detail as an auditor is recorded; see Auditor access records.

Time-bound access​

A super_admin can give a member an access expiry.

  • Invite. POST /members accepts an optional accessExpiresAt (RFC3339). It must be in the future and at most 365 days away. It is required for auditor, optional for user and billing_admin, and not accepted for super_admin. Rejected values return 400 with access_expiry_required, access_expiry_invalid, or access_expiry_not_allowed.
  • Change. POST /members/{id}/access-expiry with {"accessExpiresAt": "<RFC3339>"} renews or changes the expiry under the same rules. null removes it, but is refused for an auditor, and any request for a super_admin member is refused. A member of another organization, or one that does not exist, returns 404 with member_not_found. Only a super_admin JWT can call it.
  • Expiry. When the expiry passes, the member is refused on every request with 401 and cannot sign in. The member is not deleted. A change takes effect on the next request.
  • Seats. An expired member does not use a seat. Renewing an expired, active member needs a free seat; otherwise the request returns 400 with member_seat_limit.
  • Member records include accessExpiresAt, an RFC3339 UTC time or null.

API key scopes​

Every API key must include at least one scope.

Supported scopes:

  • decision:run
  • assets:read
  • assets:write
  • asset_discovery:write
  • groups:read
  • groups:write
  • policies:read
  • policies:write
  • approvals:read
  • approvals:write
  • usage:read
  • audit:read
  • api_keys:read
  • webhooks:read
  • webhooks:write

approvals:write is accepted, but approve, reject, and revoke still require a user JWT. Creating, rotating, and revoking API keys are JWT-only, so API keys cannot manage other API keys. api_keys:write is not a supported scope; creating a key that includes it returns 400.

Behavior:

  • Key creation validates scopes and rejects invalid values.
  • Key rotation preserves current scopes and expiry.
  • Requests without required scopes receive 403 Forbidden.
  • API keys can create, update, and delete assets, groups, policies, and webhooks, and delete asset discoveries, when they carry the matching write scope. Promoting a discovery into an asset uses POST /v1/assets with assets:write.
  • API keys can submit asset discoveries with asset_discovery:write. Discovery submission by a JWT user is limited to super_admin.
  • API keys cannot approve, reject, or revoke approvals, even with approvals:write. Those requests receive 403 with jwt_user_required.

API key lifecycle​

  • Every key has an expiry. expiresAt is required when a key is created. It must be a future time no more than 365 days after creation.
  • A key's status is active, revoked, or expired. A key that is both revoked and past its expiry reports revoked.
  • Revoked and expired keys are rejected with 401 Unauthorized. Revocation takes effect on the next request.
  • Each key reports lastUsed, the time of its most recent authenticated request. Use it to find keys that are no longer used.
  • The secret is returned once, when the key is created or rotated. The list endpoint never returns secrets.

Rotation guidance​

  • Rotate a key before its expiresAt. Rotation issues a new secret and keeps the original expiry, so it does not extend the lifetime. To get a longer lifetime, create a new key with a later expiresAt.
  • Rotation invalidates the previous secret immediately. Deploy the new secret to your integration before or during the rotation window, not after.
  • Rotation resets lastUsed to empty until the new secret is used.
  • Revoked or expired keys cannot be rotated and return 400. Create a new key instead.
  • Revoke a key that is no longer needed, or that may be exposed, with POST /v1/api-keys/{id}/revoke.

Permission matrix​

Legend:

  • Allow: permitted for that caller when the request is authenticated and the plan entitlement is enabled.
  • Deny: the caller's JWT role is rejected with 403 Forbidden.
  • Owned assets only: a user JWT sees or acts only on records tied to assets it owns. Lists are filtered and other records return not found.
  • Not accepted: the endpoint requires a JWT, so an API key receives 401 Unauthorized.
  • Own operations only: the proxy operation or outcome must belong to the same caller that requested it, whether a user or an API key. Other callers receive 404 Not Found.

Organization, members, and billing​

OperationEndpointAPI keysuper_adminbilling_adminuser
Invite memberPOST /membersNot acceptedAllowDenyDeny
List membersGET /membersNot acceptedAllowDenyDeny
Activate memberPOST /members/{id}/activateNot acceptedAllowDenyDeny
Deactivate memberPOST /members/{id}/deactivateNot acceptedAllowDenyDeny
Change member access expiryPOST /members/{id}/access-expiryNot acceptedAllowDenyDeny
Close organizationPOST /v1/organization/closeNot acceptedAllowDenyDeny
Read current userGET /meNot acceptedAllowAllowAllow
Read organization settingsGET /settingsNot acceptedAllowAllowAllow
Start checkout (SaaS)POST /v1/billing/stripe/checkout-sessionNot acceptedAllowAllowDeny
Open billing portal (SaaS)POST /v1/billing/stripe/portal-sessionNot acceptedAllowAllowDeny
Upload entitlement (enterprise)POST /v1/entitlement/uploadNot acceptedAllowDenyDeny

API keys​

OperationEndpointAPI keysuper_adminbilling_adminuser
List API keysGET /v1/api-keysapi_keys:readAllowAllowDeny
Create API keyPOST /v1/api-keysNot acceptedAllowDenyDeny
Rotate API keyPOST /v1/api-keys/{id}/rotateNot acceptedAllowDenyDeny
Revoke API keyPOST /v1/api-keys/{id}/revokeNot acceptedAllowDenyDeny

Assets and discoveries​

OperationEndpointAPI keysuper_adminbilling_adminuser
List assetsGET /v1/assetsassets:readAllowAllowOwned assets only
Create asset (also promotes a discovery)POST /v1/assetsassets:writeAllowDenyDeny
Update assetPATCH /v1/assets/{id}assets:writeAllowDenyDeny
Delete assetDELETE /v1/assets/{id}assets:writeAllowDenyDeny
List integration presetsGET /v1/integration-presetsassets:readAllowAllowAllow
Submit asset discoveryPOST /v1/asset-discoveriesasset_discovery:writeAllowDenyDeny
List asset discoveriesGET /v1/asset-discoveriesassets:readAllowDenyDeny
Delete asset discoveryDELETE /v1/asset-discoveries/{id}assets:writeAllowDenyDeny

Groups​

OperationEndpointAPI keysuper_adminbilling_adminuser
List groupsGET /v1/groupsgroups:readAllowAllowAllow
Create groupPOST /v1/groupsgroups:writeAllowDenyDeny
Update groupPATCH /v1/groups/{id}groups:writeAllowDenyDeny
Delete groupDELETE /v1/groups/{id}groups:writeAllowDenyDeny

Policies​

OperationEndpointAPI keysuper_adminbilling_adminuser
List policiesGET /v1/policiespolicies:readAllowAllowOwned assets only
List policy revisionsGET /v1/policies/{id}/revisionspolicies:readAllowAllowOwned assets only
Create policyPOST /v1/policiespolicies:writeAllowDenyDeny
Clone policyPOST /v1/policies/{id}/clonepolicies:writeAllowDenyDeny
Update policyPATCH /v1/policies/{id}policies:writeAllowDenyDeny
Change policy activationPATCH /v1/policies/{id}/activationpolicies:writeAllowDenyDeny
Roll back policyPOST /v1/policies/{id}/rollbackpolicies:writeAllowDenyDeny
Delete policyDELETE /v1/policies/{id}policies:writeAllowDenyDeny

Decisions​

OperationEndpointAPI keysuper_adminbilling_adminuser
Evaluate decisionPOST /v1/evaluatedecision:runAllowAllowOwned assets only
Proxy evaluatePOST /v1/proxy/evaluatedecision:runAllowAllowOwned assets only
Playground decisionPOST /v1/playground/decisiondecision:runAllowAllowOwned assets only
Report proxy outcomePOST /v1/proxy/outcomesdecision:runOwn operations onlyOwn operations onlyOwn operations only
Read proxy operationGET /v1/proxy/operations/{operation_id}decision:runOwn operations onlyOwn operations onlyOwn operations only

Audit, decision explorer, and usage​

OperationEndpointAPI keysuper_adminbilling_adminuser
Decision explorerGET /v1/decision-exploreraudit:readAllowAllowOwned assets only
Decision explanation exportGET /v1/decisions/{decision_id}/explanationRefusedAllow (user JWT)RefusedRefused
Audit logGET /v1/auditaudit:readAllowAllowOwned assets only
Operation detailGET /v1/audit/operations/{operation_id}audit:readAllowAllowOwned assets only
Outcome coverageGET /v1/audit/outcome-coverageaudit:readAllowAllowOwned assets only
UsageGET /v1/usageusage:readAllowAllowAllow

Approvals​

OperationEndpointAPI keysuper_adminbilling_adminuser
List approvalsGET /v1/approvalsapprovals:readAllowAllowOwned assets only
Get approvalGET /v1/approvals/{id}approvals:readAllowAllowOwned assets only
ApprovePOST /v1/approvals/{id}/approveRefused (403, jwt_user_required)AllowDenyOwned assets only
RejectPOST /v1/approvals/{id}/rejectRefused (403, jwt_user_required)AllowDenyOwned assets only
RevokePOST /v1/approvals/{id}/revokeRefused (403, jwt_user_required)AllowDenyOwned assets only

Webhooks​

OperationEndpointAPI keysuper_adminbilling_adminuser
List webhooksGET /v1/webhookswebhooks:readAllowDenyDeny
Create webhookPOST /v1/webhookswebhooks:writeAllowDenyDeny
Rotate webhook secretPOST /v1/webhooks/{id}/rotatewebhooks:writeAllowDenyDeny
Delete webhookDELETE /v1/webhooks/{id}webhooks:writeAllowDenyDeny

Notes​

  • Approve is refused with 403 and code self_approval_forbidden when the approver is the requester. This applies to every role.
  • Each route also requires its plan entitlement, for example approvals.enabled or webhooks.manage. A workspace without the entitlement is refused regardless of role or scope.
  • Owned-asset filtering applies to the user role only. super_admin, billing_admin, and auditor see all records.
  • The auditor role is not a column in these tables. It is organization-wide and read-only: it may call only the GET routes listed under auditor, and every other row above returns 403 with read_only_role for it.
  • Proxy operations and outcomes are bound to the caller that requested them, for every role and API key. Lookups by another caller return 404, so no role can read another caller's operation.
  • Webhooks are only available when the workspace's approvals capability is enabled, since webhook delivery exists to notify on approval lifecycle events.
  • Not listed: /health, /auth/*, API documentation routes, the Stripe webhook (verified by signature instead of a token), /internal/v1/* operator routes, and POST /v1/bootstrap.

For detailed request/response examples, see API Reference.