architecture: multi-site bootstrap is uncovered — Netbird management/signal open on the gateway's LAN nic only #329

Closed
opened 2026-08-07 17:32:49 +00:00 by ben · 8 comments
Owner

docs/architecture/03-fleet-topology.md:48-60 documents the bootstrap nuance: a peer must reach Netbird management before wt0 exists, so during enrolment management (8011) and signal (8012) are opened on the gateway's LAN-facing nic and tightened to wt0 afterwards. The port table (:44) records their exposure as "mesh interface only", and the reading notes state that from the public internet 8011/8012 answer connection refused, proven from outside the fleet in spike #5.

A node at a different physical site is not on the gateway's LAN. As documented, it has no path to management and therefore cannot bootstrap onto the mesh.

This matters because multi-site is a core case, not an edge one: the product is aimed at communities whose machines sit at homes, an office and a marae, and the fleet topology's own zone-spread guidance for backup targets ("different building or zone") assumes it.

Either:

  • the spike only exercised the same-LAN case and the documented sequence is incomplete; or
  • remote-site enrolment genuinely does not work yet.

Definition of done

Determine which, and correct the architecture doc or file the implementation gap. If remote bootstrap needs a public path to management/signal, that interacts with "the only deliberately public surface is Caddy on 80/443" and needs a ruling.


Found 2026-08-07 while scoping home-gateway reachability (dynamic address / automatic port opening / IPv6). Full trace in docs/research/2026-08-07-home-gateway-reachability-scope.md.

`docs/architecture/03-fleet-topology.md:48-60` documents the bootstrap nuance: a peer must reach Netbird management before `wt0` exists, so during enrolment management (8011) and signal (8012) are opened **on the gateway's LAN-facing nic** and tightened to `wt0` afterwards. The port table (`:44`) records their exposure as "mesh interface only", and the reading notes state that from the public internet 8011/8012 answer `connection refused`, proven from outside the fleet in spike #5. A node at a **different physical site** is not on the gateway's LAN. As documented, it has no path to management and therefore cannot bootstrap onto the mesh. This matters because multi-site is a core case, not an edge one: the product is aimed at communities whose machines sit at homes, an office and a marae, and the fleet topology's own zone-spread guidance for backup targets ("different building or zone") assumes it. Either: - the spike only exercised the same-LAN case and the documented sequence is incomplete; or - remote-site enrolment genuinely does not work yet. ## Definition of done Determine which, and correct the architecture doc or file the implementation gap. If remote bootstrap needs a public path to management/signal, that interacts with "the only deliberately public surface is Caddy on 80/443" and needs a ruling. --- Found 2026-08-07 while scoping home-gateway reachability (dynamic address / automatic port opening / IPv6). Full trace in `docs/research/2026-08-07-home-gateway-reachability-scope.md`.
Author
Owner

This was generated by AI during triage.

Verified: docs/architecture/03-fleet-topology.md confirmed to document Netbird management (8011) and signal (8012) as "mesh interface only" exposure, and the bootstrap-nuance sequence diagram confirms both are opened on the gateway's LAN-facing nic during enrolment, tightened to wt0 afterward. The reading notes confirm "the only deliberately public surface is Caddy on 80/443." A node at a different physical site has no LAN path to the gateway and, per this documented sequence, no other path to management/signal either. Claim holds — this is either an undocumented remote-bootstrap path or a genuine gap; the doc as written doesn't resolve which.

Routing to ready-for-human, not ready-for-agent: the ticket's own definition of done says this "needs a ruling" if remote bootstrap requires a public path to management/signal — and that's a security-posture decision, not an implementation detail. Opening 8011/8012 to the public internet contradicts the architecture's current "Caddy is the only deliberately public surface" stance (itself presumably a deliberate hardening choice), so widening it is a call about the fleet's threat model that needs to be made explicitly, not inferred from what's convenient to implement. It's also possible the resolution is "the spike only exercised same-LAN and remote bootstrap needs a different mechanism entirely" (e.g. relayed via coturn, or a bring-your-own-mesh-invite flow) rather than opening new public ports at all — which is itself a design question. Recommend: rule on whether multi-site remote bootstrap (a) needs a new public path (and if so, through what — direct expose, relay-mediated, or something else) or (b) uses an entirely different enrolment mechanism for the cross-site case, then this can be re-filed as either a doc correction or an agent brief for whichever mechanism is chosen. Related: #328 (the reachability gate doesn't probe mesh/relay ports at all today) is a separate, narrower ticket that doesn't require this ruling to proceed.

