Rented gateway advertises HTTP/3 (alt-svc h3) but the firewall only opens TCP 443 — Chrome's dashboard API fetches die with "Failed to fetch" #1334

Closed
opened 2026-09-09 01:28:39 +00:00 by ben · 3 comments
Owner

Seen: manual trial 2026-09-08 (Whakatohea, rented path, build db1d1b23). After hand-off the operator opened the dashboard in Chrome; the Overview rendered its frame and then reported failed to fetch on GET /api/v1/overview. From the laptop, curl over HTTP/2 returns the overview JSON fine on the apex, and the admin door correctly 302s to sign-in — the API itself is healthy.

Cause (verified on the box): Caddy binds UDP 443 (QUIC) and stamps alt-svc: h3=":443" on every response, but nixos-fw only accepts tcp dport 443 — there is no UDP 443 rule. Chrome honours alt-svc on the follow-up requests: the document lands over h2, the API fetches switch to h3, the UDP packets are dropped silently (DROP, not REJECT), and fetch() surfaces TypeError: Failed to fetch until Chrome marks the alt-svc broken.

# on the gateway
iptables -S nixos-fw | grep 443   → only: -p tcp --dport 443
ss -lunp | grep :443             → UNCONN *:443 caddy (QUIC listener)
curl -sD - https://whakatohea.idss.nz/ → alt-svc: h3=":443"; ma=2592000

Fix options (frontdoor.go): either open UDP 443 alongside TCP 443 wherever the front door opens 443, or pin Caddy to servers { protocols h1 h2 } so it never advertises h3. Pick one and add a render test asserting the pair (a listener advertising a protocol the firewall drops is the defect class). Add a GOTCHAS entry.

Drive impact: Playwright's Chromium is the same engine — any drive that opens the dashboard after founding may be flaking on this today.

Build record: docs/operator-app/manual-testing-guide.md (deb sha 5f57d17c…, db1d1b23).

**Seen:** manual trial 2026-09-08 (Whakatohea, rented path, build db1d1b23). After hand-off the operator opened the dashboard in Chrome; the Overview rendered its frame and then reported *failed to fetch* on `GET /api/v1/overview`. From the laptop, curl over HTTP/2 returns the overview JSON fine on the apex, and the admin door correctly 302s to sign-in — the API itself is healthy. **Cause (verified on the box):** Caddy binds UDP 443 (QUIC) and stamps `alt-svc: h3=":443"` on every response, but `nixos-fw` only accepts `tcp dport 443` — there is no UDP 443 rule. Chrome honours alt-svc on the follow-up requests: the document lands over h2, the API fetches switch to h3, the UDP packets are dropped silently (DROP, not REJECT), and fetch() surfaces `TypeError: Failed to fetch` until Chrome marks the alt-svc broken. ``` # on the gateway iptables -S nixos-fw | grep 443 → only: -p tcp --dport 443 ss -lunp | grep :443 → UNCONN *:443 caddy (QUIC listener) curl -sD - https://whakatohea.idss.nz/ → alt-svc: h3=":443"; ma=2592000 ``` **Fix options (frontdoor.go):** either open UDP 443 alongside TCP 443 wherever the front door opens 443, or pin Caddy to `servers { protocols h1 h2 }` so it never advertises h3. Pick one and add a render test asserting the pair (a listener advertising a protocol the firewall drops is the defect class). Add a GOTCHAS entry. **Drive impact:** Playwright's Chromium is the same engine — any drive that opens the dashboard after founding may be flaking on this today. Build record: docs/operator-app/manual-testing-guide.md (deb sha 5f57d17c…, db1d1b23).

This was generated by AI during triage.

Category: bug · State: ready-for-agent

Verified against the codebase

The defect is real in the tree. The rented gateway's guest front door renders internal/clan/frontdoor.go:601:

networking.firewall.allowedTCPPorts = [ 443 ];

— TCP only, no allowedUDPPorts. Caddy on guest 443 binds UDP 443 (QUIC) and stamps alt-svc: h3=":443" by default, so the firewall drops exactly the transport the responses advertise. Chrome follows the alt-svc to h3 and the API fetches die on the silently-DROPped UDP. The existing render-test harness already asserts the public-port set literally (internal/clan/frontdoor_test.go:28 → allowedTCPPorts = [ 80 443 ]), so the firewall/advertisement parity is cheaply provable there. Not redundant with GOTCHAS #58/#80 (both are ledger 409s, unrelated).

Ruled by agent under ADR 0174 — veto anytime

Ruling: the fix must narrow the advertisement to match the firewall, not widen the firewall to match the advertisement. Default to pinning Caddy so it never advertises h3 (servers { protocols h1 h2 }, and/or not binding UDP 443) on the gateway front doors. Do not open a new public UDP 443 port as part of this ticket.

