rented gateway: gatewayFleetPorts() opens 8080/8443 in the firewall on a real public droplet #694
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#694
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Discovered while closing #693 (the double
services.kanidmeval fault) — filed as a follow-up rather than bundled in, since ADR 0174 rule 3 stops security-posture questions on the human even when the exposure pre-dates the commit that surfaces it.What
gatewayFleetPorts()(internal/clan/vmguest.go) is called unconditionally byrenderGatewayGuestfor every VM-mode gateway:This was fine for the private QEMU demo path — QEMU hostfwd NATs the host-side forward, so "open" here never actually faces the internet. #693's fix made
renderGatewayGuestalso serve the rented carrier's genuinely PUBLIC gateway (a real DigitalOcean droplet), but did not touch this port list — so a rented gateway's real public IP now has ports 8080 (the control-plane API / auth-gate target,IDSS_API_ADDR=:8080) and 8443 (kanidm — though after #693 nothing public binds there anymore, front-door.nix's kanidm is loopback-only) open in the OS firewall.Compare: the own-VPS/self-hosted full-install path's public gateway (
renderControlPlaneSurface+front-door.nix) never callsgatewayFleetPorts()— its firewall isfront-door.nix's ownpublicPortList(80/443, plus mail ports when provisioned). Only the front door's Caddy is meant to be reachable; kanidm and the control-plane API are loopback-only, reached through Caddy'sforward_auth/proxy.Why this matters
If the control-plane binds
:8080on all interfaces (not just loopback), and the firewall now (post-#693) genuinely faces a real public IP for the rented path, port 8080 may be directly reachable from the internet — bypassing Caddy'sforward_authgate entirely. Whether this is an actual live exposure depends on what the control-plane's:8080listener trusts (loopback-implicit trust vs its own authn) — that's exactly the judgement call this issue is for.Suggested default ruling
For a public VMMode gateway (
GatewayFacts.Public != nil),renderGatewayGuest's firewall line should probably match the front-door's own public port list (22 + 80/443 + mail when provisioned) rather thangatewayFleetPorts()'s VM-demo set — i.e. branch the firewall the same way #693 branched the kanidm blocks. Needs confirmation that nothing else (the in-guest deploy runner, a health probe) depends on 8080/8443 being open externally for the rented path specifically before narrowing it.Why human
Security-posture question on a live rented droplet's firewall (ADR 0174 rule 3's one-way-door list: "a new deliberately-public surface or port, loosening [or tightening] an auth requirement") — needs Ben's ruling on whether 8080 is actually reachable/exploitable and whether narrowing the port list could break something the rented path currently depends on, even though the exposure itself pre-dates #693 and was not newly introduced by it. Proposed default ruling above.
Ben's ruling, 2026-08-25 (interactive session): close both ports.
The rented gateway's OS firewall aligns with the public posture
front-door.nixalready encodes (22/80/443);gatewayFleetPorts()'s 8080/8443 stays a QEMU-hostfwd-only concern and must not reach a genuinely public droplet's firewall. Since #693 nothing public binds 8443 anyway, and the control-plane API on 8080 belongs BEHIND the front door's gate, never beside it on a raw public port.Implementation is agent-side (relabelling
ready-for-agent): make the rented carrier's rendered guest stop opening 8080/8443 — whether by splitting the port set per deployment shape or by dropping thegatewayFleetPorts()call from the public path, whichever the code supports most cleanly. The rented rehearsal drive is the regression proof: the journey must stay green with the ports closed (everything rides the front door), and the drive's captured firewall state is the evidence.swarm-claim host=elitebook-distributed-server-03 run=10601
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #694 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope