Skip to content

Latest commit

 

History

History
210 lines (190 loc) · 20.1 KB

permissions.md

File metadata and controls

210 lines (190 loc) · 20.1 KB

Permissions cheat sheet

Look up which permission OpenClaw Control Plane (OCC) checks for a public operation. A permission is an exact action and resourceKind; a Role grants it through an AccessBinding. Missing grants are denied, matching Restrictions override grants, and one action never implies another. See Authorization for the full policy.

Actions

Action What it permits
create Create a resource in its parent Installation or Namespace.
read Read a resource or include it in a list; Secret reads return metadata, not values.
update Change a resource or its credential.
delete Request deletion of the exact resource.
deploy Create an Agent revision or recover its exact first-deployment receipt.
operate Submit an Agent HTTP turn or browser chat, stop an Agent, retry credential delivery, provision runtime credentials, write workspace files, manage native cron jobs, read its runtime status, or use a bound Secret or a Source.
administer Run Installation administration, access the exact Agent’s native admin UI, or read its runtime log text. It does not imply read, deploy, or other actions.
read_logs Read the exact Agent’s runtime log text without administer. Not granted by bootstrap; grant it through a Namespace Role.
read_audit Read selected audit metadata for one Agent. Requires a direct AccessBinding on the Agent and a human session.

Resources and scopes

This is the set checked by current public operations. Native IAM bootstrap grants most of these pairs to the human administrator and the non-Agent bootstrap service principal. Grant read_logs and read_audit separately.

Resource kind Actions Scope checked
installation read, administer Singleton Installation.
namespace create, read, delete Installation for create; exact Namespace otherwise.
configuration create, read, update, delete Namespace for create; exact Configuration otherwise.
preset create, read, update, delete Namespace for create; list needs Namespace read and returns only Presets with exact read. Exact Preset otherwise.
service_account create, read, update, delete Namespace for create; exact ServiceAccount otherwise. Credential creation also uses update.
secret create, read, update, delete, operate Namespace collection for create; list needs Namespace read and returns only Secrets with exact read. Other actions target the exact Secret. operate is checked when a Secret is bound or used.
credential_source create, read, update, delete, operate Namespace collection for create; list needs Namespace read and filters exact Source read. Exact read exposes all nonsecret Source metadata. Update, delete, and operate target the Source. An OAuth Source owner can disconnect with exact read and operate; another caller needs delete.
agent create, read, update, delete, deploy, operate, administer, read_logs, manage_policy, read_audit Namespace for create; exact Agent otherwise. Native browser chat, administration, and audit reads require a human session. HTTP chat also accepts service keys with operate. See Read an Agent’s audit events.
sandbox_policy read, update Exact Agent-owned policy, or an exact binding on its Agent. See the SandboxPolicy permission conditions below.
agent_revision read Exact AgentRevision, or an exact binding on its Agent; deployment-status reads use this permission too.

SandboxPolicy reads and discovery require Agent read. Preview, save, and live application require Agent manage_policy and enabled editing. Live application also requires SandboxPolicy read. Saving an explicit empty repository network policy list requires SandboxPolicy read. Ordinary deployment and fresh first deployment require SandboxPolicy read for saved network policy additions or an explicit repository network policy list, even an empty list. Deploying an explicit list also requires Agent manage_policy and SandboxPolicy update on the exact resources. An Agent update that leaves repository bindings requires SandboxPolicy read when saved additions exist.

Namespace, Preset, Agent, ServiceAccount, AgentRevision, Secret, and credential source lists check each returned resource. Listing Agents, ServiceAccounts or Presets also requires namespace:read; listing AgentRevisions also requires agent:read on the parent. The HTTP API reference lists exact targets and conditions for each operation.

Sign-in, sign-out, and session lookup use session rules rather than resource permissions. Installation bootstrap and account creation require a human session; service-key administration also accepts an authorized Installation-scoped service key. A Namespace-scoped key cannot access another Namespace or Installation endpoints. An Installation-scoped key still needs its principal’s own grants; it does not inherit the issuer’s. See service key scope. The direct binding for an account created with the Installation administrator roleId grants only installation:administer and installation:read. Configured Group and other bindings can add access. See Appoint an administrator.

Configured Roles

The Installation iam configuration can declare Installation-level Roles with any permission in the table above except installation ones. OCC writes each as role_config_<id> and binds it only as the configuration says, or to each creator as the ownerRole. See Default users and configured Roles.

Denial messages

A 403 FORBIDDEN can name the required action and safe scope, for example Not authorized: this needs Agent deploy on Agent agt_1. Ask an Installation administrator to grant it. Ordinary create and Namespace delete denials end with Review this permission with whoever manages IAM. Configured Roles can grant permissions that the exact Namespace policy API cannot issue.

A message names a resource ID only when your request sent it in the path or an ID field, or you can already read that resource. It does not name a binding, Role, Restriction ID, or another principal. A Secret or credential source that an Agent, Configuration, or credential source binds is named only when you can also read the record that binds it. Log text needs Agent read_logs (or Agent administer). Ordinary denials do not distinguish a matching Restriction from a missing grant or disclose whether an unreadable resource exists. The exception is an actual non-Namespace create refused to a confirmed Installation administrator when OCC has matching Restriction evidence. That denial says a Restriction denies create without naming its ID. Advisory permission booleans do not provide that evidence.

