own-VPS front door never serves the community apex — S12's portal address dies with ERR_SSL_PROTOCOL_ERROR #512

Closed
opened 2026-08-14 05:39:04 +00:00 by ben · 2 comments
Owner

Evidence (drive 20260814T050102Z, #492)

Sign-in leg red at its final step:

page.goto: net::ERR_SSL_PROTOCOL_ERROR at https://rehearsal.idss.nz/

Everything before it worked — the password ceremony completed end-to-end on the live public IdP for the first time: artifacts/ceremony/login-done.png shows the operator signed in at kanidm /ui/apps, branded "E2E Drive". The red is the very next navigation: S12's portal address (https://<apex>) — nothing answers TLS at the bare apex.

Root cause (verified in the render, not a race)

renderCaddy (internal/clan/frontdoor.go:250) builds exactly one site: virtualHosts."*.<apex>". A wildcard covers subdomains only — the bare apex has no site address, no cert, no route. The private path masks this: its S12 portal address is the control-plane forward (plain HTTP, foundingPrefix.ts), so the apex door was never exercised until own-VPS, where portalAddress(d) = https:// + Address.Host = the apex (internal/founding/handoff.go:687).

The backend is already there and green on this drive: fleetwire supply stages the built dashboard to /srv/ourcloud/dashboard (internal/fleetwire/supply.go:85), and the gateway control-plane unit serves SPA+API on loopback :8080 with OURCLOUD_DASHBOARD_DIR exported (internal/clan/vmguest.go:363). Only the door is missing.

Fix direction

Both changes in renderCaddy (shared by both renders — the dual-render hazard applies, pin both):

  1. The apex joins the wildcard site: virtualHosts."*.<apex>".serverAliases = [ <apex> ] (nixos caddy module). The same tls { dns acmedns … } block then obtains the apex's cert through the same delegation — the broker's _acme-challenge.<slug> CNAME (#508) already covers the apex's challenge name (both the wildcard's and the apex's challenges live at _acme-challenge.<apex>). No broker change. This mirrors the private path's guest-CA cert, which deliberately SANs apex, *.apex (frontdoor.go:511) — the public side finally keeps the same promise.
  2. A host-matched portal route for the apex: @portal host <apex> → reverse_proxy to the control plane (the same loopback target GateURL points at) — the dashboard SPA + API. Ungated for now: exact parity with today's private path. #511 interaction: DDR 0172 will put the panel behind the auth gate; that lands on this route (or moves it to admin.<apex>) under #511's own spec — do not pre-implement the gate here.

Test: render-seam pins in the existing front-door suite — apex serverAlias present in both renders, portal route host-matched to the apex proxying the control-plane target, service routes and IdP route untouched.

Why the reporter didn't file this

Reporter hit its cap/limit at 05:07Z and parked #492 ready-for-human. Filed by hand with the render verified.

Blocks #492 (drive 20260814T050102Z).

## Evidence (drive `20260814T050102Z`, #492) Sign-in leg red at its final step: ``` page.goto: net::ERR_SSL_PROTOCOL_ERROR at https://rehearsal.idss.nz/ ``` Everything before it worked — **the password ceremony completed end-to-end on the live public IdP for the first time**: `artifacts/ceremony/login-done.png` shows the operator signed in at kanidm `/ui/apps`, branded "E2E Drive". The red is the very next navigation: S12's portal address (`https://<apex>`) — nothing answers TLS at the bare apex. ## Root cause (verified in the render, not a race) `renderCaddy` (internal/clan/frontdoor.go:250) builds exactly one site: `virtualHosts."*.<apex>"`. A wildcard covers subdomains only — **the bare apex has no site address, no cert, no route**. The private path masks this: its S12 portal address is the control-plane forward (plain HTTP, foundingPrefix.ts), so the apex door was never exercised until own-VPS, where `portalAddress(d)` = `https://` + Address.Host = the apex (internal/founding/handoff.go:687). The backend is already there and green on this drive: fleetwire supply stages the built dashboard to `/srv/ourcloud/dashboard` (internal/fleetwire/supply.go:85), and the gateway control-plane unit serves SPA+API on loopback :8080 with `OURCLOUD_DASHBOARD_DIR` exported (internal/clan/vmguest.go:363). Only the door is missing. ## Fix direction Both changes in `renderCaddy` (shared by both renders — the dual-render hazard applies, pin both): 1. **The apex joins the wildcard site**: `virtualHosts."*.<apex>".serverAliases = [ <apex> ]` (nixos caddy module). The same `tls { dns acmedns … }` block then obtains the apex's cert through the same delegation — the broker's `_acme-challenge.<slug>` CNAME (#508) already covers the apex's challenge name (both the wildcard's and the apex's challenges live at `_acme-challenge.<apex>`). **No broker change.** This mirrors the private path's guest-CA cert, which deliberately SANs `apex, *.apex` (frontdoor.go:511) — the public side finally keeps the same promise. 2. **A host-matched portal route for the apex**: `@portal host <apex>` → `reverse_proxy` to the control plane (the same loopback target `GateURL` points at) — the dashboard SPA + API. Ungated for now: exact parity with today's private path. **#511 interaction**: DDR 0172 will put the panel behind the auth gate; that lands on this route (or moves it to `admin.<apex>`) under #511's own spec — do not pre-implement the gate here. Test: render-seam pins in the existing front-door suite — apex serverAlias present in both renders, portal route host-matched to the apex proxying the control-plane target, service routes and IdP route untouched. ## Why the reporter didn't file this Reporter hit its cap/limit at 05:07Z and parked #492 ready-for-human. Filed by hand with the render verified. Blocks #492 (drive `20260814T050102Z`).
Author
Owner

swarm-claim host=matou-dev-server-01 run=5898
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=5898 (automated multi-host claim — lowest live claim id works this ticket)
Author
Owner

close-report for #512 — status success

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

envelope
{
  "issue": 512,
  "status": "success",
  "commits": [
    "aa04d5bcc1b6560523ae0551923f6207f9fa4997"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/clan/frontdoor.go",
    "internal/clan/frontdoor_private_test.go",
    "internal/clan/frontdoor_test.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go test ./internal/clan/...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "The apex joins the wildcard site (serverAliases = [ apex ]) in both renders, cert via the same acme-dns delegation": "frontdoor.go renderCaddy + renderPrivateCaddy emit virtualHosts.\"*.<apex>\".serverAliases = [ <apex> ]; pinned by TestRenderFrontDoor_ApexJoinsTheWildcardSite and TestRenderPrivateFrontDoor_ApexJoinsTheWildcardSiteAndPortal",
    "A host-matched portal route for the apex proxies the control-plane target in both renders, ungated": "renderPortalRoute helper emits @portal host <apex> -> reverse_proxy http://127.0.0.1:8080 (cfg.GateURL public / controlPlaneLoopback private), no forward_auth; pinned by TestRenderFrontDoor_ApexPortalRouteToControlPlane and the private twin",
    "Service routes and IdP route untouched": "existing suite (TestRenderFrontDoor_IdPRouteHasNoForwardAuth, _ServiceRouteIsGatedAndOverMesh, private id/files route tests) still green after the change",
    "No broker change": "changed_files contains no broker/ path"
  },
  "summary": "The own-VPS front door serves the community apex: the bare apex joins the wildcard site as a serverAlias and a host-matched @portal route reverse-proxies the control plane, pinned in both renders.",
  "blockers": []
}
**close-report** for #512 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; closing. <details><summary>envelope</summary> ```json { "issue": 512, "status": "success", "commits": [ "aa04d5bcc1b6560523ae0551923f6207f9fa4997" ], "changed_files": [ "STATUS.md", "internal/clan/frontdoor.go", "internal/clan/frontdoor_private_test.go", "internal/clan/frontdoor_test.go" ], "tests": [ { "command": "nix develop .#go-ci --command go test ./internal/clan/...", "exit_code": 0 } ], "criteria": { "The apex joins the wildcard site (serverAliases = [ apex ]) in both renders, cert via the same acme-dns delegation": "frontdoor.go renderCaddy + renderPrivateCaddy emit virtualHosts.\"*.<apex>\".serverAliases = [ <apex> ]; pinned by TestRenderFrontDoor_ApexJoinsTheWildcardSite and TestRenderPrivateFrontDoor_ApexJoinsTheWildcardSiteAndPortal", "A host-matched portal route for the apex proxies the control-plane target in both renders, ungated": "renderPortalRoute helper emits @portal host <apex> -> reverse_proxy http://127.0.0.1:8080 (cfg.GateURL public / controlPlaneLoopback private), no forward_auth; pinned by TestRenderFrontDoor_ApexPortalRouteToControlPlane and the private twin", "Service routes and IdP route untouched": "existing suite (TestRenderFrontDoor_IdPRouteHasNoForwardAuth, _ServiceRouteIsGatedAndOverMesh, private id/files route tests) still green after the change", "No broker change": "changed_files contains no broker/ path" }, "summary": "The own-VPS front door serves the community apex: the bare apex joins the wildcard site as a serverAlias and a host-matched @portal route reverse-proxies the control plane, pinned in both renders.", "blockers": [] } ``` </details>
ben closed this issue 2026-08-14 06:22:37 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#512
No description provided.