Part 1
The network in tiers, with one way out
Study first
- Three tiers: an edge that takes traffic, an app tier reached only from the edge, a data tier reached only from the app. Private routes to the cloud's own services.
- Egress control: an agent that can fetch any page is the easiest path out for a customer's data. A forward proxy with an allowlist and a log of every request.
Build
- An egress proxy,
infra/egress: Squid with an allowlist of the services WorkBot calls and nothing else. Pages the agent may read are added by host, per customer. - Every outbound call uses it: Node's
fetchhonours the proxy withNODE_USE_ENV_PROXY=1, and the agent's browser is pointed at it directly.
Done when
- An allowed host answers through the proxy, any other is refused with 403, and both are in the log.

Technical notes
- Squid drops its privileges before it opens its logs, so it cannot write to standard output; the log is its own file.
- Locally the proxy is an app setting. In a VPC it is the only route out.

