Files
sde-meeting-toolkit/egress-proxy/tinyproxy.conf
Matt Mabrey 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

29 lines
1004 B
Plaintext

# Minimal tinyproxy config for the SDE Meeting Toolkit's outbound restriction.
#
# The app container has no direct route to the internet. This is the only
# way out, and it only allows one destination: api.anthropic.com. Every
# other outbound request from the app is refused here, not just unrouted,
# so a compromised app container still can't reach anything else.
User nobody
Group nogroup
Port 8888
# Only the app container can reach this proxy at all (it's the only other
# thing on the "egress" network in docker-compose.yml), so this is a second
# layer, not the primary control. The primary control is the Filter below.
Allow 0.0.0.0/0
# Domain allow-list. FilterDefaultDeny means anything not matched here is
# refused. Matched against the CONNECT target for HTTPS traffic, which is
# all this app ever sends (fetch() to https://api.anthropic.com/...).
Filter "/etc/tinyproxy/filter"
FilterDefaultDeny Yes
FilterExtended Yes
FilterCaseSensitive No
MaxClients 20
Timeout 60
LogLevel Warning