Skip to content

infra: bind development services to loopback - #4871

Merged
wesbillman merged 1 commit into
block:mainfrom
Karniej:agent/bind-dev-services-loopback
Aug 7, 2026
Merged

infra: bind development services to loopback#4871
wesbillman merged 1 commit into
block:mainfrom
Karniej:agent/bind-dev-services-loopback

Conversation

@Karniej

@Karniej Karniej commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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-net connectivity 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 --quiet
  • Recreated the six affected services with their existing named volumes and Docker network
  • PostgreSQL remained healthy and retained all 54 application tables
  • Redis, MinIO, and Prometheus health checks passed
  • All affected ports were closed on the host's public IPv4 and IPv6 addresses while remaining available on loopback

Origin: buzz://message?channel=199eb7bc-3feb-484f-ae0e-4995123721ea&id=1c5bc387e86e21bb31677f56e1c862d4d9a17943bce91f8d93e825d029ce7f72

Signed-off-by: Paweł Karniej <karniej.p@gmail.com>
@Karniej
Karniej marked this pull request as ready for review August 5, 2026 10:38
@Karniej
Karniej requested a review from a team as a code owner August 5, 2026 10:38

@Chessing234 Chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml is explicitly documented as the day-to-day development stack; the single-node/VPS deployment is separately maintained under deploy/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 or localhost, 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 wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@wesbillman
wesbillman merged commit 65834d6 into block:main Aug 7, 2026
26 checks passed
wpfleger96 pushed a commit that referenced this pull request Aug 7, 2026
…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>
wpfleger96 pushed a commit that referenced this pull request Aug 8, 2026
* origin/main:
  chore(release): release Buzz Desktop version 0.5.8 (#5326)
  fix(buzz-agent): recover from 400-shaped image rejections; unbound benchmark agent rounds (#5318)
  Revert "fix(acp): reject unattended permission requests" (#5323)
  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)

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>

# Conflicts:
#	CHANGELOG.md
wpfleger96 added a commit that referenced this pull request Aug 8, 2026
* origin/main:
  fix(desktop): welcome banner overlap and missing dismiss control (#5330)
  fix(desktop): prevent horizontal clipping in Prompt Context modal (#5324)
  chore(release): release Buzz Relay version 0.2.1 (#2856)
  chore(release): release Buzz Desktop version 0.5.8 (#5326)
  fix(buzz-agent): recover from 400-shaped image rejections; unbound benchmark agent rounds (#5318)
  Revert "fix(acp): reject unattended permission requests" (#5323)
  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)

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants