founding: seed-fleet-authority — enrol node #1, seed crown jewels, hand over config repo #65

Closed
opened 2026-07-25 04:57:21 +00:00 by ben · 1 comment
Owner

Parent

Feature spec: #11 (founding).

What to build

The seeding step that makes the gateway an ordinary enrolled node of its own community and flips authority from the laptop to the fleet. The helper enrols the first node through the app-hosted enroll control-plane face (same package, in-process ledger; carrier per path — LAN listener at the operator's place, SSH relay for VPS/rented, direct drive for the private VM), and seeding hands the connection-request record and issued IdentityGrant into the fleet's ledger (ADR 0043), so the control plane knows its gateway as enrolled node #1 with no special identity path. The crown jewels — root CA, SSH CA, config repo, gateway vars — are born on the laptop during founding and, at seeding, placed as clan vars encrypted to machine keys and recovery material only; operator keys are not recipients (ADR 0044), so a replica plus operator key can never reconstruct them. Seeding pushes the founding repo to the bare repo on the gateway (ADR 0045); authority flips so the control-plane API is the only writer from that commit on, and the app re-clones its former repo as the replica — provenance is the fleet and staleness measurement starts honest (ADR 0032).

This seeds the crown-jewel store and the fleet's ledger (ADRs 0043/0044/0045) on the founding orchestrator (ADR 0052). The passkey enrolment, recovery-kit offer, and scrub follow in identity-handoff-scrub.

Acceptance criteria

  • (story 24) Given founding enrols the first node, when the helper runs enrollment, then it goes through the app-hosted enroll control-plane face (same package, in-process ledger; carrier per path — LAN listener at my place, SSH relay for VPS/rented, direct drive for the private VM), and seeding hands the connection-request record and issued IdentityGrant into the fleet's ledger (ADR 0043), so the control plane knows its gateway as enrolled node #1.
  • (story 25) Given crown jewels (root CA, SSH CA, config repo, gateway vars) are born on the laptop during founding, when seeding completes, then secrets are placed as clan vars encrypted to machine keys and recovery material only — operator keys are not recipients (ADR 0044) — so replica + operator key can never reconstruct them.
  • (story 26) Given seeding pushes the founding repo to the bare repo on the gateway (ADR 0045), when authority flips, then the control-plane API is the only writer from that commit on, and the app re-clones its former repo as the replica — so the replica's provenance is the fleet and staleness measurement starts honest (ADR 0032).

Blocked by

  • #57 — seeding lands on the live control plane.

Task manifest

task: founding:seed-fleet-authority
implements_flow: p1-founding
implements_edge: S11→S12 (seeding portion)
wireframe: docs/ux/wireframes/p1-founding/p1-s12-hand-off.html
interface: the `founding` orchestrator's seeding face over the `enroll` face (carrier per path) and `clan` vars — hand the connection-request record + IdentityGrant into the fleet's in-process ledger so the gateway is enrolled node #1, place crown jewels as clan vars encrypted to machine keys + recovery material only (operator keys excluded), push the founding repo to the gateway's bare repo and re-clone as replica so authority flips to the control-plane API
seam: "`founding` orchestrator seam tests (bundled helper, Go) \u2014 fake clan (vars, deploy), in-memory enroll ledger + fake clock, real brandkit"
acceptance:
  - given: the helper runs enrollment of the first node
    when: seeding completes
    then: it goes through the app-hosted enroll face (carrier per path) and hands the request record + IdentityGrant into the fleet ledger, so the control plane knows the gateway as enrolled node #1 (ADR 0043)
  - given: crown jewels born on the laptop
    when: seeding completes
    then: secrets are clan vars encrypted to machine keys + recovery material only, operator keys not recipients (ADR 0044) — replica + operator key cannot reconstruct them
  - given: seeding pushes the founding repo to the gateway bare repo (ADR 0045)
    when: authority flips
    then: the control-plane API is the only writer, and the app re-clones as replica so provenance is the fleet and staleness starts honest (ADR 0032)
depends_on: [deploy-gateway]
out_of_scope:
  - "passkey enrolment, operator-key/passkey split, recovery kit, scrub, portal, Operator home — identity-handoff-scrub's (stories 27–32)"
  - "recovery-kit contents and share mechanics — rescue owns them"
needs_human_decision: []
## Parent Feature spec: #11 (founding). ## What to build The seeding step that makes the gateway an ordinary enrolled node of its own community and flips authority from the laptop to the fleet. The helper enrols the first node through the app-hosted `enroll` control-plane face (same package, in-process ledger; carrier per path — LAN listener at the operator's place, SSH relay for VPS/rented, direct drive for the private VM), and seeding hands the connection-request record and issued IdentityGrant into the fleet's ledger (ADR 0043), so the control plane knows its gateway as enrolled node #1 with no special identity path. The crown jewels — root CA, SSH CA, config repo, gateway vars — are born on the laptop during founding and, at seeding, placed as clan vars encrypted to machine keys and recovery material only; operator keys are not recipients (ADR 0044), so a replica plus operator key can never reconstruct them. Seeding pushes the founding repo to the bare repo on the gateway (ADR 0045); authority flips so the control-plane API is the only writer from that commit on, and the app re-clones its former repo as the replica — provenance is the fleet and staleness measurement starts honest (ADR 0032). This seeds the crown-jewel store and the fleet's ledger (ADRs 0043/0044/0045) on the `founding` orchestrator (ADR 0052). The passkey enrolment, recovery-kit offer, and scrub follow in identity-handoff-scrub. ## Acceptance criteria - [ ] (story 24) Given founding enrols the first node, when the helper runs enrollment, then it goes through the app-hosted `enroll` control-plane face (same package, in-process ledger; carrier per path — LAN listener at my place, SSH relay for VPS/rented, direct drive for the private VM), and seeding hands the connection-request record and issued IdentityGrant into the fleet's ledger (ADR 0043), so the control plane knows its gateway as enrolled node #1. - [ ] (story 25) Given crown jewels (root CA, SSH CA, config repo, gateway vars) are born on the laptop during founding, when seeding completes, then secrets are placed as clan vars encrypted to machine keys and recovery material only — operator keys are not recipients (ADR 0044) — so replica + operator key can never reconstruct them. - [ ] (story 26) Given seeding pushes the founding repo to the bare repo on the gateway (ADR 0045), when authority flips, then the control-plane API is the only writer from that commit on, and the app re-clones its former repo as the replica — so the replica's provenance is the fleet and staleness measurement starts honest (ADR 0032). ## Blocked by - #57 — seeding lands on the live control plane. ## Task manifest ```yaml task: founding:seed-fleet-authority implements_flow: p1-founding implements_edge: S11→S12 (seeding portion) wireframe: docs/ux/wireframes/p1-founding/p1-s12-hand-off.html interface: the `founding` orchestrator's seeding face over the `enroll` face (carrier per path) and `clan` vars — hand the connection-request record + IdentityGrant into the fleet's in-process ledger so the gateway is enrolled node #1, place crown jewels as clan vars encrypted to machine keys + recovery material only (operator keys excluded), push the founding repo to the gateway's bare repo and re-clone as replica so authority flips to the control-plane API seam: "`founding` orchestrator seam tests (bundled helper, Go) \u2014 fake clan (vars, deploy), in-memory enroll ledger + fake clock, real brandkit" acceptance: - given: the helper runs enrollment of the first node when: seeding completes then: it goes through the app-hosted enroll face (carrier per path) and hands the request record + IdentityGrant into the fleet ledger, so the control plane knows the gateway as enrolled node #1 (ADR 0043) - given: crown jewels born on the laptop when: seeding completes then: secrets are clan vars encrypted to machine keys + recovery material only, operator keys not recipients (ADR 0044) — replica + operator key cannot reconstruct them - given: seeding pushes the founding repo to the gateway bare repo (ADR 0045) when: authority flips then: the control-plane API is the only writer, and the app re-clones as replica so provenance is the fleet and staleness starts honest (ADR 0032) depends_on: [deploy-gateway] out_of_scope: - "passkey enrolment, operator-key/passkey split, recovery kit, scrub, portal, Operator home — identity-handoff-scrub's (stories 27–32)" - "recovery-kit contents and share mechanics — rescue owns them" needs_human_decision: [] ```
Author
Owner

Done — landed on origin/main as b9ec880.

Seeding portion of P1-S11→S12 (engineering slice at the ADR-0052 founding orchestrator seam). From the resting live StandupDeploying, Orchestrator.RunSeed (internal/founding/seed.go) makes the gateway an ordinary enrolled node of its own community and flips authority from the laptop to the fleet, resting at the new StandupSeeded step:

  • story 24 (ledger handover, ADR 0043): enrolment already went through the app-hosted enroll face at pairing (carrier per path). Seeding confirms the gateway enrolled (EnrollFace.ConfirmEnrolled), exports the handover unit (Ledger.Export() — the connection-request record + issued IdentityGrant), and hands it into the fleet's in-process ledger over a new narrow Fleet seam (SeedLedger). The seam test reconstructs the fleet ledger via the receiving half enroll.NewLedgerFromState and proves the control plane knows the gateway as enrolled node #1.
  • story 25 (crown jewels as clan vars, ADR 0044): the crown jewels (root CA, SSH CA, config repo, gateway vars) are placed as clan vars encrypted to the machine key + recovery material only — operator keys are NOT recipients (clan.Config.SetVarSpec / VarSpec.Recipients), so replica + operator key can never reconstruct them; verified through the clan boundary with a new clan.Fake.VarSpecs() recorder.
  • story 26 (config-repo authority flip, ADRs 0045/0032): seeding pushes the founding repo to the gateway's bare repo (Fleet.PushConfigRepo) and flips authority so the control-plane API is the sole writer and the app re-clones its former repo as the replica (provenance: the fleet, staleness starts honest).

No secret material is persisted or logged (ADR 0051): SeedStatus records only non-secret evidence.

Evidence: internal/founding/seed_test.go (stories 24/25/26 + logged-non-secret-and-persisted + fleet-failure + guards), internal/founding/seed.go, internal/founding/fakes.go (FakeFleet), internal/clan/fake.go (VarSpecs()), internal/founding/{standup,orchestrator,stdio}.go. go test ./internal/founding/ ./internal/clan/ green; go vet + gofmt clean.

Out of scope / next (identity-handoff-scrub #72): the S12 hand-off landing — passkey enrolment, operator-key/passkey split, recovery kit, scrub, portal, Operator home — which wires the new run-seed op into the app-side hand-off screen. The named S12 wireframe's UI is that slice's, so this engineering slice ships no Vue.

Done — landed on `origin/main` as `b9ec880`. **Seeding portion of P1-S11→S12** (engineering slice at the ADR-0052 `founding` orchestrator seam). From the resting live `StandupDeploying`, `Orchestrator.RunSeed` (`internal/founding/seed.go`) makes the gateway an ordinary enrolled node of its own community and flips authority from the laptop to the fleet, resting at the new `StandupSeeded` step: - **story 24 (ledger handover, ADR 0043):** enrolment already went through the app-hosted `enroll` face at pairing (carrier per path). Seeding confirms the gateway enrolled (`EnrollFace.ConfirmEnrolled`), exports the handover unit (`Ledger.Export()` — the connection-request record + issued `IdentityGrant`), and hands it into the fleet's in-process ledger over a new narrow `Fleet` seam (`SeedLedger`). The seam test reconstructs the fleet ledger via the receiving half `enroll.NewLedgerFromState` and proves the control plane knows the gateway as **enrolled node #1**. - **story 25 (crown jewels as clan vars, ADR 0044):** the crown jewels (root CA, SSH CA, config repo, gateway vars) are placed as clan vars encrypted to the **machine key + recovery material only — operator keys are NOT recipients** (`clan.Config.SetVarSpec` / `VarSpec.Recipients`), so replica + operator key can never reconstruct them; verified through the clan boundary with a new `clan.Fake.VarSpecs()` recorder. - **story 26 (config-repo authority flip, ADRs 0045/0032):** seeding pushes the founding repo to the gateway's bare repo (`Fleet.PushConfigRepo`) and flips authority so the control-plane API is the sole writer and the app re-clones its former repo as the replica (provenance: the fleet, staleness starts honest). No secret material is persisted or logged (ADR 0051): `SeedStatus` records only non-secret evidence. **Evidence:** `internal/founding/seed_test.go` (stories 24/25/26 + logged-non-secret-and-persisted + fleet-failure + guards), `internal/founding/seed.go`, `internal/founding/fakes.go` (`FakeFleet`), `internal/clan/fake.go` (`VarSpecs()`), `internal/founding/{standup,orchestrator,stdio}.go`. `go test ./internal/founding/ ./internal/clan/` green; `go vet` + `gofmt` clean. **Out of scope / next (identity-handoff-scrub #72):** the S12 hand-off landing — passkey enrolment, operator-key/passkey split, recovery kit, scrub, portal, Operator home — which wires the new `run-seed` op into the app-side hand-off screen. The named S12 wireframe's UI is that slice's, so this engineering slice ships no Vue.
ben closed this issue 2026-07-26 05:05:56 +00:00
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.

Reference
Matou/idss#65
No description provided.