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.
This commit is contained in:
@@ -8,6 +8,14 @@ MOCK_AI=false
|
||||
# Required for the AI draft button, unless MOCK_AI=true.
|
||||
ANTHROPIC_API_KEY=your-anthropic-api-key-here
|
||||
|
||||
# Only meaningful in the Docker deployment (docker-compose.yml sets this
|
||||
# automatically to http://egress-proxy:8888). When set, the one outbound
|
||||
# call this app makes (to api.anthropic.com) is routed through that proxy
|
||||
# instead of going out directly, and the container itself has no other
|
||||
# route to the internet at all. Leave unset for local, non-Docker runs -
|
||||
# the AI draft button then calls Anthropic directly, same as always.
|
||||
EGRESS_PROXY_URL=
|
||||
|
||||
# Named users. Comma-separated user:password pairs. Each name doubles as the
|
||||
# identity used for the per-user token quota below.
|
||||
# Example: APP_USERS=alice:pass1,bob:pass2,carol:pass3
|
||||
|
||||
Reference in New Issue
Block a user