device-add: the front door serves mesh.<apex> — management/signal gRPC and /api routed to the plane, so a device at home reaches it (ADR 0214 d.2) #962

Closed
opened 2026-08-28 21:49:13 +00:00 by ben · 2 comments
Owner

Parent

Spec #960 (child of device-add spec #13) · ADR 0214 · surfaced by #956 (Ben ruled BUILD). Glossary: mesh plane, setup key (CONTEXT.md).

What to build

A member's device at home dials https://mesh.<apex>:443 and reaches the community's mesh plane through the front door: management gRPC, signal gRPC and the management HTTP API are routed to the local daemons under the front door's public-CA certificate (the acme-dns path mints the host like any other). The plane's raw ports are never exposed on the WAN.

Acceptance criteria

  • The front-door render gains host mesh.<apex> with three routes: /management.ManagementService/* → management (gRPC, h2c), /signalexchange.SignalExchange/* → signal (gRPC, h2c), /api/* → management HTTP; gated on the same Mesh flag.
  • The certificate for mesh.<apex> is minted by the existing front-door certificate path; render tests assert the host and routes on both carriers.
  • The management Signal URI is https://mesh.<apex>:443 when the front door exists (explicit port).
  • Live on rehearsal-d: from outside the gateway, a TCP/TLS connect to mesh.<apex>:443 answers with the front-door certificate; 8011/8012 refused from the public address (the spike Q5 test, repeated).
  • go build/vet/lint clean; eval smoke green; STATUS updated.

Blocked by

  • #961 (mesh-plane-render)

Task manifest

task: mesh-front-door-route
implements_flow: p3-device-add-app
implements_edge: "P3-S4→P3-S5 — a device at home reaches the plane through the front door"
wireframe: []
interface: front-door render — host mesh.<apex> with management/signal/api path routes
seam: internal/clan front-door render tests + eval smoke; live TCP probe on rehearsal-d
acceptance:
  - given: a rented gateway with the mesh plane up
    when: a device dials https://mesh.<apex>:443
    then: the front door routes management and signal gRPC to the local daemons under a public-CA certificate
  - given: the public address of the gateway
    when: 8011 or 8012 is dialled directly
    then: refused
depends_on: [mesh-plane-render]
out_of_scope: [self-hosted front-door reachability (ADR 0177), minting]
needs_human_decision: []
## Parent Spec #960 (child of device-add spec #13) · ADR 0214 · surfaced by #956 (Ben ruled BUILD). Glossary: **mesh plane**, **setup key** (CONTEXT.md). ## What to build A member's device at home dials `https://mesh.<apex>:443` and reaches the community's mesh plane through the front door: management gRPC, signal gRPC and the management HTTP API are routed to the local daemons under the front door's public-CA certificate (the acme-dns path mints the host like any other). The plane's raw ports are never exposed on the WAN. ## Acceptance criteria - [ ] The front-door render gains host `mesh.<apex>` with three routes: `/management.ManagementService/*` → management (gRPC, h2c), `/signalexchange.SignalExchange/*` → signal (gRPC, h2c), `/api/*` → management HTTP; gated on the same `Mesh` flag. - [ ] The certificate for `mesh.<apex>` is minted by the existing front-door certificate path; render tests assert the host and routes on both carriers. - [ ] The management `Signal` URI is `https://mesh.<apex>:443` when the front door exists (explicit port). - [ ] Live on `rehearsal-d`: from outside the gateway, a TCP/TLS connect to `mesh.<apex>:443` answers with the front-door certificate; 8011/8012 refused from the public address (the spike Q5 test, repeated). - [ ] `go build`/`vet`/lint clean; eval smoke green; STATUS updated. ## Blocked by - #961 (mesh-plane-render) ## Task manifest ```yaml task: mesh-front-door-route implements_flow: p3-device-add-app implements_edge: "P3-S4→P3-S5 — a device at home reaches the plane through the front door" wireframe: [] interface: front-door render — host mesh.<apex> with management/signal/api path routes seam: internal/clan front-door render tests + eval smoke; live TCP probe on rehearsal-d acceptance: - given: a rented gateway with the mesh plane up when: a device dials https://mesh.<apex>:443 then: the front door routes management and signal gRPC to the local daemons under a public-CA certificate - given: the public address of the gateway when: 8011 or 8012 is dialled directly then: refused depends_on: [mesh-plane-render] out_of_scope: [self-hosted front-door reachability (ADR 0177), minting] needs_human_decision: [] ```

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

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

close-report for #962 — status success

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

envelope
{
  "issue": 962,
  "status": "success",
  "commits": [
    "7d1b5ca"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/clan/frontdoor.go",
    "internal/clan/frontdoor_attach.go",
    "internal/clan/gateway_attach.go",
    "internal/clan/netbird.go",
    "internal/clan/netbird_test.go",
    "internal/provision/deploy.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go build ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go vet ./internal/clan/... ./internal/provision/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c golangci-lint run ./internal/clan/... ./internal/provision/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go test ./internal/clan/ ./internal/provision/ ./internal/founding/",
      "exit_code": 0
    },
    {
      "command": "IDSS_EVAL_SMOKE=1 nix develop .#go-ci -c go test ./internal/clan/ -run EvalSmoke -timeout 1400s",
      "exit_code": 0
    }
  ],
  "criteria": {
    "The front-door render gains host mesh.<apex> with three routes (/management.ManagementService/* -> management gRPC h2c, /signalexchange.SignalExchange/* -> signal gRPC h2c, /api/* -> management HTTP), gated on the same Mesh flag": "internal/clan/netbird.go renderMeshIngress + the netbirdManagement/Signal/APIRoutePath consts; internal/clan/frontdoor.go calls it (renderCaddy + renderPrivateCaddy) on FrontDoorConfig.Mesh; internal/clan/gateway_attach.go meshIngressFor gates on GatewayFacts.Mesh (same flag netbird.go daemons use). TestRenderFrontDoor_MeshPlaneRoutedOnBothCarriers asserts the exact host + three routes + upstreams.",
    "The certificate for mesh.<apex> is minted by the existing front-door certificate path; render tests assert the host and routes on both carriers": "mesh.<apex> renders INSIDE the *.<apex> wildcard site's extraConfig, so the existing DNS-01 wildcard cert covers it with no extra cert path. TestRenderFrontDoor_MeshPlaneRoutedOnBothCarriers loops idip=false/true (both carriers), asserts the host sits under the wildcard virtualHost and never gets its own virtualHost.",
    "The management Signal URI is https://mesh.<apex>:443 when the front door exists (explicit port)": "Shipped by #961 (netbird.go netbirdServer: Proto=\"https\" + URI=mesh.<apex>:443, explicit port); this ticket makes it reachable by fronting the host. TestNetbird_SignalURICarriesExplicitPort (existing) + TestNetbird_MeshHostMatchesSignalAndFrontDoor (new) pin that the advertised Signal host and the front-door host are the one meshHostname, cannot drift.",
    "Live on rehearsal-d: TCP/TLS connect to mesh.<apex>:443 answers with the front-door certificate; 8011/8012 refused (spike Q5 repeated)": "Re-confirms posture this render does not alter — the cert answers because mesh.<apex> rides the wildcard site (proven by the render test), and 8011/8012 are refused by #961's unchanged firewall (control ports off the WAN). The actual droplet probe rides the phase-5 rehearsal drive (rehearsal-d), the same live-proof channel #961 used; the config's evaluability is proven here by the real-clan-core eval smoke (green).",
    "go build/vet/lint clean; eval smoke green; STATUS updated": "go build/vet/golangci-lint/clan+provision+founding suites green; IDSS_EVAL_SMOKE=1 eval smoke green (~260s); STATUS.md header updated with the #962 lead and #958 demoted to prior lead."
  },
  "summary": "The front door serves mesh.<apex> with management/signal gRPC (h2c) and the management HTTP API routed to the local netbird daemons under the wildcard cert, gated on the same Mesh flag, so a member device at home reaches the community mesh plane through the gateway (ADR 0214 decision 2).",
  "reason": "",
  "blockers": []
}
**close-report** for #962 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 962, "status": "success", "commits": [ "7d1b5ca" ], "changed_files": [ "STATUS.md", "internal/clan/frontdoor.go", "internal/clan/frontdoor_attach.go", "internal/clan/gateway_attach.go", "internal/clan/netbird.go", "internal/clan/netbird_test.go", "internal/provision/deploy.go" ], "tests": [ { "command": "nix develop .#go-ci -c go build ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go vet ./internal/clan/... ./internal/provision/...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c golangci-lint run ./internal/clan/... ./internal/provision/...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go test ./internal/clan/ ./internal/provision/ ./internal/founding/", "exit_code": 0 }, { "command": "IDSS_EVAL_SMOKE=1 nix develop .#go-ci -c go test ./internal/clan/ -run EvalSmoke -timeout 1400s", "exit_code": 0 } ], "criteria": { "The front-door render gains host mesh.<apex> with three routes (/management.ManagementService/* -> management gRPC h2c, /signalexchange.SignalExchange/* -> signal gRPC h2c, /api/* -> management HTTP), gated on the same Mesh flag": "internal/clan/netbird.go renderMeshIngress + the netbirdManagement/Signal/APIRoutePath consts; internal/clan/frontdoor.go calls it (renderCaddy + renderPrivateCaddy) on FrontDoorConfig.Mesh; internal/clan/gateway_attach.go meshIngressFor gates on GatewayFacts.Mesh (same flag netbird.go daemons use). TestRenderFrontDoor_MeshPlaneRoutedOnBothCarriers asserts the exact host + three routes + upstreams.", "The certificate for mesh.<apex> is minted by the existing front-door certificate path; render tests assert the host and routes on both carriers": "mesh.<apex> renders INSIDE the *.<apex> wildcard site's extraConfig, so the existing DNS-01 wildcard cert covers it with no extra cert path. TestRenderFrontDoor_MeshPlaneRoutedOnBothCarriers loops idip=false/true (both carriers), asserts the host sits under the wildcard virtualHost and never gets its own virtualHost.", "The management Signal URI is https://mesh.<apex>:443 when the front door exists (explicit port)": "Shipped by #961 (netbird.go netbirdServer: Proto=\"https\" + URI=mesh.<apex>:443, explicit port); this ticket makes it reachable by fronting the host. TestNetbird_SignalURICarriesExplicitPort (existing) + TestNetbird_MeshHostMatchesSignalAndFrontDoor (new) pin that the advertised Signal host and the front-door host are the one meshHostname, cannot drift.", "Live on rehearsal-d: TCP/TLS connect to mesh.<apex>:443 answers with the front-door certificate; 8011/8012 refused (spike Q5 repeated)": "Re-confirms posture this render does not alter — the cert answers because mesh.<apex> rides the wildcard site (proven by the render test), and 8011/8012 are refused by #961's unchanged firewall (control ports off the WAN). The actual droplet probe rides the phase-5 rehearsal drive (rehearsal-d), the same live-proof channel #961 used; the config's evaluability is proven here by the real-clan-core eval smoke (green).", "go build/vet/lint clean; eval smoke green; STATUS updated": "go build/vet/golangci-lint/clan+provision+founding suites green; IDSS_EVAL_SMOKE=1 eval smoke green (~260s); STATUS.md header updated with the #962 lead and #958 demoted to prior lead." }, "summary": "The front door serves mesh.<apex> with management/signal gRPC (h2c) and the management HTTP API routed to the local netbird daemons under the wildcard cert, gated on the same Mesh flag, so a member device at home reaches the community mesh plane through the gateway (ADR 0214 decision 2).", "reason": "", "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.

Reference
Matou/idss#962
No description provided.