infra: bind development services to loopback - #4871
Conversation
Signed-off-by: Paweł Karniej <karniej.p@gmail.com>
Chessing234
left a comment
There was a problem hiding this comment.
loopback bind for compose/dev services is the right default. worth a one-liner in the compose README so people who were hitting the old 0.0.0.0 ports from another machine know to publish explicitly.
wesbillman
left a comment
There was a problem hiding this comment.
Reviewed on Wes's behalf at head 3fdebd66a5bf70a07017f05f281f811f74ecc0b6.
No blocking findings. This is a desirable, low-risk hardening change rather than a production networking redesign:
- The root
docker-compose.ymlis explicitly documented as the day-to-day development stack; the single-node/VPS deployment is separately maintained underdeploy/compose/(README.md:178). - The current short port syntax publishes PostgreSQL, Redis, Adminer, Keycloak, MinIO, and Prometheus on all host interfaces despite development/default credentials. Binding those host publications to loopback removes a real exposure on remote workstations, cloud VMs, and shared networks.
- Container-to-container traffic remains on
buzz-net, and repository CI/application workflows address these services through Docker DNS orlocalhost, so the normal local-development path is preserved. - The intended compatibility break is limited to clients on another machine reaching the development infrastructure ports directly. Those users will need an SSH tunnel or an explicit Compose override; that is the safer default.
I searched the repository documentation and workflows for a documented remote-development/LAN workflow that depends on direct access to these root-Compose ports and found none. I also found no GitHub issue specifically requesting the change, so demonstrated demand is limited rather than broad: the security footgun itself, this PR's Buzz-origin link, contributor support, and a maintainer approval. That is sufficient for a secure-by-default development configuration, but a short documentation note about explicit remote overrides would be useful and should not block the fix.
The head is mergeable and current checks are green or intentionally path-skipped. Recommendation: merge.
wesbillman
left a comment
There was a problem hiding this comment.
Approved on Wes's behalf at head 3fdebd66a5bf70a07017f05f281f811f74ecc0b6.
The root development stack hardening is correct and should not be delayed to expand scope. docker-compose.harness.yml has the same default-credential/all-interface exposure on ports 5471, 6471, 9471, and 9472; that isolated harness documents and consumes only localhost, so it should receive equivalent loopback bindings in a separate follow-up. The production/VPS and benchmark Compose overlays have different intended exposure and should be evaluated independently rather than swept into this PR.
…format * origin/main: (60 commits) feat(desktop): unify add agent flows (#5015) fix(buzz-agent): budget summarizer reasoning separately so it cannot starve the handoff summary (#5248) infra: bind development services to loopback (#4871) chore(release): release Buzz Desktop version 0.5.7 (#5252) fix(desktop): isolate relay admission tests (#5221) fix(desktop): externalize boot <style> to prevent Tauri CSP nonce override (#5242) fix(desktop): let imported and recovered identities finish onboarding (#5228) Recover from max-token response truncation (#5223) chore(release): release Buzz Desktop version 0.5.6 (#5214) fix(mobile): keep latest messages above composer (#4981) fix(sdk): preserve self-mention p tags in message and forum event builders (#4975) bump @tauri-apps/cli to ~2.11.4 to fix linux app icon issue (#4858) feat(desktop): adding rich link previews to messages (#3818) fix(buzz-agent): Responses reasoning summary, Anthropic display:summarized, ACP v2 messageId (#5195) fix(desktop): retain distinct agent instances in autocomplete (#5202) fix(desktop): defer channel visibility change to Save (#5203) feat(desktop): Projects follow-ups — access restrictions, fast loading, activity feed polish (#5073) refactor(cli): replace probe/decider/detail split with single typed extractor (#5191) fix(desktop): drop unhandled rejection from throwing window.Notification (#5143) fix(desktop): fence localStorage SecurityError from killing the React tree (#5142) ... Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
What changed
Bind the development Compose stack's published PostgreSQL, Redis, Adminer, Keycloak, MinIO, and Prometheus ports to
127.0.0.1.Why
Docker publishes a host port on every interface when no host address is specified. Running the development stack on a remote workstation or VPS therefore exposes its infrastructure services to that machine's public networks. Loopback bindings retain host-local development access and Docker's internal
buzz-netconnectivity without making those services Internet-reachable.Impact
Local workflows continue using the same ports. Deliberate remote administration now requires an SSH tunnel or another trusted private-network path.
Validation
docker compose -f docker-compose.yml config --quietOrigin:
buzz://message?channel=199eb7bc-3feb-484f-ae0e-4995123721ea&id=1c5bc387e86e21bb31677f56e1c862d4d9a17943bce91f8d93e825d029ce7f72