> *This was generated by AI during triage.* **Verified:** `docs/architecture/03-fleet-topology.md` confirmed to document Netbird management (8011) and signal (8012) as "mesh interface only" exposure, and the bootstrap-nuance sequence diagram confirms both are opened on the gateway's LAN-facing nic during enrolment, tightened to `wt0` afterward. The reading notes confirm "the only deliberately public surface is Caddy on 80/443." A node at a different physical site has no LAN path to the gateway and, per this documented sequence, no other path to management/signal either. Claim holds — this is either an undocumented remote-bootstrap path or a genuine gap; the doc as written doesn't resolve which. **Routing to ready-for-human, not ready-for-agent:** the ticket's own definition of done says this "needs a ruling" if remote bootstrap requires a public path to management/signal — and that's a security-posture decision, not an implementation detail. Opening 8011/8012 to the public internet contradicts the architecture's current "Caddy is the only deliberately public surface" stance (itself presumably a deliberate hardening choice), so widening it is a call about the fleet's threat model that needs to be made explicitly, not inferred from what's convenient to implement. It's also possible the resolution is "the spike only exercised same-LAN and remote bootstrap needs a different mechanism entirely" (e.g. relayed via coturn, or a bring-your-own-mesh-invite flow) rather than opening new public ports at all — which is itself a design question. Recommend: rule on whether multi-site remote bootstrap (a) needs a new public path (and if so, through what — direct expose, relay-mediated, or something else) or (b) uses an entirely different enrolment mechanism for the cross-site case, then this can be re-filed as either a doc correction or an agent brief for whichever mechanism is chosen. Related: #328 (the reachability gate doesn't probe mesh/relay ports at all today) is a separate, narrower ticket that doesn't require this ruling to proceed.
Author
Owner

Ruled by Ben 2026-08-08 (decision sweep): investigate first. Attempt a genuinely remote-site enrolment in the lab and learn what path Netbird management/signal actually needs; the exposure ruling (public 8011/8012 vs never-public) waits for those facts rather than being pre-ruled. Lab work is session work → no-triage.

Ruled by Ben 2026-08-08 (decision sweep): **investigate first.** Attempt a genuinely remote-site enrolment in the lab and learn what path Netbird management/signal actually needs; the exposure ruling (public 8011/8012 vs never-public) waits for those facts rather than being pre-ruled. Lab work is session work → `no-triage`.
Author
Owner

