device-add: Approve mints a real setup key through a MeshMinter port — the device lands on the mesh, P3-S4 → P3-S5 (ADR 0214 d.4) #963
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Blocks
Depends on
Reference
Matou/idss#963
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
When the operator approves a connection request, the grant carries a setup key minted for that request — single-use, the request's own TTL, named and grouped
node-<requestID>— andManagementis the absolute front-door URI. The device redeems it once at landing, the mesh comes up, and the device reports its ownwt0address onConfirmEnrolledexactly as ADR 0209 rules (the plane is never the address oracle). A composition with no mesh plane refuses at Approve with the honestErrNoMeshPlane, surfaced on the operator's strip likeErrNoCAis today. The placeholderMeshAdmissionForis deleted.Token source: the carrier's service identity as V1 ruled on the plane ticket, behind one small adapter so a different source swaps the adapter, not the port.
Acceptance criteria
MeshMinterport (Mint(ctx, GrantSpec, now) → MeshAdmission) on the ledger config besideGranter;Approvecalls Grant then Mint and stores the admission on the grant; a nil minter →ErrNoMeshPlane, request stays Pending (offline test).node-<requestID>; composition-root wiring mirrors the community-CA wiring (env in, port or nil out, one honest log line); the gateway render exports what it needs as file-path exports.Management = https://mesh.<apex>:443and an emptyTLSPin; gateway-role admission stays the zero value;MeshAdmissionForno longer exists.ErrNoMeshPlanewith a legible sentence when the plane is absent (component/e2e assertion).approvegreen andConfirmEnrolledcarries a realwt0address read off the device; the second redemption of the same key is refused.node-<requestID>name/group) — offline test against the minter's fake, live check on rehearsal-d.go build/vet/lint/tests green; STATUS updated; #956 closes when this lands.Blocked by
Task manifest
netbird uprejectsmesh.internaland no device can landnetbird uprejectsmesh.internaland no device can land #956swarm-claim host=elitebook-distributed-server-03 run=13455
(automated multi-host claim — lowest live claim id works this ticket)
Ruled by agent under ADR 0174 — veto anytime.
The manifest's
needs_human_decisionwas empty; built to the ticket'sinterface(enroll.MeshMinter.Mint(ctx, GrantSpec, now)+enroll.ErrNoMeshPlane). Three shaping calls, each a two-way door (revertible in a commit, provable by an existing offline test):The
MeshMinterport gainsRevoke(ctx, NodeID)besideMint. AC6 ("revoking the request removes the peer it admitted … offline test against the minter's fake") is only expressible if the port carries a revoke; theinterface:line summarised Mint alone. Wired intoLedger.Abandon(the one operation that closes an Approved request — the only status that has minted a peer), idempotent, proven offline against the fake recorder (TestAbandon_RevokesMeshPeer) and against an httptest netbird (TestNetbirdMinter_RevokeRemovesGroupPeers). Revertible; two-way.Token source = the V1 PAT fallback (
Bearer), read fromIDSS_MESH_TOKEN_FILE. Follows #961's recorded V1 outcome (docs/spike-findings/2026-08-28-mesh-plane-v1-961.md) verbatim — neither carrier issues a client-credentials token, soNetbirdMinterpresents a Netbird service-user PAT held as a clan var. The adapter is token-source-agnostic; a future client-credentials grant swaps behind it.The seed-leg PAT provisioning is deferred (named residue), gated behind
GatewayFacts.MeshToken(false until provisioned). Minting the PAT requires the live management plane (a founding + live-plane change, coupled to decision 5'sidss-mesh-self-admit), which is outside this manifest'sseam:(internal/enrollledger tests + phase-5 drive). So this slice ships the full offline-provable seam — port, Approve wiring,ErrNoMeshPlane+503,NetbirdMinteradapter, composition wiring, the render'snetbird-api-tokenvar +IDSS_MESH_TOKEN_FILEexport (gated onMeshToken), the e2e assertion — and until a founding path both flipsMeshTokenand feeds the PAT, the minter honestly restsErrNoMeshPlane. This keeps current renders unchanged (an unfed prompt would block deploy; a machine-generated value would be a fake PAT, ADR 0100). The live drive #854 (approvegreen,ConfirmEnrolledcarries a realwt0, second redemption refused) is the standingrehearsal-dproof — the same live proof #961/#962 deferred there.All offline:
go build/vet/golangci-lint/fullgo test ./...green. Filing the seed-leg PAT provisioning +MeshTokenflip as a decision-5-adjacent follow-up.close-report for #963 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope
netbird uprejectsmesh.internaland no device can land #956