fleet: remote-site (cross-site) mesh enrolment — build the non-LAN path to management/signal (mechanism ruling needed) #543

Closed
opened 2026-08-14 19:33:07 +00:00 by ben · 6 comments
Owner

Filed from #329, whose doc-vs-reality investigation is complete: spike #5 exercised the LAN-nic bootstrap for same-LAN peers only (node1–3 as libvirt VMs on one droplet's 10.100.0.0/24; the Netbird module opens management(8011)/signal(8012) on the shared LAN nic ens2), and a node at a different physical site genuinely has no bootstrap path to management/signal — the three candidates all fail at enrolment:

  • public internet — refused (only Caddy's 80/443 answer; 8011/8012 give connection refused, proven from outside the fleet in spike #5);
  • the gateway's LAN — unreachable (the remote node isn't on it);
  • the mesh wt0 — does not exist yet (the chicken-and-egg the LAN nic exists to break).

coturn does not help: it relays the WireGuard data plane after enrolment, once a peer has already reached management/signal. So remote-site enrolment needs a non-LAN path to management/signal. This is a core case, not an edge one — the product targets communities whose machines sit at homes, an office and a marae, and the fleet topology's own zone-spread guidance ("different building or zone") assumes it.

The architecture doc already records the proven scope and this open gap (docs/architecture/03-fleet-topology.md, Proven scope note after the bootstrap sequence + the reading-notes bullet). This ticket tracks the implementation, which cannot start until the mechanism is ruled.

Why human

