the founding join cannot land: mesh admission redeems a fabricated setup key against mesh.internal, on a device with no netbird (#788 idip drive 20260827T161538Z, sig 28ff46f6d26f) #907

Closed
opened 2026-08-27 16:20:57 +00:00 by matou-build-agent · 2 comments

Failure

Leg 6 consent red — the terminal join exited 1 (artifacts/legs.json, artifacts/verdict.json: firstRedLeg: consent, drive commit 90b1f3e8). Legs 1–5 green.

The consent ceremony itself passed: full install chosen, WIPE typed, ✓ consent recorded, probe printed, ✓ connection request sent, waiting for the operator's decision… (artifacts/consent-transcript.txt). The approval landed too — logs/founding-state.log carries standup.request: req-0001, standup.node: node-req-0001, and the event gateway paired and approved as node node-req-0001 — probed 2 vCPU · 4 GB · 76 GB meets the minimum. The agent then entered ADR 0209's landing and died on its first step:

join: mesh admission: meshup: netbird is not installed on this device — the community mesh
adapter needs it to join wt0 (ADR 0100): netbird [up --setup-key \xd1\xf0O\xbe\xa1... 
--management-url mesh.internal]: exec: "netbird": executable file not found in $PATH

Evidence

  • internal/join/land.go:83 — Enroll's first gate is o.cfg.Mesh.Join(ctx, g.Mesh). There is no founding/add-device fork; every landing must join a mesh before certs, clan-up, takeover-stage, or ConfirmEnrolled.
  • agent/internal/meshup/meshup.go:45-53 and :103-105 — the real adapter maps exec.ErrNotFound to the named ADR 0100 error. This adapter is correct and is not the defect — it failed loud exactly as ruled.
  • agent/cmd/agent/wiring_prod.go (joinAdapters, Mesh: meshup.New(run)) — production wires the real netbird adapter.
  • internal/enroll/community_ca.go:145-149 — the grant's admission is fabricated placeholder material: SetupKey: randBytes(32), Management: "mesh.internal", TLSPin: randBytes(32). mesh.internal occurs in exactly two places in the tree: here and the test granter internal/enroll/enrolltesting/granter.go:46. The transcript's setup key is raw non-UTF8 bytes (\xd1\xf0O\xbe\xa1\\ \x9e\xe8...) — visible proof that randBytes(32) is being handed to a CLI flag, not a Netbird setup key.
  • No Netbird management plane exists in the founding path. Grepping netbird across internal/, control-plane/, scripts/ finds only the IdP device-code flow (internal/idp/deviceapprove.go:14, internal/idp/provider.go:99), a clan module id (internal/clan/idssidp.go:131), and admin-mesh operator notes (docs/GOTCHAS.md:3487). Nothing mints a setup key; nothing serves mesh.internal.
  • The box is a fresh Ubuntu 24.04 LTS droplet (logs/droplet-do-forensics.txt: image: 24.04 (LTS) x64, created 16:15:59Z), with the agent installed by the verbatim /get one-liner (leg 5 green, logs/droplet-journal.txt:1148 Started idss-agent.service). internal/controlapi/install_doorway.go serves a script that installs the agent unit only — it never installs netbird.

So there are two independent walls, either fatal:

  1. The netbird binary is absent. ADR 0209 §2 assumes netbird up ... on the stock OS; nothing in the product or the drive puts it on a stock Ubuntu box.
  2. Even with the binary present, netbird up --setup-key <32 random bytes> --management-url mesh.internal cannot succeed — the key was minted by nobody and the host resolves nowhere. Installing netbird alone would only move the red from executable file not found to a management-dial failure.

Ordering note. This is the FOUNDING shape: agent/cmd/agent/wiring_prod.go's enrollTransportFor takes the no-IDSS_COMMUNITY_ORIGIN branch and enrols over the SSH relay against the app's in-helper ledger (ADR 0043/0152). This droplet is the community's first and only node; the community's mesh does not exist yet, and the provisioning that would stand one up is the first deploy — leg 10 (deploy-takeover), four legs later. Requiring a founding node to join a mesh that first-deploy has not yet created is an ordering fault, not merely a missing package.

Suspected layer

The community side of ADR 0209 §2/§3 — internal/enroll/community_ca.go (the admission is fabricated) and internal/join/land.go (the mesh gate is unconditional). Not the device adapter: agent/internal/meshup behaved correctly and must stay fail-loud (ADR 0100).

What plugging it needs

A ruling on which of two different builds ADR 0209 §2 actually means, because they are not the same size:

(a) The founding node lands without mesh admission. land.go forks on the founding shape (no community mesh exists yet), ConfirmEnrolled carries an honest empty mesh address, and mesh join is deferred to the point the community's mesh exists (post-first-deploy). One repo change; keeps meshup fail-loud for the genuine add-device path (--target device), which joins an already-founded community.

(b) Founding stands the community's Netbird management plane up before landing. The CA mints real setup keys against it (internal/enroll/community_ca.go:145 replaced by a real minter — spikes/kanidm-netbird/scripts/oauth2-mint-setupkey.mjs is the precedent), and the /get install script (internal/controlapi/install_doorway.go) installs the netbird package on the device. This is a management-plane build plus an infra dependency plus a change to what the install one-liner puts on a stranger's machine.

Both amend ADR 0209 (and touch ADR 0039's swap-point), so this is an ADR decision before it is code. Until it is ruled the idip drive cannot clear leg 6, and each re-drive stands up a fresh paid droplet to rediscover the same wall — the drive should stay blocked on this issue.

Secondary observation (cosmetic, NOT the red)

The transcript opens idss-agent unknown · joining and prints ✓ connection request sent to — the community name is empty, and the release reads unknown. internal/join/cli.go:143 and :200 render resp.Community.Name, which is empty in the founding shape. The leg's assertion (app/tests/e2e/journey.idip.spec.ts:341) only greps for connection request sent, so this did not cause the red — but the founding join's terminal copy names no community to the person consenting to a wipe.

drive 20260827T161538Z red at consent: the terminal join exited 1 --- transcript --- Warning: Permanently added '134.199.173.107' (ED25519) to the list of known hosts. idss-agent unknown · joining How should this machine contribute? [1] F
evidence: /home/dev/swarm/Matou/idss/test-results/drive-idip/20260827T161538Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## Failure Leg 6 `consent` red — `the terminal join exited 1` (`artifacts/legs.json`, `artifacts/verdict.json`: `firstRedLeg: consent`, drive commit `90b1f3e8`). Legs 1–5 green. The consent ceremony itself **passed**: full install chosen, `WIPE` typed, `✓ consent recorded`, probe printed, `✓ connection request sent`, `waiting for the operator's decision…` (`artifacts/consent-transcript.txt`). The approval landed too — `logs/founding-state.log` carries `standup.request: req-0001`, `standup.node: node-req-0001`, and the event `gateway paired and approved as node node-req-0001 — probed 2 vCPU · 4 GB · 76 GB meets the minimum`. The agent then entered ADR 0209's landing and died on its first step: ``` join: mesh admission: meshup: netbird is not installed on this device — the community mesh adapter needs it to join wt0 (ADR 0100): netbird [up --setup-key \xd1\xf0O\xbe\xa1... --management-url mesh.internal]: exec: "netbird": executable file not found in $PATH ``` ## Evidence - `internal/join/land.go:83` — `Enroll`'s **first** gate is `o.cfg.Mesh.Join(ctx, g.Mesh)`. There is no founding/add-device fork; every landing must join a mesh before certs, clan-up, takeover-stage, or `ConfirmEnrolled`. - `agent/internal/meshup/meshup.go:45-53` and `:103-105` — the real adapter maps `exec.ErrNotFound` to the named ADR 0100 error. **This adapter is correct and is not the defect** — it failed loud exactly as ruled. - `agent/cmd/agent/wiring_prod.go` (`joinAdapters`, `Mesh: meshup.New(run)`) — production wires the real netbird adapter. - `internal/enroll/community_ca.go:145-149` — the grant's admission is **fabricated placeholder material**: `SetupKey: randBytes(32)`, `Management: "mesh.internal"`, `TLSPin: randBytes(32)`. `mesh.internal` occurs in exactly two places in the tree: here and the test granter `internal/enroll/enrolltesting/granter.go:46`. The transcript's setup key is raw non-UTF8 bytes (`\xd1\xf0O\xbe\xa1\\ \x9e\xe8...`) — visible proof that `randBytes(32)` is being handed to a CLI flag, not a Netbird setup key. - No Netbird management plane exists in the founding path. Grepping `netbird` across `internal/`, `control-plane/`, `scripts/` finds only the IdP device-code flow (`internal/idp/deviceapprove.go:14`, `internal/idp/provider.go:99`), a clan module id (`internal/clan/idssidp.go:131`), and admin-mesh operator notes (`docs/GOTCHAS.md:3487`). Nothing mints a setup key; nothing serves `mesh.internal`. - The box is a fresh **Ubuntu 24.04 LTS** droplet (`logs/droplet-do-forensics.txt`: `image: 24.04 (LTS) x64`, created `16:15:59Z`), with the agent installed by the verbatim `/get` one-liner (leg 5 green, `logs/droplet-journal.txt:1148` `Started idss-agent.service`). `internal/controlapi/install_doorway.go` serves a script that installs the agent unit only — it never installs netbird. So there are **two independent walls, either fatal**: 1. The netbird binary is absent. ADR 0209 §2 assumes `netbird up ... on the stock OS`; nothing in the product or the drive puts it on a stock Ubuntu box. 2. Even with the binary present, `netbird up --setup-key <32 random bytes> --management-url mesh.internal` cannot succeed — the key was minted by nobody and the host resolves nowhere. Installing netbird alone would only move the red from `executable file not found` to a management-dial failure. **Ordering note.** This is the FOUNDING shape: `agent/cmd/agent/wiring_prod.go`'s `enrollTransportFor` takes the no-`IDSS_COMMUNITY_ORIGIN` branch and enrols over the SSH relay against the app's in-helper ledger (ADR 0043/0152). This droplet is the community's first and only node; the community's mesh does not exist yet, and the provisioning that would stand one up is the first deploy — leg 10 (`deploy-takeover`), four legs later. Requiring a founding node to join a mesh that first-deploy has not yet created is an ordering fault, not merely a missing package. ## Suspected layer The **community side** of ADR 0209 §2/§3 — `internal/enroll/community_ca.go` (the admission is fabricated) and `internal/join/land.go` (the mesh gate is unconditional). Not the device adapter: `agent/internal/meshup` behaved correctly and must stay fail-loud (ADR 0100). ## What plugging it needs A ruling on which of two different builds ADR 0209 §2 actually means, because they are not the same size: **(a) The founding node lands without mesh admission.** `land.go` forks on the founding shape (no community mesh exists yet), `ConfirmEnrolled` carries an honest empty mesh address, and mesh join is deferred to the point the community's mesh exists (post-first-deploy). One repo change; keeps meshup fail-loud for the genuine add-device path (`--target device`), which joins an already-founded community. **(b) Founding stands the community's Netbird management plane up before landing.** The CA mints real setup keys against it (`internal/enroll/community_ca.go:145` replaced by a real minter — `spikes/kanidm-netbird/scripts/oauth2-mint-setupkey.mjs` is the precedent), and the `/get` install script (`internal/controlapi/install_doorway.go`) installs the netbird package on the device. This is a management-plane build plus an infra dependency plus a change to what the install one-liner puts on a stranger's machine. Both amend ADR 0209 (and touch ADR 0039's swap-point), so this is an ADR decision before it is code. Until it is ruled the idip drive cannot clear leg 6, and each re-drive stands up a fresh paid droplet to rediscover the same wall — the drive should stay blocked on this issue. ## Secondary observation (cosmetic, NOT the red) The transcript opens `idss-agent unknown · joining ` and prints `✓ connection request sent to ` — the community name is empty, and the release reads `unknown`. `internal/join/cli.go:143` and `:200` render `resp.Community.Name`, which is empty in the founding shape. The leg's assertion (`app/tests/e2e/journey.idip.spec.ts:341`) only greps for `connection request sent`, so this did not cause the red — but the founding join's terminal copy names no community to the person consenting to a wipe. drive `20260827T161538Z` red at `consent`: `the terminal join exited 1 --- transcript --- Warning: Permanently added '134.199.173.107' (ED25519) to the list of known hosts. idss-agent unknown · joining How should this machine contribute? [1] F` evidence: `/home/dev/swarm/Matou/idss/test-results/drive-idip/20260827T161538Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 28ff46f6d26f -->
Owner

Fixed on main (the #788 session): internal/install.InstallService now ensures the mesh client (command -v netbird || pkgs.netbird.io/install.sh) and fails loud when it cannot — since 789f250f (#843, ADR 0209) the agent runs netbird up at the operator's approval, and a plain-Ubuntu self-hosted box shipped none (GOTCHAS #108). Closing; #788 re-drives.

Fixed on `main` (the #788 session): `internal/install.InstallService` now ensures the mesh client (`command -v netbird || pkgs.netbird.io/install.sh`) and fails loud when it cannot — since `789f250f` (#843, ADR 0209) the agent runs `netbird up` at the operator's approval, and a plain-Ubuntu self-hosted box shipped none (GOTCHAS #108). Closing; #788 re-drives.
ben closed this issue 2026-08-27 16:22:42 +00:00
Owner

Your diagnosis was the right one — the netbird-absence fix (d53a4de3) was necessary but not the cause. Landed on main now: a RoleGateway grant carries NO mesh admission (enroll.meshAdmissionFor) and join.Enroll skips the mesh gate when the admission is not redeemable — the founding gateway founds the mesh at its own deploy (ADR 0159). Device grants keep the placeholder until #844's management plane mints real keys. TestEnroll_GatewayGrantSkipsMeshAdmission pins it. #788 re-drives.

Your diagnosis was the right one — the netbird-absence fix (`d53a4de3`) was necessary but not the cause. Landed on `main` now: a `RoleGateway` grant carries NO mesh admission (`enroll.meshAdmissionFor`) and `join.Enroll` skips the mesh gate when the admission is not redeemable — the founding gateway founds the mesh at its own deploy (ADR 0159). Device grants keep the placeholder until #844's management plane mints real keys. `TestEnroll_GatewayGrantSkipsMeshAdmission` pins it. #788 re-drives.
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#907
No description provided.