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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#960
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
Wayfinder map: Matou/ourcloud#7 — device-add (defined on ticket #9). This is a child spec of spec #13 (device-add), closing the rung #13 deferred to "#844" and #956 surfaced: the mesh half of a device's grant. Ruled on #956 by Ben (option 1, BUILD) and shaped by ADR 0214 (amends ADR 0039; binds ADR 0159, 0199, 0209, 0210). Inherits the map's cross-feature constraints: clan substrate behind the
clanseam, one enrollment mechanism with full community CA at v1, Netbird mesh, advice never veto. Design contract:docs/ux/flows/p3-device-add-app.mermaid(P3-S4 → P3-S5, plus the new P3-S4 failed-landing branch) anddocs/ux/wireframes/p3-device-add-app/(one ✎ state added to the dashboard's pending-devices strip). Glossary: mesh plane, setup key (CONTEXT.md, ADR 0214).Problem Statement
An operator approves a device and the device dies on its own terminal. Phase-5 drive
20260828T202109Zreached 23/24 legs: the gateway signs the grant, the device collects it, andnetbird uprefuses the admission — because the grant's mesh half is placeholder material (random bytes and the fabricated hostmesh.internal) and the community has no mesh plane at all: nothing on the gateway coordinates peers, so there is nothing real to hand a device. The operator's strip sits at "approved — joining now" for five minutes and never learns why. Every later step of device-add and provisioning (assess, files on a member device over the mesh, takeover-ready over the mesh) is unreachable until a device can actually join.Solution
The community gateway ships the mesh plane — Netbird management, signal and relay — as part of both gateway renders, reachable from a member's home through the front door on
mesh.<apex>. When the operator approves a connection request, the control plane mints a setup key for that request through a newMeshMinterport and puts it in the grant; the device redeems it once at landing, reads its own mesh address off the box and reports it as before (ADR 0209). The gateway joins its own plane at first deploy, and every unit that binds the mesh interface orders on it (ADR 0159). If a landing fails, the device reports the failure back and the operator sees it on the strip in seconds. Members never log into Netbird; the control plane is the plane's only user, with one service identity per identity carrier.User Stories
node-<requestID>andManagementishttps://mesh.<apex>:443, and the strip shows "approved — joining now".netbird upto succeed with the admission I was given, so that P3-S4 Joining reaches P3-S5 Joined.wt0address is read fromnetbird status, andConfirmEnrolledcarries that address (never a control-plane-derived one).pending-device-errorwith the device's own sentence within seconds, the request stays Approved (the grant is still the device's to retry), and the e2e race resolves on the error, not the timeout.MeshMinterwired, When I approve, Then Approve fails with the namedErrNoMeshPlane, surfaced through the strip's error channel with a legible sentence (parity withErrNoCA).netbird-management,netbird-signaland coturn are running, the datastore key and coturn secret are clan vars generated on the gateway, and the eval smoke asserts every dereferenced generator by name.https://mesh.<apex>:443, Then the front door routes management and signal gRPC to the local daemons under a public-CA certificate, and the port table (8011/8012) is never exposed on the WAN directly.wt0exists, so that the first peer can join.wt0, When a peer dials over the LAN, Then management answers (the spike Q5 nuance is honoured).POST /api/setup-keys; Given the IDIP carrier, the same viaidss-idp. (Verification V1 — see Testing.)node-<requestID>name/group.wt0to bind (ADR 0159).idss-mesh-self-admitoneshot mints a key through the same API and brings the gateway's peer up; re-running it is a no-op when already connected; it retries on failure without a start limit.wt0to order on the mesh client, so that a reboot never races the mesh (ADR 0159 made true).after/wantson the mesh client unit via one shared helper, and the eval smoke asserts it.MeshAdmissionForno longer exists, the gateway role's admission is the zero value, andTLSPinis empty on member grants.wt0entries exist.p3-device-add-app, When wireframes are read, Then a ✎ pending-device-error state on the dashboard strip exists withdata-status="pending-device-error"and the device's sentence field.Implementation Decisions
netbirdServeremitter in the gateway renders (both kanidm and IDIP), gated on a newGatewayFacts.Meshflag the founding paths set; promotes the spike's content, not its file (the module is never added to the known-module list). Generator name constantsnetbird-datastoreandnetbird-coturnare the render↔feed contract and are asserted like the CA generators. No Netbird dashboard. Firewall: 8011/8012 on the LAN nic andwt0; 51820/udp + 3478/udp are the existing mesh/relay port groups.mesh.<apex>with three path routes (management gRPC, signal gRPC,/api) to localhost; certificate via the existing acme-dns path. SignalURI= front-door host with an explicit:443.MeshAdmission{SetupKey, Management, TLSPin}unchanged;Managementis the absolute front-door URI,TLSPinempty,Redeemable()unchanged.MeshMinterport on the ledger config besideGranter:Mint(ctx, GrantSpec, now) (MeshAdmission, error).ApprovecallsGranter.GrantthenMeshMinter.Mint; nil minter →ErrNoMeshPlane(composition-root wiring mirrorsproductionCommunityCA: env in, port or nil out, one honest log line). Production minter calls the gateway-local management API with the carrier's service token; keys are single-use, request-TTL, named/groupednode-<requestID>.MeshAdmissionFordeleted.wt0, 51820) pointed at its own plane;idss-mesh-self-admitoneshot after management + identity; sharedmeshBound()render helper adopted by everywt0-binding unit in the same slice.ReportLandingFailed(ctx, requestID, err)on the join orchestrator's control-plane port and a matching control-API verb; ledger storesLandingErroron the Approved view;PendingDevicesSurfacerenders it aspending-device-errorfrom the read, not only from the Approve verb's own error.docs/architecturegains the mesh-plane view in the render slice.Testing Decisions
Good tests exercise the existing seams from outside: the ledger through its public verbs with fakes at its ports; renders through their emitted text and the nix eval smoke; the join orchestrator through its fake control plane and mesh; the dashboard through component tests on
data-status/data-field; the whole through the standing phase-5 drive.enroll):Approvewith a fakeMeshMinter→ grant carries the minted admission; nil minter →ErrNoMeshPlane, request stays Pending;ReportLandingFailed→LandingErroron the view, status Approved, idempotent. Prior art:TestFilesGranter_SignsFromSplitFilesAndFailsNoCA, the ledger Approve tests,enrolltesting's granter stub (gains a minter stub).Mesh,meshBoundon everywt0unit, front-doormesh.<apex>routes) + the eval smoke. Prior art:community_ca_vars_test.go,gatewayAssertionstests.ReportLandingFailedwith the sentence and does not callConfirmEnrolled. Prior art:resume_anchor_test.go, land tests.LandingErrorrenderspending-device-errorwith the sentence. Prior art:PendingDevicesSurfacespecs.rehearsal-dcommunity, a client-credentials token from the carrier's issuer mints a setup key viaPOST /api/setup-keys(spike Q4 proved the user-JWT variant). Recorded indocs/spike-findings; its failure swaps the token adapter (PAT fallback), not the port.approve→assessgreen with a realwt0address onConfirmEnrolled; the e2e fixture's existing race needs no new surface.Out of Scope
deviceapprove.gostays for other CLIs.Further Notes
netbird uprejectsmesh.internaland no device can land #956#960covers scalars in device-add.yaml red the ci seam — main blocked (#834 guard firing) #967