founding: identity-handoff-scrub — passkey enrolment, recovery kit, scrub, land Operator home #72

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

Parent

Feature spec: #11 (founding).

What to build

The hand-off (P1-S12): first login, recovery, scrub, and landing. Seeding minted a single-use, short-TTL kanidm credential-enrolment token returned over the founding SSH connection only (ADR 0046); S12 opens the dashboard with it and the operator lands on kanidm's branded enrolment screen (brand name + mono logo) to register a passkey — no password ever exists. If the token expired because stand-up took days (a designed-for case), the app re-mints one through the same mechanism and the operator retries losing nothing. The operator key (mesh identity + SSH key, generated by the helper, registered in seeded config) authenticates the app for Tier-1; the passkey authenticates the person to the dashboard; each is revocable on its own surface without touching the other (ADR 0046). The recovery-kit prompt offers export/print, and after the scrub the kit is the only Tier-3 path (ADR 0044); declining completes founding anyway, with the community visibly holding no Tier-3 material until the dashboard re-prompt is accepted — an accepted, surfaced risk, never a reason to keep laptop copies. The scrub runs as a real, verifiable stand-up step: the laptop is left holding exactly the designed residue — repo replica, operator key, exported kit if any — and the founding state file is deleted (ADRs 0044/0050). The branded portal is live at the community's address (brand + service links only), and on exit the operator lands on Operator home (shell) with the gateway visible on the dashboard's fleet surface (name, role, health).

Runs on the founding orchestrator (ADR 0052). Notes: this slice seeds runtime data other features read — founder member row, auth-gate OIDC client, default-open matrix, kaitiaki group, alert contact, spent founding code, first operator key. Per the slice-map ruling (2026-07-25) these are data couplings, not build edges — no cross-feature blocking dependency is created by them.

Acceptance criteria

  • (story 27) Given seeding minted a single-use, short-TTL kanidm credential-enrolment token returned over the founding SSH connection only (ADR 0046), when S12 opens the dashboard with it, then the operator lands on kanidm's branded enrolment screen (brand name + mono logo) and registers a passkey.
  • (story 27) Given the token expired (stand-up took days — a designed-for case), when the operator uses it, then the app re-mints one through the same mechanism and the operator retries without losing anything.
  • (story 28) Given hand-off completes, when credentials are settled, then the operator key (mesh identity + SSH key, helper-generated, registered in seeded config) authenticates the app for Tier-1, the passkey authenticates the person to the dashboard, and each is revocable on its own surface without touching the other (ADR 0046).
  • (story 29) Given seeding is complete, when S12 renders, then the recovery-kit prompt offers export/print, and after the scrub the kit (with its shared-safekeeping shares) is the only Tier-3 path (ADR 0044).
  • (story 29) Given the operator declines the kit, when founding completes anyway, then the community visibly has no Tier-3 material until the dashboard re-prompt is accepted — an accepted, surfaced risk, never a reason to keep laptop copies.
  • (story 30) Given seeding placed the crown jewels on the fleet and the kit offer is resolved, when the scrub runs as a real, verifiable stand-up step, then the laptop holds exactly the designed residue — repo replica, operator key, exported kit if any — and the founding state file is deleted (ADRs 0044/0050).
  • (story 31) Given hand-off, when anyone visits the community's address, then the branded portal is live — brand + service links only (founding stands it up; provisioning keeps its links current).
  • (story 32) Given S12 completes, when the operator exits, then they land on Operator home (shell), and the gateway is visible on the dashboard's fleet surface with name, role, and health (ticket #9 boundary ruling).

Blocked by

  • #65 — hand-off consumes the seeded token, keys, and repo.

Task manifest