A denial about your own account, session or provisioning job says so: The acting account is disabled., The acting identity is unavailable., The human administrator session is no longer current., The assigning session is no longer current., Only the initiating actor can retry provisioning. or Only the initiating actor can read provisioning status. A denial that names no grant says The exact platform operation was not authorized.

Additional checks

  • Agent automation APIs require a human session and exact-Agent operate for each native cron operation. OCC privately uses its shared trusted Gateway machine identity; the human does not receive it. Operators can manage all native jobs for that Agent. Service keys are refused.

  • Native browser access delegates operator.sessions.write for exact-Agent operate, or operator.admin for administer, under the person's native profile. Native roles can narrow either grant. Agent read alone and service keys do not admit a browser session.

  • Experimental personal Codex login (device login) requires Namespace agent:create, or exact agent:read and agent:update for an existing Agent. Start also requires credential_source:create in the Namespace. Only the initiating actor can poll or cancel the login, with current Agent permissions. Polling additionally requires exact credential_source:operate on the resulting source. The temporary login session is not an IAM resource. Saved-Agent discovery also checks the Agent principal's source grant.

  • Channel directory lookup requires agent:create in the Namespace, or agent:update or configuration:update on the exact edit target, plus secret:operate on the exact same-Namespace Secret used for the lookup.

  • Model discovery for Agent creation requires agent:create in the exact Namespace. The supplied API key or service account token is used transiently; no resource is created.

  • Checking an Agent create before saving requires agent:create in the exact Namespace and credential_source:operate on each Source submitted at a Plugin connection. The check creates no resources or grants.

  • Create, update, and deploy an Agent also require configuration:read, service_account:read for current or new associations, secret:operate for bound Secrets, and credential_source:operate for attached Sources. Create and deploy check every selected Plugin Source. An update that submits Plugin selections checks both old and new Plugin Sources. An update that submits credentialSources also checks the selected Plugin Sources. With Native IAM, saving a selection grants the Agent service principal operate on the exact Source. At deployment the Agent’s own service principal also needs secret:operate on each bound Secret and credential_source:operate on each source. The deploy writes the missing grants for each source the caller can operate.

  • Selecting or changing an Agent's GitHub App Client requires installation:administer. Deploying the saved GitHub access also requires agent:manage_policy and sandbox_policy:read and update. The caller needs credential_source:operate on the Source and credential_source:create in the Namespace if deployment needs to create one.

  • Selecting or changing an Agent Gateway channel proxy credential requires secret:operate on that exact same-Namespace Secret. Deployment also checks the Agent principal's exact Secret grant.

  • Creating an Agent with Gateway managed mode off or changing the setting also requires installation:administer.

  • Registering or updating a credential source also requires secret:operate on each Secret it reads.

  • Withdrawing a credential source from an Agent requires agent:operate; the worker rechecks it before revoking.

  • Retrying credential delivery requires exact agent:operate and credential_source:update on every selected deployed Source. The Agent service principal also needs credential_source:operate.

  • First-deployment receipt recovery requires current exact Agent deploy and reviewed Configuration read. It does not grant Agent revision read; deployment-status access needs that separate permission.

  • Create or update a Configuration with Secret bindings requires secret:operate on each bound Secret.

  • Adopting an existing Kubernetes namespace also requires installation:administer.

  • Provisioning Agent runtime credentials requires both agent:operate and agent:read.

  • Agent runtime status requires agent:operate, agent:read and agent_revision:read; runtime log text requires agent:read_logs or agent:administer, plus agent:read, for every Agent revision; a read_logs Restriction also blocks administer. See Agent logs.

  • A first Agent deployment also requires exact-Agent read and operate when the selected Compute Driver must create missing generated transport credentials.

  • Namespace IAM operations require installation:administer and namespace:read. Creating an AccessBinding also requires read on its exact target. Listing Backends uses installation:administer; Backend and IAM policy objects have no separate permission resource kinds.

  • Reading the observability destination uses installation:administer. The configured external service enforces its own access.

The Namespace policy API accepts the per-kind actions in the table above on agent, agent_revision, configuration, credential_source, preset, secret, and service_account, except create. It refuses, with 400 INVALID_REQUEST, a Role with a combination no operation checks, such as secret:read_logs or configuration:deploy, because it would grant nothing, and a Role with any create Permission, which no exact-resource binding can grant. On namespace it accepts only read. It can bind an existing human Principal or a Namespace-local ServicePrincipal to an existing exact resource, including the path Namespace itself. Exact Namespace access does not grant access to child resources. It cannot create Installation or Namespace-wide grants, including the collection permission needed to create resources. Existing Namespace-wide and Group bindings can still be listed or deleted. Groups and Restrictions cannot be managed through this API.

Per-Agent policy editing configuration requires Installation and exact-Agent administer. See policy authority.