Commit Graph

2 Commits

Author SHA1 Message Date
dc1f6b81e9 Fix egress network internet leak, tinyproxy group config, surface real fetch errors
- docker-compose.yml: mark 'egress' network internal: true. Every
  Docker bridge network gets outbound NAT to the internet by default,
  not just 'default' - missing this meant sde-meeting-toolkit still
  had a direct route out despite being off 'default'. Confirmed via a
  real smoke test run (Check 2 failed before this fix).
- egress-proxy/tinyproxy.conf: 'Group nogroup' doesn't exist on
  Alpine, only 'nobody'. Fixed to 'Group nobody' for both User and
  Group.
- server.js: surface err.cause alongside err.message when the
  Anthropic call fails. undici wraps the real reason in a generic
  'fetch failed' TypeError; without this the actual cause was
  invisible in both the API response and the logs.
2026-09-29 18:46:19 -07:00
77203955a5 Restrict outbound network to api.anthropic.com only
- New egress-proxy/ container (tinyproxy) that only allows CONNECT to
  api.anthropic.com, refuses everything else.
- docker-compose.yml: sde-meeting-toolkit is no longer on 'default' at
  all. Its only networks are 'proxy' (NPM, inbound) and a new private
  'egress' network shared only with egress-proxy. egress-proxy is the
  only container with a real internet route.
- server.js: route the one outbound Anthropic call through
  EGRESS_PROXY_URL when set, using undici's own fetch + ProxyAgent
  together (mixing them with Node's global fetch throws a version
  mismatch error - caught this locally before it hit a real deploy).
- Add undici as a real dependency (package.json, package-lock.json),
  npm ci step in Dockerfile.
- Add smoke-test-egress.sh + Step 9b in DOCKER_TESTING.md to verify
  this whole chain with real Docker.
- Update CHANGELOG.
2026-09-29 18:16:35 -07:00