task: founding:identity-handoff-scrub
implements_flow: p1-founding
implements_edge: S12→SHHO
wireframe: docs/ux/wireframes/p1-founding/p1-s12-hand-off.html
interface: the `founding` orchestrator's hand-off face — open the dashboard with the single-use kanidm credential-enrolment token (re-mint over the founding SSH connection on expiry, ADR 0046), settle the operator-key / passkey split, present the recovery-kit offer, run the scrub as a verifiable step asserting residue = replica + operator key + kit and deleting the founding state file (ADRs 0044/0050), confirm the branded portal live and land on Operator home
seam: "`founding` orchestrator seam tests (bundled helper, Go) \u2014 in-memory enroll ledger + fake clock (token TTL / re-mint without waiting), fake clan, real brandkit; assert laptop residue is exactly replica + operator key + kit"
acceptance:
  - given: the seeded single-use short-TTL kanidm token (ADR 0046)
    when: S12 opens the dashboard with it
    then: the branded enrolment screen renders and the operator registers a passkey; an expired token is re-minted through the same mechanism and retried losslessly
  - given: hand-off completes
    when: credentials settle
    then: operator key authenticates the app (Tier-1), passkey authenticates the person, each independently revocable (ADR 0046)
  - given: seeding complete
    when: S12 renders / the kit is declined
    then: the kit offer (export/print) is the only Tier-3 path after scrub (ADR 0044); declining completes founding with visible no-Tier-3 until the dashboard re-prompt is accepted
  - given: the kit offer is resolved
    when: the scrub runs as a verifiable step
    then: the laptop holds exactly replica + operator key + kit-if-any and the founding state file is deleted (ADRs 0044/0050)
  - given: hand-off
    when: anyone visits the address / the operator exits
    then: the branded portal is live (brand + service links only) and the operator lands on Operator home with the gateway on the fleet surface (name, role, health)
depends_on: [seed-fleet-authority]
out_of_scope:
  - "recovery-kit contents and share mechanics — rescue owns them"
  - "kaitiaki designation — members owns it"
  - "Operator home surface itself — shell owns it; founding only exits to it"
  - "seeding of the crown jewels / config-repo handover — seed-fleet-authority's (stories 24–26)"
  - "the seeded runtime data other features read (founder row, OIDC client, matrix, kaitiaki group, alert contact, spent code, operator key) are data couplings, not this slice's build scope"
