Security and governance / User guide
Identity, roles, and API keys
Control platform access with user sessions, scoped API keys, custom roles, and resource permissions.
On this page
Before you begin
Use an administrator or other identity with the specific permission needed to manage keys, roles, or bindings.
Get started
- Identify the actions and resources an application or teammate needs.
- Create a scoped API key or role with those permissions.
- Assign the role/binding or configure the application with its key.
- Test both the required operation and an operation that should be denied.
Operate the service
Revoke unused keys and rotate credentials when consumers change. API-key values are shown once; store them in a secret manager. Inspect audit history when reviewing access changes. Use separate automation credentials per consumer.
Availability and limits
Permission scopes grant actions; ARN scopes constrain resources and do not grant actions by themselves. A key carrying resource ARN constraints can restrict collection/list operations even when a single-resource read is allowed. User sessions and host-agent tokens serve different purposes.
Troubleshooting
For permission denied, inspect the active organization, action scope, resource ARN, and role bindings. Broadening a key to all resources is not a substitute for understanding the failed permission.
Next steps
Use the CLI guide to automate repeatable work, or the API guide to integrate Anchras with your own tools.
CLI commands
Install and authenticate using the CLI guide. The table describes command families; required arguments are shown in their usage output.
| Command | Purpose |
|---|---|
api-keys list | List active API keys; --include-revoked includes revoked keys. |
api-keys create | Create a scoped anchras_ API key. Requires --name and comma-separated --scopes; optional --expires-at RFC3339. Partners may add --partner-team <team-id> to bind the key to one of their teams; such a key acts in a managed organization when called with --org <org-id> (sent as the Anchras-Org header), through that team's delegated access grant and never beyond its scopes (ADR-070). Prints the token once. |
api-keys revoke <id> | Revoke an API key. Protected RPCs reject the key immediately. |
api-keys rotate <id> | Replace an API key secret while preserving name/scopes/expiry. Prints the new token once. |
iam bindings list [--scope org\|project] [--project <id-or-slug>] | List role bindings with their scope (org or project:<slug>). --project lists one project's bindings, which a project admin may do. |
iam bindings create [--scope project <id-or-slug>] --principal-kind user\|team\|api_key --principal-id <id> (--role <name> \| --role-id <id>) | Grant a role org-wide (default) or on one project (ADR-073 §2). A project binding takes the built-in admin, member or viewer role; the principal then sees and manages that project's resources, on top of its organization role. A member whose organization role is none (Projects only, set with orgs members set-role or orgs invitations create --role none) sees only the projects these bindings name. A partner's staff member may be bound on a project at no more than the partner relationship's role ceiling, and the ceiling caps the binding on every request. |
iam bindings delete <binding-id> | Revoke a binding. A project binding is revoked by an org admin or an admin bound on that project. |
API reference
Browse procedures, request and response types, and download the complete OpenAPI contract.
