Sandboxing in Cloudflare Workers

1 view
Skip to first unread message

Kenton Varda

unread,
Sep 26, 2025, 11:59:39 AM (2 days ago) Sep 26
to fr...@googlegroups.com
I mentioned in the Cap'n Web thread earlier this week that we had another capabilities-related announcement coming Friday.

Cloudflare Workers now offers an API where a Worker can launch a sandbox and run arbitrary code in it.


It uses a capability-based permissions model. The `env` object that you specify can contain a certain form of capabilities: "service bindings", which are arbitrary RPC interfaces exported by another worker. When using worker loaders, you normally point these back at the parent worker, which acts as a supervisor, and can proxy on to external resources.

Of course, the RPC system itself is also capability-based. Same semantics as Cap'n Web, but we've actually had a version of this built into our runtime for a long time.


By the way, the Workers platform has all along used a capability-based mechanism for granting Workers access to specific external resources:


We've seen people increasingly realizing lately that this is the right model for AI agents and AI-generated code. It's so much easier than trying to filter traffic.

Another BTW, the platform also features an actor model where fine-grained actors can run all around the world and get persistent state:


-Kenton
Reply all
Reply to author
Forward
0 new messages