needs_human_decision: []
## Parent Feature spec: #11 (founding). ## What to build The hand-off (P1-S12): first login, recovery, scrub, and landing. Seeding minted a single-use, short-TTL kanidm credential-enrolment token returned over the founding SSH connection only (ADR 0046); S12 opens the dashboard with it and the operator lands on kanidm's branded enrolment screen (brand name + mono logo) to register a passkey — no password ever exists. If the token expired because stand-up took days (a designed-for case), the app re-mints one through the same mechanism and the operator retries losing nothing. The operator key (mesh identity + SSH key, generated by the helper, registered in seeded config) authenticates the *app* for Tier-1; the passkey authenticates *the person* to the dashboard; each is revocable on its own surface without touching the other (ADR 0046). The recovery-kit prompt offers export/print, and after the scrub the kit is the only Tier-3 path (ADR 0044); declining completes founding anyway, with the community visibly holding no Tier-3 material until the dashboard re-prompt is accepted — an accepted, surfaced risk, never a reason to keep laptop copies. The scrub runs as a real, verifiable stand-up step: the laptop is left holding exactly the designed residue — repo replica, operator key, exported kit if any — and the founding state file is deleted (ADRs 0044/0050). The branded portal is live at the community's address (brand + service links only), and on exit the operator lands on Operator home (shell) with the gateway visible on the dashboard's fleet surface (name, role, health). Runs on the `founding` orchestrator (ADR 0052). Notes: this slice seeds runtime data other features read — founder member row, auth-gate OIDC client, default-open matrix, kaitiaki group, alert contact, spent founding code, first operator key. Per the slice-map ruling (2026-07-25) these are data couplings, not build edges — no cross-feature blocking dependency is created by them. ## Acceptance criteria - [ ] (story 27) Given seeding minted a single-use, short-TTL kanidm credential-enrolment token returned over the founding SSH connection only (ADR 0046), when S12 opens the dashboard with it, then the operator lands on kanidm's branded enrolment screen (brand name + mono logo) and registers a passkey. - [ ] (story 27) Given the token expired (stand-up took days — a designed-for case), when the operator uses it, then the app re-mints one through the same mechanism and the operator retries without losing anything. - [ ] (story 28) Given hand-off completes, when credentials are settled, then the operator key (mesh identity + SSH key, helper-generated, registered in seeded config) authenticates the app for Tier-1, the passkey authenticates the person to the dashboard, and each is revocable on its own surface without touching the other (ADR 0046). - [ ] (story 29) Given seeding is complete, when S12 renders, then the recovery-kit prompt offers export/print, and after the scrub the kit (with its shared-safekeeping shares) is the only Tier-3 path (ADR 0044). - [ ] (story 29) Given the operator declines the kit, when founding completes anyway, then the community visibly has no Tier-3 material until the dashboard re-prompt is accepted — an accepted, surfaced risk, never a reason to keep laptop copies. - [ ] (story 30) Given seeding placed the crown jewels on the fleet and the kit offer is resolved, when the scrub runs as a real, verifiable stand-up step, then the laptop holds exactly the designed residue — repo replica, operator key, exported kit if any — and the founding state file is deleted (ADRs 0044/0050). - [ ] (story 31) Given hand-off, when anyone visits the community's address, then the branded portal is live — brand + service links only (founding stands it up; provisioning keeps its links current). - [ ] (story 32) Given S12 completes, when the operator exits, then they land on Operator home (shell), and the gateway is visible on the dashboard's fleet surface with name, role, and health (ticket #9 boundary ruling). ## Blocked by - #65 — hand-off consumes the seeded token, keys, and repo. ## Task manifest ```yaml task: founding:identity-handoff-scrub implements_flow: p1-founding implements_edge: S12→SHHO wireframe: docs/ux/wireframes/p1-founding/p1-s12-hand-off.html interface: the `founding` orchestrator's hand-off face — open the dashboard with the single-use kanidm credential-enrolment token (re-mint over the founding SSH connection on expiry, ADR 0046), settle the operator-key / passkey split, present the recovery-kit offer, run the scrub as a verifiable step asserting residue = replica + operator key + kit and deleting the founding state file (ADRs 0044/0050), confirm the branded portal live and land on Operator home seam: "`founding` orchestrator seam tests (bundled helper, Go) \u2014 in-memory enroll ledger + fake clock (token TTL / re-mint without waiting), fake clan, real brandkit; assert laptop residue is exactly replica + operator key + kit" acceptance: - given: the seeded single-use short-TTL kanidm token (ADR 0046) when: S12 opens the dashboard with it then: the branded enrolment screen renders and the operator registers a passkey; an expired token is re-minted through the same mechanism and retried losslessly - given: hand-off completes when: credentials settle then: operator key authenticates the app (Tier-1), passkey authenticates the person, each independently revocable (ADR 0046) - given: seeding complete when: S12 renders / the kit is declined then: the kit offer (export/print) is the only Tier-3 path after scrub (ADR 0044); declining completes founding with visible no-Tier-3 until the dashboard re-prompt is accepted - given: the kit offer is resolved when: the scrub runs as a verifiable step then: the laptop holds exactly replica + operator key + kit-if-any and the founding state file is deleted (ADRs 0044/0050) - given: hand-off when: anyone visits the address / the operator exits then: the branded portal is live (brand + service links only) and the operator lands on Operator home with the gateway on the fleet surface (name, role, health) depends_on: [seed-fleet-authority] out_of_scope: - "recovery-kit contents and share mechanics — rescue owns them" - "kaitiaki designation — members owns it" - "Operator home surface itself — shell owns it; founding only exits to it" - "seeding of the crown jewels / config-repo handover — seed-fleet-authority's (stories 24–26)" - "the seeded runtime data other features read (founder row, OIDC client, matrix, kaitiaki group, alert contact, spent code, operator key) are data couplings, not this slice's build scope" needs_human_decision: [] ```
Author
Owner

Done in dcbcc00 (origin/main).

