From 0ffb44027d3f4ddba18d22adac9e9035198964e5 Mon Sep 17 00:00:00 2001 From: Rob Macrae Date: Tue, 17 Nov 2026 14:59:37 +0000 Subject: [PATCH] Control plane config: withhold INTERNAL_API_TOKEN from VMs, disable dev egress - WITHHOLD_INTERNAL_TOKEN_FROM_SANDBOX=true on prod and dev: new sandbox VMs call /internal/* with their dashboard-scoped token only. - Comment out EGRESS_PROXY_ENABLED on dev: Fly's kernel rejects the iptables owner match, so egress-enabled VMs refuse every PTY (E79770), and dev shares the warm pool with prod. Both are already deployed; this records them so a clean deploy keeps them. Co-Authored-By: Claude Opus 5.5 --- controlplane/wrangler.dev.toml | 12 ++++++++++-- controlplane/wrangler.production.toml | 4 ++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/controlplane/wrangler.dev.toml b/controlplane/wrangler.dev.toml index 96e501d0..6b60aebe 100644 --- a/controlplane/wrangler.dev.toml +++ b/controlplane/wrangler.dev.toml @@ -25,6 +25,10 @@ routes = [ # Deployment environment ENVIRONMENT = "production" +# Sandbox auth - new VMs never receive INTERNAL_API_TOKEN; they call /internal/* +# with their dashboard-scoped token (X-Dashboard-Token) only. +WITHHOLD_INTERNAL_TOKEN_FROM_SANDBOX = "true" + # Authentication - Dev auth DISABLED (public URL, header-based auth would be insecure) DEV_AUTH_ENABLED = "false" @@ -35,8 +39,12 @@ AUTH_LOGIN_RESTRICTED = "true" # CORS - Only allow the dev frontend ALLOWED_ORIGINS = "https://dev.orcabot.com" -# Egress proxy - enabled globally on sandbox machines -EGRESS_PROXY_ENABLED = "true" +# Egress proxy - DISABLED. Fly's kernel rejects the iptables owner match the +# sandbox's egress isolation needs ("Extension owner revision 0 not supported"), +# so a VM started with EGRESS_PROXY_ENABLED=true refuses every PTY (E79770). +# Dev shares the warm pool with prod (same D1), so prod dashboards could be +# handed those VMs. Re-enable once egress isolation works on Fly. +# EGRESS_PROXY_ENABLED = "true" # Fly.io per-dashboard machine provisioning FLY_APP_NAME = "orcabot-sandbox" diff --git a/controlplane/wrangler.production.toml b/controlplane/wrangler.production.toml index e534a1dc..61b395b8 100644 --- a/controlplane/wrangler.production.toml +++ b/controlplane/wrangler.production.toml @@ -23,6 +23,10 @@ routes = [ # Deployment environment ENVIRONMENT = "production" +# Sandbox auth - new VMs never receive INTERNAL_API_TOKEN; they call /internal/* +# with their dashboard-scoped token (X-Dashboard-Token) only. +WITHHOLD_INTERNAL_TOKEN_FROM_SANDBOX = "true" + # Authentication - Dev auth DISABLED, CF Access required DEV_AUTH_ENABLED = "false"