Backlog walk (Ben, 2026-08-12): promoted ready-for-agent — determine doc-vs-reality (did spike #5 exercise only the same-LAN case?), then correct docs/architecture/03-fleet-topology.md or file the implementation gap. If remote bootstrap turns out to need a public management/signal path, STOP and flip ready-for-human: that ruling is Ben's (it touches the only-deliberately-public-surface-is-Caddy invariant).

Backlog walk (Ben, 2026-08-12): promoted `ready-for-agent` — determine doc-vs-reality (did spike #5 exercise only the same-LAN case?), then correct `docs/architecture/03-fleet-topology.md` or file the implementation gap. If remote bootstrap turns out to need a public management/signal path, STOP and flip `ready-for-human`: that ruling is Ben's (it touches the only-deliberately-public-surface-is-Caddy invariant).
Author
Owner

Determination (doc-vs-reality) — done from the primary sources; no lab needed. Per Ben's 2026-08-12 promotion note ("determine doc-vs-reality — did spike #5 exercise only the same-LAN case?"):

Spike #5 exercised the LAN-nic bootstrap for SAME-LAN peers only. Its environment ran node1–3 as libvirt VMs on one droplet's 10.100.0.0/24 (spike-findings/kanidm-netbird.md), and the Netbird module opens management(8011)/signal(8012) on that shared LAN nic ens2 — the address the enrolling peer dials before wt0 exists (spikes/kanidm-netbird/clan/modules/netbird.nix:168-176; the peer's NB_MANAGEMENT_URL points at the gateway's LAN/mesh IP). Q5 tested node2→node1 over the shared LAN/mesh and node2→node3 over wt0. No node off the gateway's LAN was ever enrolled. So the documented "bootstrap nuance" is proven for same-LAN peers only — the ticket's first branch ("the spike only exercised the same-LAN case and the documented sequence is incomplete") is the correct reading.

Is it also a real gap? Yes. A node at a different physical site has only three possible paths to management/signal at bootstrap, and at bootstrap two are unavailable:

  • public internet — refused (only Caddy's 80/443 answer; 8011/8012 give connection refused);
  • 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 to learn about it. So remote-site enrolment genuinely needs a non-LAN path to management/signal.

This is Ben's ruling (STOP → ready-for-human), per the 2026-08-12 note. Every option for that non-LAN path touches the "only deliberately public surface is Caddy on 80/443" invariant:

  • (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 notes 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 that cross-site mesh is out of scope for v1 (interacts with IPv6 leg C / #332, which would give remote nodes a globally-routable path with no NAT).

What I did: annotated docs/architecture/03-fleet-topology.md (a Proven scope note after the bootstrap sequence + the reading-notes bullet) to record the same-LAN-only proven scope and this open gap — mechanism-neutral, no ruling made — and logged it in STATUS.md (⏸ Blocked on Ben #8). Commit b715c49.

To re-arm: rule which mechanism (a/b/c/d); this then re-files as a doc correction (if none-public) or an agent brief for the chosen path. Related: #332 (IPv6 leg — the multi-site mesh escape hatch) and #328 (reachability gate doesn't probe mesh/relay ports).

**Determination (doc-vs-reality) — done from the primary sources; no lab needed.** Per Ben's 2026-08-12 promotion note ("determine doc-vs-reality — did spike #5 exercise only the same-LAN case?"): **Spike #5 exercised the LAN-nic bootstrap for SAME-LAN peers only.** Its environment ran node1–3 as libvirt VMs on one droplet's `10.100.0.0/24` (spike-findings/kanidm-netbird.md), and the Netbird module opens management(8011)/signal(8012) on that shared LAN nic `ens2` — the address the enrolling peer dials before `wt0` exists (`spikes/kanidm-netbird/clan/modules/netbird.nix:168-176`; the peer's `NB_MANAGEMENT_URL` points at the gateway's LAN/mesh IP). Q5 tested `node2→node1` over the shared LAN/mesh and `node2→node3` over `wt0`. **No node off the gateway's LAN was ever enrolled.** So the documented "bootstrap nuance" is proven for same-LAN peers only — the ticket's first branch ("the spike only exercised the same-LAN case and the documented sequence is incomplete") is the correct reading. **Is it also a real gap? Yes.** A node at a different physical site has only three possible paths to management/signal at bootstrap, and at bootstrap two are unavailable: - public internet — **refused** (only Caddy's 80/443 answer; 8011/8012 give `connection refused`); - 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 to learn about it. So remote-site enrolment genuinely needs a **non-LAN path to management/signal**. **This is Ben's ruling (STOP → `ready-for-human`), per the 2026-08-12 note.** Every option for that non-LAN path touches the "only deliberately public surface is Caddy on 80/443" invariant: - **(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 notes 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 that cross-site mesh is out of scope for v1 (interacts with IPv6 leg C / #332, which would give remote nodes a globally-routable path with no NAT). **What I did:** annotated `docs/architecture/03-fleet-topology.md` (a *Proven scope* note after the bootstrap sequence + the reading-notes bullet) to record the same-LAN-only proven scope and this open gap — mechanism-neutral, no ruling made — and logged it in STATUS.md (⏸ Blocked on Ben #8). Commit `b715c49`. **To re-arm:** rule which mechanism (a/b/c/d); this then re-files as a doc correction (if none-public) or an agent brief for the chosen path. Related: #332 (IPv6 leg — the multi-site mesh escape hatch) and #328 (reachability gate doesn't probe mesh/relay ports).
Author
Owner

Relabelled ready-for-agent under ADR 0174: the definition of done is an investigation (was the spike same-LAN-only, or is remote-site enrolment genuinely broken?) plus a doc correction or gap ticket — no ruling is needed to start. The boundary stands: if the answer requires opening management/signal publicly, that is a security-posture widening = one-way door, and it returns ready-for-human for Ben's ruling.

Relabelled `ready-for-agent` under ADR 0174: the definition of done is an **investigation** (was the spike same-LAN-only, or is remote-site enrolment genuinely broken?) plus a doc correction or gap ticket — no ruling is needed to start. The boundary stands: if the answer requires opening management/signal publicly, that is a security-posture widening = **one-way door**, and it returns `ready-for-human` for Ben's ruling.
Author
Owner

Closing under ADR 0174. The DoD is an investigation + a doc correction OR gap ticket, with no ruling needed to start (Ben, 2026-08-14 re-arm).

  • Investigation — done (recorded in the prior determination comment): spike #5 exercised the LAN-nic bootstrap for same-LAN peers only; a node at a different physical site genuinely has no bootstrap path to Netbird management/signal (public refused · gateway LAN unreachable · wt0 not yet up).
  • Doc correction — done and landed (b715c49): docs/architecture/03-fleet-topology.md records the proven same-LAN-only scope and the open gap.
  • Implementation gap — filed as #543 (ready-for-human). Its answer is mechanism-neutral — relay-mediated and none-public options need no public reach — so the investigation did not trip the one-way-door STOP. The public-vs-never-public mechanism ruling (a: public 8011/8012 · b: Caddy-proxied 443 · c: relay/invite · d: none-public) migrates to #543, where that call belongs.

STATUS.md updated (f4e1056): Blocked-on-Ben #8 marked resolved, pointing to #543.

**Closing under ADR 0174.** The DoD is an investigation + a doc correction OR gap ticket, with no ruling needed to start (Ben, 2026-08-14 re-arm). - **Investigation — done** (recorded in the prior determination comment): spike #5 exercised the LAN-nic bootstrap for **same-LAN peers only**; a node at a different physical site genuinely has no bootstrap path to Netbird management/signal (public refused · gateway LAN unreachable · `wt0` not yet up). - **Doc correction — done and landed** (`b715c49`): `docs/architecture/03-fleet-topology.md` records the proven same-LAN-only scope and the open gap. - **Implementation gap — filed as #543** (`ready-for-human`). Its answer is mechanism-neutral — relay-mediated and none-public options need no public reach — so the investigation did **not** trip the one-way-door STOP. The public-vs-never-public mechanism ruling (a: public 8011/8012 · b: Caddy-proxied 443 · c: relay/invite · d: none-public) migrates to #543, where that call belongs. STATUS.md updated (`f4e1056`): Blocked-on-Ben #8 marked resolved, pointing to #543.
Author
Owner

close-report for #329 — status success

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

envelope
{
  "issue": 329,
  "status": "success",
  "commits": [
    "f4e1056"
  ],
  "changed_files": [
    "STATUS.md"
  ],
  "tests": [],
  "criteria": {
    "Determine which — spike incomplete, or remote enrolment genuinely broken": "BOTH: investigation (issue comment + STATUS #8) shows spike #5 exercised same-LAN peers only AND remote-site enrolment is a genuine gap (no non-LAN path to management/signal at bootstrap). Landed in b715c49 (doc) and this run's STATUS record.",
    "Correct the architecture doc OR file the implementation gap": "Doc corrected in b715c49 (docs/architecture/03-fleet-topology.md Proven-scope note); implementation gap additionally filed as #543 (ready-for-human).",
    "If remote bootstrap needs a public path to management/signal, needs a ruling": "The investigation's answer is mechanism-neutral (relay-mediated and none-public options need no public reach), so it does not require public exposure and did not trip the one-way-door STOP; the public-vs-never-public ruling is carried by #543 as its needs_human_decision, per ADR 0174."
  },
  "summary": "Closed #329: cross-site mesh-enrolment investigation + doc correction complete; the implementation gap it uncovered is now tracked as #543 (ready-for-human) with the mechanism ruling.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #329 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; closing. <details><summary>envelope</summary> ```json { "issue": 329, "status": "success", "commits": [ "f4e1056" ], "changed_files": [ "STATUS.md" ], "tests": [], "criteria": { "Determine which — spike incomplete, or remote enrolment genuinely broken": "BOTH: investigation (issue comment + STATUS #8) shows spike #5 exercised same-LAN peers only AND remote-site enrolment is a genuine gap (no non-LAN path to management/signal at bootstrap). Landed in b715c49 (doc) and this run's STATUS record.", "Correct the architecture doc OR file the implementation gap": "Doc corrected in b715c49 (docs/architecture/03-fleet-topology.md Proven-scope note); implementation gap additionally filed as #543 (ready-for-human).", "If remote bootstrap needs a public path to management/signal, needs a ruling": "The investigation's answer is mechanism-neutral (relay-mediated and none-public options need no public reach), so it does not require public exposure and did not trip the one-way-door STOP; the public-vs-never-public ruling is carried by #543 as its needs_human_decision, per ADR 0174." }, "summary": "Closed #329: cross-site mesh-enrolment investigation + doc correction complete; the implementation gap it uncovered is now tracked as #543 (ready-for-human) with the mechanism ruling.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
ben closed this issue 2026-08-14 19:34:42 +00:00
Author
Owner

Note from run 6335 (a concurrent claim on this ticket): #329 was already closed on main by a parallel worker who filed the implementation gap as #543 and updated STATUS.md. My run reached the same determination independently and had filed a duplicate gap ticket (#544) — now closed as a duplicate of #543. My only surviving contribution landed as f098bd2: the parallel close left docs/architecture/03-fleet-topology.md's forward-looking open-gap references pointing at the now-closed investigation (#329), so I re-pointed them to the canonical live tracker #543 (origin: #329). No further action needed here — the mechanism ruling lives on #543.

Note from run 6335 (a concurrent claim on this ticket): #329 was already **closed** on main by a parallel worker who filed the implementation gap as **#543** and updated STATUS.md. My run reached the same determination independently and had filed a duplicate gap ticket (#544) — now **closed as a duplicate of #543**. My only surviving contribution landed as `f098bd2`: the parallel close left `docs/architecture/03-fleet-topology.md`'s forward-looking open-gap references pointing at the now-closed investigation (#329), so I re-pointed them to the canonical live tracker **#543** (origin: #329). No further action needed here — the mechanism ruling lives on #543.
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.

Dependencies

No dependencies set.

Reference
Matou/idss#329
No description provided.