Give every teammate and agent the right level of access to your Workers¶
Summary¶
Cloudflare introduced resource-scoped role-based access control for Workers on its Developer Platform: you can now grant a teammate or an AI agent access to one specific Worker rather than every resource in the account. Access is expressed as the product of two independent axes — a role (one of four new roles: Metadata Read-Only, Content Read-Only, Editor, Admin) and a scope (Developer Platform / product / individual resource). The design is explicitly motivated by the least-privilege problem that AI agents create: an over-permissioned agent that can change production is the failure mode being engineered away. The same role-and-scope model is slated to extend to D1, R2, and KV. The post also ships two supporting pieces of infrastructure: permission composition for cross-resource actions (changing a Worker's route requires both Editor on the Worker and Workers Routes on the zone) and contextual 403 errors that return a link to the exact permission the caller is missing.
Key takeaways¶
-
Authorization is modeled as role × scope, not a flat permission list. The four roles capture escalating capability — observe, read, write-without-delete, full-control — and each can be pinned to one of three scopes (all Developer Platform resources / all resources of one product / one specific resource). Cloudflare frames this as the middle ground between "overly broad roles [that] force you to grant more access than intended" and "too many individual permissions [that make] it difficult to know which ones to grant." (Source: sources/2026-09-15-cloudflare-workers-granular-authorization)
-
The four roles are content-vs-metadata split, then read-vs-write, then create/delete. Metadata Read-Only = settings + observability (metrics, logs, traces) but not source code or product content; Content Read-Only = read Worker code / D1 rows but no writes; Editor = read+write content and update settings but cannot create or delete resources; Admin = full control including delete and granting access to others. The metadata/content split is the load-bearing idea — it lets a debugging agent see logs and traces without ever seeing source code. (Source: sources/2026-09-15-cloudflare-workers-granular-authorization)
-
The design target is the AI agent, not just the human teammate. The motivating scenario is "the last thing you want is for an agent to make a change in production, just because it was granted more access than it needs." You mint an API token scoped to one Worker with one role and hand it to the agent — a compromised or misbehaving agent's blast radius is bounded to that single application. This is least-privileged access applied on the agent-identity axis. (Source: sources/2026-09-15-cloudflare-workers-granular-authorization)
-
Cross-resource actions require composed permissions, not a broader grant. Adding/changing a Worker route or Custom Domain can redirect production traffic, so it demands both Editor on the Worker and Workers Routes permission on the zone — deliberately not broad zone access. Crucially, once a route exists, you can keep deploying new Worker versions without access to the connected zone, database, or storage, as long as the deployment does not change that connection — which is exactly what lets a CI/CD token stay narrow. (Source: sources/2026-09-15-cloudflare-workers-granular-authorization)
-
Durable Objects inherit their Worker's permissions — they have no roles of their own. Access to a Durable Object is determined by your role on the Worker that implements it. Metadata Read-Only exposes DO metrics/logs/traces but not the stored data; reading or modifying the data in Durable Objects Data Studio requires the Editor role. (Source: sources/2026-09-15-cloudflare-workers-granular-authorization)
-
Errors are made actionable: contextual 403s. Instead of a generic
403 Forbidden, the APIs now return a link to the documentation for the specific permission the request needed. The stated goal is that "you and your agent can figure out exactly the right level of access that's needed without granting broader permissions than necessary" — i.e. the error message is itself a least-privilege affordance, steering the caller toward the minimal grant rather than an over-broad one. (Source: sources/2026-09-15-cloudflare-workers-granular-authorization) -
CI/CD is a first-class narrow-token case. Each CI/CD workflow gets its own API token with the Editor role scoped to the one Worker it deploys; a misconfigured workflow or leaked token can deploy to that Worker but cannot delete it or touch any other application. (Source: sources/2026-09-15-cloudflare-workers-granular-authorization)
-
User Groups amortize policy assignment across a team. Rather than assigning the same role+scope policy to each member individually, you attach the policy to a User Group and add members; everyone inherits it. This is standard RBAC group indirection, applied to the resource-scoped model. (Source: sources/2026-09-15-cloudflare-workers-granular-authorization)
-
Legacy Workers permissions map onto the new roles. The post publishes a migration table (e.g.
Workers Scripts Read→ Content Read-Only,Workers Scripts Edit→ Editor,Workers Observability Read/Workers Tail Read→ Metadata Read-Only,Workers Platform Admin→ Developer Platform Admin). There is no deprecation date — existing assignments keep working — but new granular resource-level scoping is only available on the new roles. (Source: sources/2026-09-15-cloudflare-workers-granular-authorization)
Systems, concepts & patterns extracted¶
- Systems: Cloudflare Workers (the resource these controls scope to), Durable Objects (permissions inherited from the implementing Worker), and the products the model will extend to next — D1, R2, KV.
- Concepts: fine-grained authorization (per-resource, per-action decisions — here via role × scope), least-privileged access (the governing principle, applied to both humans and agents), RBAC vs ABAC (this is a role-based model scoped to resources, not attribute-evaluated), blast radius (bounding a leaked-token / misbehaving-agent to one application), workload identity (the CI/CD and agent API tokens are non-human principals).
- Patterns: no new reusable pattern minted. The notable design moves — permission composition for cross-resource actions and contextual 403s that name the missing permission — are recorded here as prose and as tags; single-source at this point, left for Lint promotion if they recur.
Operational details / numbers¶
- 4 roles: Metadata Read-Only, Content Read-Only, Editor, Admin.
- 3 scopes: Developer Platform (all resources), product (e.g. every Worker), individual resource (one Worker).
- Available today, for all customers; configurable via dashboard, API, or Terraform.
- Durable Objects: metadata role → metrics/logs/traces only; Editor required to query/modify stored data via Durable Objects Data Studio.
- Route / Custom Domain changes require Editor (Worker) + Workers Routes (zone); subsequent version deploys need neither, if the connection is unchanged.
- Legacy roles/permissions: no deprecation date; advance notice promised before any removal.
Caveats¶
- This is a feature-announcement / launch post; there are no latency numbers, no policy-engine internals, and no throughput figures. Its architectural value is the authorization model design (role × scope, metadata/content split, permission composition, contextual errors) rather than an implementation deep-dive.
- The role-and-scope model is only fully realized for Workers today; D1 / R2 / KV extension is roadmap ("Next, we are bringing…").
- Unlike Cedar/AVP or Figma's permissions DSL, this is a fixed set of coarse roles, not a general policy language — the granularity comes from scope, not from attribute-rich per-request policy evaluation.
Source¶
- Original: https://blog.cloudflare.com/workers-granular-authorization/
- Raw markdown:
raw/cloudflare/2026-09-15-give-every-teammate-and-agent-the-right-level-of-access-to-y-5d707738.md
Related¶
- concepts/fine-grained-authorization — resource-scoped RBAC is a point on the fine-grained-authz spectrum.
- concepts/least-privileged-access — the governing principle, here on the agent + CI/CD identity axis.
- concepts/blast-radius — scoping a token to one Worker bounds the damage of a leak.
- systems/cloudflare-workers — the resource being scoped.
- systems/cloudflare-durable-objects — permissions inherited from the Worker.
- companies/cloudflare.