Cloudflare Sandboxes: Secure Credential Injection and Dynamic Egress Policies
Key Points
- Zero-trust credential injection without exposing secrets to sandboxed code
- TLS interception with ephemeral per-instance certificate authorities
- Dynamic runtime modification of egress policies without restart
Summary
Cloudflare has released new security features for Sandboxes and Containers, enabling zero-trust credential injection, TLS interception, and dynamic egress policies. These capabilities allow platforms to control outbound traffic from sandboxed workloads without exposing secrets to untrusted code.
Key Points
- Secure Credential Injection: Credentials are managed in Workers runtime outside the sandbox, transparently attached to requests without exposing secrets to sandboxed workloads
- TLS Interception: Ephemeral certificate authorities created per instance enable transparent proxying of HTTPS traffic
- Dynamic Egress Control: Runtime modification of outbound policies using
setOutboundHandler()andsetOutboundByHost()without sandbox restart - Host Filtering: Support for
allowedHostsanddeniedHostswith glob pattern matching for traffic filtering - Per-Instance Policies: Unique credentials and policies per container using
ctx.containerIdfor multi-tenant scenarios
Availability
Upgrade to @cloudflare/containers@0.3.0 or @cloudflare/sandbox@0.8.9 to access these features.