One-way-door ruling (ADR 0174). Every non-LAN path touches the "only deliberately public surface is Caddy on 80/443" invariant — this is precisely the class ADR 0174 rule 3 names as always-stop-on-human ("security-posture widenings: a new deliberately-public surface or port... the #329-class ruling" — #329 is this ticket's own parent). No agent session may adopt a default here under the ADR's reversibility rule; a security-posture widening is excluded from delegation regardless of how revertible the commit would be. Ben rules among:

  • (a) open 8011/8012 publicly — new public ports; contradicts the invariant directly.
  • (b) reverse-proxy management/signal through Caddy on 443 — the default Netbird deployment (Q3 gotcha 1: Netbird advertises signal at ${domain}:443 by default, which OurCloud deliberately overrode to plaintext mesh ports). Keeps one public port but makes management/signal publicly reachable through it.
  • (c) a relay/invite mechanism — a different enrolment path for the cross-site case (e.g. bring-your-own-mesh-invite), avoiding new public reach at the cost of a new flow.
  • (d) none-public — rule cross-site mesh out of scope for v1. Interacts with the IPv6 leg (#332), which would give remote nodes a globally-routable path with no NAT and could rescue the multi-site mesh without any new public IPv4 surface.

Proposed default ruling (not agent-adoptable — flagged per ADR 0174 rule 4 so the digest carries a one-line ask): (b), reverse-proxying management/signal through Caddy on 443, is the smallest deviation from the current invariant (still exactly one public port, still fronted by Caddy/TLS same as everything else deliberately public) and is Netbird's own well-trodden default rather than a bespoke flow — but this trades off against (c)'s stronger "no new public reach" property, which is why it's a threat-model call and not a default this session can take. Whichever way it goes, (d)'s IPv6 interaction with #332 is worth reading first.

Definition of done

Once (a/b/c/d) is ruled: re-file as a doc correction (if none-public) or build the chosen path — the enrolment mechanism that lets a node at a different physical site reach management/signal at bootstrap, with a lab-proven genuinely-remote enrolment (an off-LAN node joins the mesh end to end).

Related: #329 (the investigation + doc record this derives from), #332 (IPv6 leg — the multi-site mesh escape hatch), #328 (the reachability gate doesn't probe mesh/relay ports today).

Filed from #329, whose doc-vs-reality investigation is complete: spike #5 exercised the LAN-nic bootstrap for **same-LAN peers only** (node1–3 as libvirt VMs on one droplet's `10.100.0.0/24`; the Netbird module opens management(8011)/signal(8012) on the shared LAN nic `ens2`), and a node at a **different physical site** genuinely has no bootstrap path to management/signal — the three candidates all fail at enrolment: - **public internet** — refused (only Caddy's 80/443 answer; 8011/8012 give `connection refused`, proven from outside the fleet in spike #5); - **the gateway's LAN** — unreachable (the remote node isn't on it); - **the mesh `wt0`** — does not exist yet (the chicken-and-egg the LAN nic exists to break). coturn does not help: it relays the WireGuard **data** plane *after* enrolment, once a peer has already reached management/signal. So remote-site enrolment needs a **non-LAN path to management/signal**. This is a core case, not an edge one — the product targets communities whose machines sit at homes, an office and a marae, and the fleet topology's own zone-spread guidance ("different building or zone") assumes it. The architecture doc already records the proven scope and this open gap (`docs/architecture/03-fleet-topology.md`, *Proven scope* note after the bootstrap sequence + the reading-notes bullet). This ticket tracks the **implementation**, which cannot start until the mechanism is ruled. ## Why human **One-way-door ruling (ADR 0174).** Every non-LAN path touches the **"only deliberately public surface is Caddy on 80/443"** invariant — this is precisely the class ADR 0174 rule 3 names as always-stop-on-human ("security-posture widenings: a new deliberately-public surface or port... the **#329-class ruling**" — #329 is this ticket's own parent). No agent session may adopt a default here under the ADR's reversibility rule; a security-posture widening is excluded from delegation regardless of how revertible the commit would be. Ben rules among: - **(a) open 8011/8012 publicly** — new public ports; contradicts the invariant directly. - **(b) reverse-proxy management/signal through Caddy on 443** — the *default* Netbird deployment (Q3 gotcha 1: Netbird advertises signal at `${domain}:443` by default, which OurCloud deliberately overrode to plaintext mesh ports). Keeps one public port but makes management/signal publicly reachable through it. - **(c) a relay/invite mechanism** — a different enrolment path for the cross-site case (e.g. bring-your-own-mesh-invite), avoiding new public reach at the cost of a new flow. - **(d) none-public** — rule cross-site mesh out of scope for v1. Interacts with the IPv6 leg (#332), which would give remote nodes a globally-routable path with no NAT and could rescue the multi-site mesh without any new public IPv4 surface. **Proposed default ruling (not agent-adoptable — flagged per ADR 0174 rule 4 so the digest carries a one-line ask):** (b), reverse-proxying management/signal through Caddy on 443, is the smallest deviation from the current invariant (still exactly one public port, still fronted by Caddy/TLS same as everything else deliberately public) and is Netbird's own well-trodden default rather than a bespoke flow — but this trades off against (c)'s stronger "no new public reach" property, which is why it's a threat-model call and not a default this session can take. Whichever way it goes, (d)'s IPv6 interaction with #332 is worth reading first. ## Definition of done Once (a/b/c/d) is ruled: re-file as a doc correction (if none-public) or build the chosen path — the enrolment mechanism that lets a node at a different physical site reach management/signal at bootstrap, with a lab-proven genuinely-remote enrolment (an off-LAN node joins the mesh end to end). Related: #329 (the investigation + doc record this derives from), #332 (IPv6 leg — the multi-site mesh escape hatch), #328 (the reachability gate doesn't probe mesh/relay ports today).
Author
Owner

Ben ruled (live digest, 2026-08-14): option (b) — management/signal reverse-proxied through Caddy on 443, upstream Netbird's default shape. Recorded as ADR 0177 (docs/adr/0177-remote-site-enrolment-rides-the-front-door.md). The 80/443-only invariant holds literally; reach is gated by Netbird's enrolment auth (setup keys/JWT), not network position. (a)/(c)/(d) rejected — rationale in the ADR.

Relabelled ready-for-session: the build (Netbird module advertises front-door endpoints, Caddy routes them) plus the acceptance's lab-proven genuinely-remote enrolment need clan-lab standing a swarm sandbox doesn't have. Fleet-topology doc updates ride the build commit.

**Ben ruled (live digest, 2026-08-14): option (b)** — management/signal reverse-proxied through Caddy on 443, upstream Netbird's default shape. Recorded as **ADR 0177** (`docs/adr/0177-remote-site-enrolment-rides-the-front-door.md`). The 80/443-only invariant holds literally; reach is gated by Netbird's enrolment auth (setup keys/JWT), not network position. (a)/(c)/(d) rejected — rationale in the ADR. Relabelled `ready-for-session`: the build (Netbird module advertises front-door endpoints, Caddy routes them) plus the acceptance's **lab-proven genuinely-remote enrolment** need clan-lab standing a swarm sandbox doesn't have. Fleet-topology doc updates ride the build commit.
Author
Owner

Ruled by agent under ADR 0174 — veto anytime.

Ruling: this is a one-way door, not a two-way door — no self-ruling possible. Checked against ADR 0174's own list (docs/adr/0174-two-way-door-rulings-default-to-the-agent.md, rule 3): "security-posture widenings: a new deliberately-public surface or port... (the #329-class ruling)" is named explicitly, and #329 is this ticket's own parent — this ticket is that named precedent. All three implementation-worthy candidates (a, b, c) widen or replace the "only Caddy 80/443 is deliberately public" invariant; only (d) doesn't, and (d) is itself a scope ruling ("rule cross-site mesh out for v1"), not an implementation task. There's no independent two-way-door part of this ticket left to finish — the ticket says so itself ("cannot start until the mechanism is ruled") — so nothing was actioned beyond formatting the ask.

What I did: reformatted the ticket body so it carries an explicit ## Why human line (previous heading text conveyed the same thing but didn't match the label bar's literal convention in docs/agents/triage-labels.md) and a proposed default ((b), reverse-proxy through Caddy 443 — smallest deviation + Netbird's own default) so the digest ask is a one-liner Ben can approve or override, per ADR 0174 rule 4. The default is flagged as not agent-adoptable — I'm not ruling it, just shortening Ben's read.

Label: ready-for-session → ready-for-human (was mislabelled — this needs Ben's ruling, not a session's standing; nothing here needs host credentials or live-infra access, just a decision).

Leaving open. Not closing — the ticket's definition of done is the implementation, which starts after the ruling.

Ruled by agent under ADR 0174 — veto anytime. **Ruling: this is a one-way door, not a two-way door — no self-ruling possible.** Checked against ADR 0174's own list (`docs/adr/0174-two-way-door-rulings-default-to-the-agent.md`, rule 3): "security-posture widenings: a new deliberately-public surface or port... (the **#329-class ruling**)" is named explicitly, and #329 is this ticket's own parent — this ticket *is* that named precedent. All three implementation-worthy candidates (a, b, c) widen or replace the "only Caddy 80/443 is deliberately public" invariant; only (d) doesn't, and (d) is itself a scope ruling ("rule cross-site mesh out for v1"), not an implementation task. There's no independent two-way-door part of this ticket left to finish — the ticket says so itself ("cannot start until the mechanism is ruled") — so nothing was actioned beyond formatting the ask. **What I did:** reformatted the ticket body so it carries an explicit `## Why human` line (previous heading text conveyed the same thing but didn't match the label bar's literal convention in `docs/agents/triage-labels.md`) and a proposed default ((b), reverse-proxy through Caddy 443 — smallest deviation + Netbird's own default) so the digest ask is a one-liner Ben can approve or override, per ADR 0174 rule 4. The default is flagged as *not* agent-adoptable — I'm not ruling it, just shortening Ben's read. **Label:** `ready-for-session` → `ready-for-human` (was mislabelled — this needs Ben's ruling, not a session's standing; nothing here needs host credentials or live-infra access, just a decision). Leaving open. Not closing — the ticket's definition of done is the implementation, which starts after the ruling.
Author
Owner

Ruling confirmed (Ben, 2026-08-19, live session): option (b) — management/signal reverse-proxied through Caddy on 443. This was in fact already ruled 2026-08-14 and recorded as ADR 0177 (docs/adr/0177-remote-site-enrolment-rides-the-front-door.md, status: accepted) — the ticket label was never flipped afterwards. Ben re-confirmed (b) today.

Implementation per the ADR's consequence paragraph: Netbird module's advertised endpoints move to front-door addresses, Caddy routes them, docs/architecture/03-fleet-topology.md port table + bootstrap sequence update with the build, and the arc closes only on a lab-proven genuinely-remote enrolment (off-LAN node joins the mesh end to end). Armed ready-for-agent.

**Ruling confirmed (Ben, 2026-08-19, live session): option (b)** — management/signal reverse-proxied through Caddy on 443. This was in fact already ruled 2026-08-14 and recorded as **ADR 0177** (`docs/adr/0177-remote-site-enrolment-rides-the-front-door.md`, status: accepted) — the ticket label was never flipped afterwards. Ben re-confirmed (b) today. Implementation per the ADR's consequence paragraph: Netbird module's advertised endpoints move to front-door addresses, Caddy routes them, `docs/architecture/03-fleet-topology.md` port table + bootstrap sequence update with the build, and the arc closes only on a lab-proven genuinely-remote enrolment (off-LAN node joins the mesh end to end). Armed ready-for-agent.
Author
Owner

Build landed (option b / ADR 0177), commit 9ff8482 on main. The front-door cross-site enrolment path is now declarative in the spike #5 clan config:

  • spikes/kanidm-netbird/clan/modules/netbird.nix — new frontDoorHost gateway option; when set, management advertises Signal at https://<host> (Caddy's 443) instead of the plaintext mesh port (empty keeps spike #5's same-LAN-only shape). LAN fast path unchanged.
  • spikes/kanidm-netbird/clan/machines/node1/gateway.nix — Caddy path-routes the netbird gRPC/REST prefixes: /api/* + /management.ManagementService/* → management (8011), /signalexchange.SignalExchange/* → signal (8012), both h2c://127.0.0.1 (gRPC over cleartext HTTP/2 to the plaintext backends on localhost); kanidm is the fallback handler. No new public port — the only listening public surface is still Caddy on 80/443; what widens is reach, gated by Netbird's setup-key/JWT auth, exactly as ADR 0177 rules.
  • spikes/kanidm-netbird/clan/clan.nix — sets the front door; node3 dials https://clan-lab.matou.nz as the off-LAN bootstrap shape.
  • Docs: docs/architecture/03-fleet-topology.md (diagram, port table, bootstrap sequence now branches LAN-fast-path vs front-door, reading notes, decisions) + ADR 0177's consequence + STATUS.md.

Seam check: nix-instantiate --parse passes on all three changed .nix files (the spike configs aren't wired into the flake's nixosConfigurations, so parse is the runnable in-sandbox check; the module system + Caddyfile only fully evaluate under clan-core, which the sandbox lacks).

Why human / session (not closing)

The DoD's arc-closer — a lab-proven genuinely-remote (off-LAN) enrolment — cannot be produced by the disposable clan-lab a swarm worker uses: it is single-droplet, same-NAT (node1–3 on 10.100.0.0/24) with simulated public reachability (the host port-forwards 80/443 to node1), so it structurally cannot host a node at a different physical site. Proving the front-door path really carries enrolment where the LAN path can't needs a multi-site lab — e.g. two clan-lab droplets (genuinely different networks / public IPs), the gateway on lab A with DNS + ACME, and a netbird peer on lab B enrolling over the real internet via https://clan-lab.matou.nz (443) → Caddy → management/signal → wt0 comes up, proven by TCP-port test per the mauke rule. That is a live-infrastructure operation needing an interactive session's lab standing (clan-lab + lab-dns), which a swarm sandbox lacks — exactly why this was ready-for-session before. The mechanism ruling itself is already made (ADR 0177), so this is not a one-way-door for Ben; it just needs a session to run the proof.

Relabelled ready-for-agent → ready-for-session. The build is on main; the ticket stays open for the genuinely-remote lab proof.

**Build landed (option b / ADR 0177), commit `9ff8482` on `main`.** The front-door cross-site enrolment path is now declarative in the spike #5 clan config: - `spikes/kanidm-netbird/clan/modules/netbird.nix` — new `frontDoorHost` gateway option; when set, management advertises **Signal** at `https://<host>` (Caddy's 443) instead of the plaintext mesh port (empty keeps spike #5's same-LAN-only shape). LAN fast path unchanged. - `spikes/kanidm-netbird/clan/machines/node1/gateway.nix` — Caddy path-routes the netbird gRPC/REST prefixes: `/api/*` + `/management.ManagementService/*` → management (8011), `/signalexchange.SignalExchange/*` → signal (8012), both `h2c://127.0.0.1` (gRPC over cleartext HTTP/2 to the plaintext backends on localhost); kanidm is the fallback handler. **No new public port** — the only listening public surface is still Caddy on 80/443; what widens is *reach*, gated by Netbird's setup-key/JWT auth, exactly as ADR 0177 rules. - `spikes/kanidm-netbird/clan/clan.nix` — sets the front door; node3 dials `https://clan-lab.matou.nz` as the off-LAN bootstrap shape. - Docs: `docs/architecture/03-fleet-topology.md` (diagram, port table, bootstrap sequence now branches LAN-fast-path vs front-door, reading notes, decisions) + ADR 0177's consequence + `STATUS.md`. Seam check: `nix-instantiate --parse` passes on all three changed `.nix` files (the spike configs aren't wired into the flake's `nixosConfigurations`, so parse is the runnable in-sandbox check; the module system + Caddyfile only fully evaluate under clan-core, which the sandbox lacks). ## Why human / session (not closing) The DoD's arc-closer — a **lab-proven _genuinely-remote_ (off-LAN) enrolment** — cannot be produced by the disposable clan-lab a swarm worker uses: it is **single-droplet, same-NAT** (node1–3 on `10.100.0.0/24`) with **simulated** public reachability (the host port-forwards 80/443 to node1), so it structurally cannot host a node at a *different physical site*. Proving the front-door path really carries enrolment where the LAN path can't needs a **multi-site lab** — e.g. two `clan-lab` droplets (genuinely different networks / public IPs), the gateway on lab A with DNS + ACME, and a netbird peer on lab B enrolling over the real internet via `https://clan-lab.matou.nz` (443) → Caddy → management/signal → `wt0` comes up, proven by TCP-port test per the mauke rule. That is a **live-infrastructure operation needing an interactive session's lab standing** (clan-lab + lab-dns), which a swarm sandbox lacks — exactly why this was `ready-for-session` before. The mechanism ruling itself is already made (ADR 0177), so this is not a one-way-door for Ben; it just needs a session to run the proof. Relabelled `ready-for-agent` → `ready-for-session`. The build is on `main`; the ticket stays open for the genuinely-remote lab proof.

Session start. Working #543's remaining arc-closer — the genuinely-remote lab proof — per the previous comment's ready-for-session routing (mechanism ruling + build are both already done: ADR 0177, commit 9ff8482).

Bug found + fixed first (commit ea8ff47, pushed): ADR 0128 (2026-08-05) moved the lab's public hostname from clan-lab.matou.nz (deSEC, dead) to clan-lab.idss.nz (Cloudflare — the only hostname lab-dns manages). The #543 build landed 2026-08-19, after that move, but copied the old hostname from spike #5's July config into the new frontDoorHost/domain/OIDC defaults across spikes/kanidm-netbird/clan/{clan.nix,modules/netbird.nix,machines/node1/gateway.nix} and the README/proof scripts. Fixed every reference — this would have silently broken ACME/DNS for any future run of this config, including this one.

Credential gap found: OURCLOUD_LAB_DNS_TOKEN is not provisioned to this session — checked env, .sandcastle/secrets/ (only README.md present, no token file), .sandcastle/.env, ~/.git-credentials, ~/.netrc, and a broader filesystem search. DIGITALOCEAN_ACCESS_TOKEN and FORGEJO_TOKEN are present; the lab-dns one was never written for this manual host run (the secrets/README.md "for a manual host run, write the files yourself" step missed it). This blocks real public DNS + Let's Encrypt for the front door as the prior comment's proof design assumed.

Ruled by agent under ADR 0174 — veto anytime. Proceeding anyway with a reduced-fidelity version of the same proof: two genuinely separate clan-lab droplets (real network/NAT/public-IP separation — the actual thing in doubt), but the off-LAN peer gets a client-side /etc/hosts override for clan-lab.idss.nz instead of real DNS, and Caddy on the gateway lab uses a local-CA cert instead of Let's Encrypt for this run only. This is a two-way door (lab droplets, config, all disposable/revertible) and it isolates exactly what #543 is actually asking — can an off-LAN peer with zero LAN adjacency complete enrolment through the front door — from DNS/ACME plumbing that spike #5 already proved separately (Q2, real cert against clan-lab.matou.nz when that was the live hostname). Will call this out explicitly as an honesty-limit in the findings, matching this repo's existing pattern (clan-lab SKILL.md's own limits section). If this doesn't land cleanly within this session, I'll say so plainly rather than claim a proof that didn't happen.

**Session start.** Working #543's remaining arc-closer — the genuinely-remote lab proof — per the previous comment's `ready-for-session` routing (mechanism ruling + build are both already done: ADR 0177, commit `9ff8482`). **Bug found + fixed first (commit `ea8ff47`, pushed):** ADR 0128 (2026-08-05) moved the lab's public hostname from `clan-lab.matou.nz` (deSEC, dead) to `clan-lab.idss.nz` (Cloudflare — the only hostname `lab-dns` manages). The #543 build landed 2026-08-19, *after* that move, but copied the old hostname from spike #5's July config into the new `frontDoorHost`/`domain`/OIDC defaults across `spikes/kanidm-netbird/clan/{clan.nix,modules/netbird.nix,machines/node1/gateway.nix}` and the README/proof scripts. Fixed every reference — this would have silently broken ACME/DNS for any future run of this config, including this one. **Credential gap found:** `OURCLOUD_LAB_DNS_TOKEN` is not provisioned to this session — checked env, `.sandcastle/secrets/` (only `README.md` present, no token file), `.sandcastle/.env`, `~/.git-credentials`, `~/.netrc`, and a broader filesystem search. `DIGITALOCEAN_ACCESS_TOKEN` and `FORGEJO_TOKEN` are present; the lab-dns one was never written for this manual host run (the `secrets/README.md` "for a manual host run, write the files yourself" step missed it). This blocks real public DNS + Let's Encrypt for the front door as the prior comment's proof design assumed. **Ruled by agent under ADR 0174 — veto anytime.** Proceeding anyway with a reduced-fidelity version of the same proof: two genuinely separate `clan-lab` droplets (real network/NAT/public-IP separation — the actual thing in doubt), but the off-LAN peer gets a client-side `/etc/hosts` override for `clan-lab.idss.nz` instead of real DNS, and Caddy on the gateway lab uses a local-CA cert instead of Let's Encrypt for this run only. This is a two-way door (lab droplets, config, all disposable/revertible) and it isolates exactly what #543 is actually asking — can an off-LAN peer with zero LAN adjacency complete enrolment through the front door — from DNS/ACME plumbing that spike #5 already proved separately (Q2, real cert against `clan-lab.matou.nz` when that was the live hostname). Will call this out explicitly as an honesty-limit in the findings, matching this repo's existing pattern (clan-lab SKILL.md's own limits section). If this doesn't land cleanly within this session, I'll say so plainly rather than claim a proof that didn't happen.

Close-report. The DoD's remaining piece — a lab-proven genuinely-remote enrolment — is done. The mechanism ruling (ADR 0177) and its build (commit 9ff8482) already landed before this session; this session ran the proof the previous session correctly identified as needing session standing (clan-lab + lab-dns).

What was proven, on real infrastructure (2 independent DigitalOcean droplets, no shared NAT, different public IPs — one a clan-lab gateway, one a --fresh stock droplet standing in for the off-LAN device):

  • From the off-LAN droplet: 8011/8012 — connection refused. 443 — answers.
  • The whole enrolment chain worked through Caddy's 443 alone: OIDC discovery, a real kanidm-JWT → Netbird-management POST /api/setup-keys (the Q4 pairing, exercised again through the front door), and a bare upstream netbird client (not the clan module — testing the mechanism, not one Nix wiring) logging in with that setup key.
  • wt0 came up on the off-LAN device with a real mesh IP, saw both Lab-A peers, and carried a real TCP payload to one of them — the mauke rule (TCP, never ICMP).

Advances #329, closes the gap it left open.

Two real bugs found and fixed in the #543/ADR-0177 build along the way:

  1. Commit ea8ff47 (earlier this session): the build hardcoded the pre-ADR-0128 clan-lab.matou.nz hostname (dead — the zone moved to clan-lab.idss.nz on 2026-08-05, before the build landed).
  2. Commit 0c7a625: the front-door Signal.URI was set to a bare hostname with no port. Netbird's dialer does not infer :443 from Proto = "https" — every peer's wt0 silently never came up until this carried the port explicitly. Found live because node2 (the LAN-fast-path peer) failed too — Signal's advertised endpoint is account-wide, not per-peer, so this bug wasn't front-door-specific.

Honesty limit (documented in docs/spike-findings/kanidm-netbird.md's new #543 addendum): OURCLOUD_LAB_DNS_TOKEN was not provisioned to this session (checked .sandcastle/secrets/, .sandcastle/.env, ~/.git-credentials, ~/.netrc — absent everywhere), so real public DNS + Let's Encrypt (already proven separately in spike #5 Q2) was substituted with a client-side /etc/hosts override and Caddy's local CA, trusted only by the machines that needed to validate it. This is orthogonal to what #543 actually asks — whether a peer with zero LAN adjacency can reach management/signal through the front door — which was measured directly (port refusal, real TCP payload), not inferred.

One gotcha reproduced but deliberately not fixed (out of this ticket's scope): netbird service run's first boot ignores NB_MANAGEMENT_URL/-m and always bootstraps against the upstream default (api.netbird.io) — reproduced on both the clan module's netbird client (0.72.3) and a bare upstream install (0.76.3); every peer in this session needed its profile file hand-seeded with the correct ManagementURL before first login. Spike #5's original July run reported a clean automatic join with the same client version, so this may be session- or version-window-specific rather than a standing defect — flagged in the addendum for whoever next touches peer enrolment to re-verify against a clean golden-image run, not asserted as confirmed.

Docs updated: docs/architecture/03-fleet-topology.md (the "still pending" callout + reading-notes bullet now record the closed proof), docs/spike-findings/kanidm-netbird.md (full addendum), STATUS.md (header + milestone log).

Infrastructure: both lab droplets destroyed at session end (clan-lab status empty). No DNS was ever pointed (no token), so nothing needed parking.

Ruled by agent under ADR 0174 — veto anytime. Everything landed here is a two-way door: disposable lab droplets (destroyed), commits on main provable by the TCP-payload proof above and this session's transcript. No security-posture widening — the mechanism ruling itself was Ben's (ADR 0177, 2026-08-14/19), not this session's; this session only proved and hardened what was already ruled.

Closing per the ticket's definition of done.

**Close-report.** The DoD's remaining piece — a lab-proven genuinely-remote enrolment — is done. The mechanism ruling (ADR 0177) and its build (commit `9ff8482`) already landed before this session; this session ran the proof the previous session correctly identified as needing session standing (`clan-lab` + `lab-dns`). **What was proven, on real infrastructure (2 independent DigitalOcean droplets, no shared NAT, different public IPs — one a `clan-lab` gateway, one a `--fresh` stock droplet standing in for the off-LAN device):** - From the off-LAN droplet: `8011`/`8012` — connection refused. `443` — answers. - The whole enrolment chain worked through Caddy's `443` alone: OIDC discovery, a real kanidm-JWT → Netbird-management `POST /api/setup-keys` (the Q4 pairing, exercised again through the front door), and a **bare upstream `netbird` client** (not the clan module — testing the mechanism, not one Nix wiring) logging in with that setup key. - `wt0` came up on the off-LAN device with a real mesh IP, saw both Lab-A peers, and carried a real TCP payload to one of them — the mauke rule (TCP, never ICMP). Advances #329, closes the gap it left open. **Two real bugs found and fixed in the #543/ADR-0177 build along the way:** 1. Commit `ea8ff47` (earlier this session): the build hardcoded the pre-ADR-0128 `clan-lab.matou.nz` hostname (dead — the zone moved to `clan-lab.idss.nz` on 2026-08-05, before the build landed). 2. Commit `0c7a625`: the front-door `Signal.URI` was set to a bare hostname with no port. Netbird's dialer does not infer `:443` from `Proto = "https"` — **every peer's `wt0` silently never came up** until this carried the port explicitly. Found live because node2 (the LAN-fast-path peer) failed too — Signal's advertised endpoint is account-wide, not per-peer, so this bug wasn't front-door-specific. **Honesty limit (documented in `docs/spike-findings/kanidm-netbird.md`'s new #543 addendum):** `OURCLOUD_LAB_DNS_TOKEN` was not provisioned to this session (checked `.sandcastle/secrets/`, `.sandcastle/.env`, `~/.git-credentials`, `~/.netrc` — absent everywhere), so real public DNS + Let's Encrypt (already proven separately in spike #5 Q2) was substituted with a client-side `/etc/hosts` override and Caddy's local CA, trusted only by the machines that needed to validate it. This is orthogonal to what #543 actually asks — whether a peer with zero LAN adjacency can reach management/signal through the front door — which was measured directly (port refusal, real TCP payload), not inferred. **One gotcha reproduced but deliberately not fixed (out of this ticket's scope):** `netbird service run`'s first boot ignores `NB_MANAGEMENT_URL`/`-m` and always bootstraps against the upstream default (`api.netbird.io`) — reproduced on both the clan module's netbird client (0.72.3) and a bare upstream install (0.76.3); every peer in this session needed its profile file hand-seeded with the correct `ManagementURL` before first login. Spike #5's original July run reported a clean automatic join with the same client version, so this may be session- or version-window-specific rather than a standing defect — flagged in the addendum for whoever next touches peer enrolment to re-verify against a clean golden-image run, not asserted as confirmed. **Docs updated:** `docs/architecture/03-fleet-topology.md` (the "still pending" callout + reading-notes bullet now record the closed proof), `docs/spike-findings/kanidm-netbird.md` (full addendum), `STATUS.md` (header + milestone log). **Infrastructure:** both lab droplets destroyed at session end (`clan-lab status` empty). No DNS was ever pointed (no token), so nothing needed parking. **Ruled by agent under ADR 0174 — veto anytime.** Everything landed here is a two-way door: disposable lab droplets (destroyed), commits on `main` provable by the TCP-payload proof above and this session's transcript. No security-posture widening — the mechanism ruling itself was Ben's (ADR 0177, 2026-08-14/19), not this session's; this session only proved and hardened what was already ruled. Closing per the ticket's definition of done.
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#543
No description provided.