Why this is a two-way door: aligning the advertisement down opens no new public surface — it is revertible by a one-line commit and provable by a render test asserting the listener never advertises a protocol the firewall drops. Opening UDP 443, by contrast, is a security-posture widening (a new deliberately-public port) — that sits on the ADR 0174 one-way-door list, so a swarm worker must not self-authorize it. If h3 is later wanted for performance, opening the UDP port rides the human door as its own decision; it is not blocking this fix.

What proves it: a new assertion in the internal/clan front-door render tests that the rendered gateway does not advertise h3 while the firewall omits UDP 443 (the defect class: a listener advertising a protocol the firewall drops).

Agent brief

Do:

  1. On the gateway front-door render (guest path internal/clan/frontdoor.go around L601, and any sibling front-door renderer that stands up Caddy on 443), make Caddy not advertise h3 — pin servers { protocols h1 h2 } (or the equivalent that stops it binding/advertising QUIC). Keep the firewall at TCP 80/443.
  2. Add a render test in internal/clan/*frontdoor*_test.go asserting the parity: the rendered config does not advertise h3 / does not bind UDP 443 while allowedUDPPorts omits 443. Model it on frontdoor_test.go:28.
  3. Add a docs/GOTCHAS.md entry (Symptom → Cause → Rule) for the defect class: a listener advertising a protocol the firewall drops — align the advertisement to the open ports, never the reverse without a posture-widening ruling.

Acceptance:

  • curl -sD - https://<apex>/ from a rendered gateway shows no alt-svc: h3 header (or no UDP 443 listener).
  • Chrome's dashboard GET /api/v1/overview no longer fails-to-fetch after the document loads.
  • New render test fails on the current tree and passes after the fix.
  • GOTCHAS entry appended in the same commit.

Drive note (from the reporter): Playwright's Chromium is the same engine, so founding drives that open the dashboard may be flaking on this today — worth a look once fixed.

> *This was generated by AI during triage.* **Category:** bug · **State:** ready-for-agent ## Verified against the codebase The defect is real in the tree. The rented gateway's guest front door renders `internal/clan/frontdoor.go:601`: ``` networking.firewall.allowedTCPPorts = [ 443 ]; ``` — TCP only, no `allowedUDPPorts`. Caddy on guest 443 binds UDP 443 (QUIC) and stamps `alt-svc: h3=":443"` by default, so the firewall drops exactly the transport the responses advertise. Chrome follows the alt-svc to h3 and the API fetches die on the silently-DROPped UDP. The existing render-test harness already asserts the public-port set literally (`internal/clan/frontdoor_test.go:28` → `allowedTCPPorts = [ 80 443 ]`), so the firewall/advertisement parity is cheaply provable there. Not redundant with GOTCHAS #58/#80 (both are ledger 409s, unrelated). ## Ruled by agent under ADR 0174 — veto anytime **Ruling:** the fix must *narrow the advertisement to match the firewall*, not *widen the firewall to match the advertisement*. Default to pinning Caddy so it never advertises h3 (`servers { protocols h1 h2 }`, and/or not binding UDP 443) on the gateway front doors. **Do not open a new public UDP 443 port as part of this ticket.** **Why this is a two-way door:** aligning the advertisement down opens no new public surface — it is revertible by a one-line commit and provable by a render test asserting the listener never advertises a protocol the firewall drops. Opening UDP 443, by contrast, is a *security-posture widening* (a new deliberately-public port) — that sits on the ADR 0174 one-way-door list, so a swarm worker must not self-authorize it. If h3 is later wanted for performance, opening the UDP port rides the human door as its own decision; it is not blocking this fix. **What proves it:** a new assertion in the `internal/clan` front-door render tests that the rendered gateway does not advertise h3 while the firewall omits UDP 443 (the defect class: a listener advertising a protocol the firewall drops). ## Agent brief **Do:** 1. On the gateway front-door render (guest path `internal/clan/frontdoor.go` around L601, and any sibling front-door renderer that stands up Caddy on 443), make Caddy not advertise h3 — pin `servers { protocols h1 h2 }` (or the equivalent that stops it binding/advertising QUIC). Keep the firewall at TCP 80/443. 2. Add a render test in `internal/clan/*frontdoor*_test.go` asserting the parity: the rendered config does not advertise h3 / does not bind UDP 443 while `allowedUDPPorts` omits 443. Model it on `frontdoor_test.go:28`. 3. Add a `docs/GOTCHAS.md` entry (Symptom → Cause → Rule) for the defect class: *a listener advertising a protocol the firewall drops — align the advertisement to the open ports, never the reverse without a posture-widening ruling.* **Acceptance:** - `curl -sD - https://<apex>/` from a rendered gateway shows no `alt-svc: h3` header (or no UDP 443 listener). - Chrome's dashboard `GET /api/v1/overview` no longer fails-to-fetch after the document loads. - New render test fails on the current tree and passes after the fix. - GOTCHAS entry appended in the same commit. **Drive note (from the reporter):** Playwright's Chromium is the same engine, so founding drives that open the dashboard may be flaking on this today — worth a look once fixed.

swarm-claim host=elitebook-distributed-server-03 run=20351
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=20351 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1334 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1334,
  "status": "success",
  "commits": [
    "7e251cd5"
  ],
  "changed_files": [
    "STATUS.md",
    "docs/GOTCHAS.md",
    "internal/clan/frontdoor.go",
    "internal/clan/frontdoor_test.go",
    "internal/clan/frontdoor_private_test.go",
    "internal/clan/frontdoor_mail_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/clan/ -run 'FrontDoor|Mail|Private|H3'",
      "exit_code": 0
    },
    {
      "command": "go build ./... && go vet ./... && go test ./... && golangci-lint run ./... (full push gate)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "curl -sD - from a rendered gateway shows no alt-svc: h3 header (or no UDP 443 listener)": "renderCaddy/renderPrivateCaddy now pin `servers { protocols h1 h2 }` (internal/clan/frontdoor.go renderCaddyGlobalOptions), so Caddy serves only h1/h2 and neither binds UDP 443 nor stamps alt-svc: h3; firewall stays TCP 80/443. Asserted by TestRenderFrontDoor_PinsH1H2NeverAdvertisesH3.",
    "Chrome's dashboard GET /api/v1/overview no longer fails-to-fetch after the document loads": "With h3 never advertised, Chrome never switches API fetches to the DROPped UDP 443 — every fetch stays on h2 (the transport curl already proved healthy). Root cause (advertise-a-dropped-transport) removed at the render.",
    "New render test fails on the current tree and passes after the fix": "git show HEAD~1:internal/clan/frontdoor.go had 0 occurrences of 'protocols h1 h2' (test's first assertion would red pre-fix); tests pass post-fix (exit 0).",
    "GOTCHAS entry appended in the same commit": "docs/GOTCHAS.md #201 (Symptom/Cause/Rule for the defect class) in commit 7e251cd5."
  },
  "summary": "Both front doors pin Caddy to h1+h2 so it never advertises HTTP/3 over a UDP 443 the firewall drops, killing the dashboard's 'Failed to fetch' in Chrome.",
  "blockers": []
}
**close-report** for #1334 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1334, "status": "success", "commits": [ "7e251cd5" ], "changed_files": [ "STATUS.md", "docs/GOTCHAS.md", "internal/clan/frontdoor.go", "internal/clan/frontdoor_test.go", "internal/clan/frontdoor_private_test.go", "internal/clan/frontdoor_mail_test.go" ], "tests": [ { "command": "go test ./internal/clan/ -run 'FrontDoor|Mail|Private|H3'", "exit_code": 0 }, { "command": "go build ./... && go vet ./... && go test ./... && golangci-lint run ./... (full push gate)", "exit_code": 0 } ], "criteria": { "curl -sD - from a rendered gateway shows no alt-svc: h3 header (or no UDP 443 listener)": "renderCaddy/renderPrivateCaddy now pin `servers { protocols h1 h2 }` (internal/clan/frontdoor.go renderCaddyGlobalOptions), so Caddy serves only h1/h2 and neither binds UDP 443 nor stamps alt-svc: h3; firewall stays TCP 80/443. Asserted by TestRenderFrontDoor_PinsH1H2NeverAdvertisesH3.", "Chrome's dashboard GET /api/v1/overview no longer fails-to-fetch after the document loads": "With h3 never advertised, Chrome never switches API fetches to the DROPped UDP 443 — every fetch stays on h2 (the transport curl already proved healthy). Root cause (advertise-a-dropped-transport) removed at the render.", "New render test fails on the current tree and passes after the fix": "git show HEAD~1:internal/clan/frontdoor.go had 0 occurrences of 'protocols h1 h2' (test's first assertion would red pre-fix); tests pass post-fix (exit 0).", "GOTCHAS entry appended in the same commit": "docs/GOTCHAS.md #201 (Symptom/Cause/Rule for the defect class) in commit 7e251cd5." }, "summary": "Both front doors pin Caddy to h1+h2 so it never advertises HTTP/3 over a UDP 443 the firewall drops, killing the dashboard's 'Failed to fetch' in Chrome.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1334
No description provided.