The P1-S12 hand-off, scrub, and landing — founding's last slice, completing the P1 happy path end to end (W → S1…S12 → Operator home). Built at the ADR-0052 founding orchestrator seam (internal/founding/handoff.go) with five ops resting at the new StandupHandOff step, and shipped as the S12 screen FoundingHandOff.vue.

  • Story 27 — passkey enrolment (ADR 0046): a new Enrolment seam (kanidm's native credential-reset flow) mints a single-use, short-TTL token; EnrolPasskey opens the branded enrolment screen (brand name + mono logo) and registers a passkey — no password. An expired token (stand-up took days) is re-minted through the same mechanism and retried losslessly (FakeEnrolment.ExpireFirst = the fake clock).
  • Story 28 — the two-credential split: the operator key authenticates the app (Tier-1), the passkey the person (dashboard); each carries its own revocation surface (dashboard:operator-keys vs kanidm:person) so neither revocation touches the other.
  • Story 29 — recovery-kit offer (ADR 0044): SaveRecoveryKit / DeclineRecoveryKit — a saved kit is the only Tier-3 path after the scrub; declining completes founding anyway, surfacing the no-Tier-3-until-the-dashboard-re-prompt risk (never a reason to keep laptop copies).
  • Story 30 — the scrub (ADRs 0044/0050): CompleteHandOff runs the scrub against a new Laptop seam as a real, verifiable step — asserts residue is exactly repo replica + operator key + exported-kit-if-any (ErrScrubResidue refuses otherwise, nothing deleted), then deletes the founding state file via the new Store.Delete.
  • Stories 31/32 — portal + landing: the branded portal is confirmed live at the community's address (brand + service links only); on exit the operator lands on Operator home (shell's, exit only) with the gateway on the dashboard's fleet surface (name · role · health).

Evidence: internal/founding/handoff_test.go (stories 27–32 at the seam, incl. re-mint, residue-refusal, non-secret logging, and guard tests) and app/tests/unit/foundingHandOff.test.ts (the S12 screen driven through the wizard). The S12 screen mounts after a live deploy via deploy-gateway's new finish-setup affordance → run-seed → begin-hand-off. No token value is ever persisted or logged (ADR 0051). STATUS.md updated (header + milestone log). Full go test ./... and all 179 vitest tests green.

Done in dcbcc00 (`origin/main`). The P1-S12 hand-off, scrub, and landing — founding's last slice, completing the P1 happy path end to end (W → S1…S12 → Operator home). Built at the ADR-0052 `founding` orchestrator seam (`internal/founding/handoff.go`) with five ops resting at the new `StandupHandOff` step, and shipped as the S12 screen `FoundingHandOff.vue`. - **Story 27 — passkey enrolment (ADR 0046):** a new `Enrolment` seam (kanidm's native credential-reset flow) mints a single-use, short-TTL token; `EnrolPasskey` opens the branded enrolment screen (brand name + mono logo) and registers a passkey — no password. An expired token (stand-up took days) is re-minted through the same mechanism and retried losslessly (`FakeEnrolment.ExpireFirst` = the fake clock). - **Story 28 — the two-credential split:** the operator key authenticates the app (Tier-1), the passkey the person (dashboard); each carries its own revocation surface (`dashboard:operator-keys` vs `kanidm:person`) so neither revocation touches the other. - **Story 29 — recovery-kit offer (ADR 0044):** `SaveRecoveryKit` / `DeclineRecoveryKit` — a saved kit is the only Tier-3 path after the scrub; declining completes founding anyway, surfacing the no-Tier-3-until-the-dashboard-re-prompt risk (never a reason to keep laptop copies). - **Story 30 — the scrub (ADRs 0044/0050):** `CompleteHandOff` runs the scrub against a new `Laptop` seam as a real, verifiable step — asserts residue is exactly repo replica + operator key + exported-kit-if-any (`ErrScrubResidue` refuses otherwise, nothing deleted), then deletes the founding state file via the new `Store.Delete`. - **Stories 31/32 — portal + landing:** the branded portal is confirmed live at the community's address (brand + service links only); on exit the operator lands on Operator home (shell's, exit only) with the gateway on the dashboard's fleet surface (name · role · health). Evidence: `internal/founding/handoff_test.go` (stories 27–32 at the seam, incl. re-mint, residue-refusal, non-secret logging, and guard tests) and `app/tests/unit/foundingHandOff.test.ts` (the S12 screen driven through the wizard). The S12 screen mounts after a live deploy via deploy-gateway's new `finish-setup` affordance → `run-seed` → `begin-hand-off`. No token value is ever persisted or logged (ADR 0051). STATUS.md updated (header + milestone log). Full `go test ./...` and all 179 vitest tests green.
ben closed this issue 2026-07-26 05:33:37 +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#72
No description provided.