engine-adapters: smoke-idp — family-4 proven on the clan-lab #178

Closed
opened 2026-07-29 05:10:19 +00:00 by ben · 1 comment
Owner

Parent

Engine-adapters child spec: #161 (ADRs 0102–0107; scoped on wayfinder #160 — Ben ruled live: per-family clan-lab smokes gate each family, the arc closes on a real-hardware end-to-end, tickets arm the swarm). Everything else agent-decided, post-hoc review pending.

What to build

Family-4 proof: on a lab gateway with real kanidm — invite → signup → approve creates a real enabled person; suspend denies at the gate and disables the account; a reset link wraps a real kanidm token; komiti create/rename/delete; then REDEPLOY the gateway and prove every runtime person and komiti survives (ADR 0105's load-bearing rule). Executes spec #19's standing smoke clause.

Acceptance criteria

  • Given the member lifecycle driven end-to-end, When each act lands, Then kanidm's directory reflects it
  • Given a gateway redeploy, When declarative provisioning re-applies, Then no runtime person or komiti is touched

Blocked by

  • engine-adapters:idp-adapter
  • engine-adapters:member-orbit-adapters

Task manifest

task: engine-adapters:smoke-idp
implements_seam: "the confirmed seams + ADRs 0102-0107 are the design contract (no flow/wireframe — spec #161)"
interface: "the family's public seam, driven end-to-end on the clan-lab"
seam: "the clan-lab run itself (clan-lab + lab-dns skills); evidence (logs, verdicts) posted to this ticket"
acceptance:
  - given: a real 3-node lab fleet; when: the scripted smoke drives the family; then: every listed leg passes and evidence is attached (spec #19)
depends_on: [engine-adapters:idp-adapter, engine-adapters:member-orbit-adapters]
out_of_scope: [performance / resource-floor numbers (honesty limits: measure only what the substrate can honestly show)]
needs_human_decision: []
## Parent Engine-adapters child spec: #161 (ADRs 0102–0107; scoped on wayfinder #160 — Ben ruled live: per-family clan-lab smokes gate each family, the arc closes on a real-hardware end-to-end, tickets arm the swarm). Everything else agent-decided, post-hoc review pending. ## What to build Family-4 proof: on a lab gateway with real kanidm — invite → signup → approve creates a real enabled person; suspend denies at the gate and disables the account; a reset link wraps a real kanidm token; komiti create/rename/delete; then REDEPLOY the gateway and prove every runtime person and komiti survives (ADR 0105's load-bearing rule). Executes spec #19's standing smoke clause. ## Acceptance criteria - [ ] Given the member lifecycle driven end-to-end, When each act lands, Then kanidm's directory reflects it - [ ] Given a gateway redeploy, When declarative provisioning re-applies, Then no runtime person or komiti is touched ## Blocked by - engine-adapters:idp-adapter - engine-adapters:member-orbit-adapters ## Task manifest ```yaml task: engine-adapters:smoke-idp implements_seam: "the confirmed seams + ADRs 0102-0107 are the design contract (no flow/wireframe — spec #161)" interface: "the family's public seam, driven end-to-end on the clan-lab" seam: "the clan-lab run itself (clan-lab + lab-dns skills); evidence (logs, verdicts) posted to this ticket" acceptance: - given: a real 3-node lab fleet; when: the scripted smoke drives the family; then: every listed leg passes and evidence is attached (spec #19) depends_on: [engine-adapters:idp-adapter, engine-adapters:member-orbit-adapters] out_of_scope: [performance / resource-floor numbers (honesty limits: measure only what the substrate can honestly show)] needs_human_decision: [] ```
Author
Owner

Done — family 4 (the member IdP, ADR 0105) proven on real kanidm. Commit 95a27d5 on origin/main.

A self-contained smoke binary (control-plane/cmd/smoke-idp, scripts/smoke-idp.sh) drove the production kanidm engine adapter (idp-adapter #171) end to end against a real kanidm on a clan-lab gateway (node1, 127.0.0.1:8443 behind the internal CA→leaf chain). Every act is driven THROUGH the adapter and read back from kanidm's directory by an independent admin client — so the evidence is "kanidm's directory reflects it", not "the adapter says so". All three legs PASS on real hardware:

  • lifecycle (AC1) — signup(disabled)→approve(enabled)→a real reset token→suspend(disabled); komiti create/rename/delete carrying+dropping membership and never surfacing a structural group; a by-hand enabled member designated kaitiaki (hidden, never a komiti); removal.
  • seed + survive (AC2) — a durable person + komiti + kaitiaki designation survived a real clan machines update node1 redeploy and the kanidm-provision re-application untouched; the structural groups re-declared.

Evidence (3 JSON verdicts + the setup): docs/spike-findings/smoke-idp-178.md. Lab config: spikes/smoke-idp/. Lab clan-lab-smoke-idp-178-340907d9 (golden pin clan-core db4db726, kanidm 1.10.3), run on node1, all legs exit 0, then destroyed.

The gate earned its keep — two real adapter bugs the fake double masked, both FIXED in this slice

  1. Missing entity is 200 null, not 404. kanidm answers a GET for a missing person/group with HTTP 200 + a JSON null body. internal/kanidm's Person/entityExists keyed existence off the status alone, so every missing entity read as found. Fixed to read existence from the body; the contract-test double is made faithful and TestPerson_Missing_ReadsNotFound locks it.
  2. overwriteMembers strips runtime memberships on redeploy. kanidm-provision's default overwriteMembers=true resets each declared group to exactly its declared members on every run — silently stripping the runtime kaitiaki designation on redeploy (a direct breach of ADR 0105's load-bearing rule, caught by the survive leg). Fixed with overwriteMembers=false (existence declared, membership runtime). This is a hard requirement for founding's real gateway provisioning — worth an ADR 0105 note.

⚠️ FOLLOW-UP NEEDED (not blocking #178)

The admin setPassword credential-update path in internal/kanidm does not work against real kanidm 1.10:

  • begin (GET …/_credential/_update) returns an array [CUSessionToken, CUStatus], not {"token":…};
  • the set request body is [CURequest, CUSessionToken] (request first) with the externally-tagged variant {"password":…};
  • the commit route is …/_credential/_commit, not …/_update_commit; and kanidm's default account policy refuses to commit a bare admin-set password (can_commit:false, warnings:["MfaRequired"]).

The member's real credential path is the reset-token intent flow (MintResetToken), which works, so the smoke drives signup as a passkey / by-hand with no temp password — the acceptance clauses do not depend on setPassword. But setPassword (used by the by-hand TempPassword and the signup password fallback, ADR 0077) needs a focused follow-up: rework it to kanidm's credential-update protocol and reconcile the password fallback with kanidm's credential policy. Recommend a human file this as a new ticket in the engine-adapters arc.

**Done — family 4 (the member IdP, ADR 0105) proven on real kanidm.** Commit `95a27d5` on `origin/main`. A self-contained smoke binary (`control-plane/cmd/smoke-idp`, `scripts/smoke-idp.sh`) drove the production kanidm engine adapter (idp-adapter #171) end to end against a **real kanidm** on a clan-lab gateway (node1, `127.0.0.1:8443` behind the internal CA→leaf chain). Every act is driven THROUGH the adapter and read back from kanidm's directory by an **independent** admin client — so the evidence is "kanidm's directory reflects it", not "the adapter says so". All three legs PASS on real hardware: - **lifecycle (AC1)** — signup(disabled)→approve(enabled)→a real reset token→suspend(disabled); komiti create/rename/delete carrying+dropping membership and never surfacing a structural group; a by-hand enabled member designated **kaitiaki** (hidden, never a komiti); removal. - **seed + survive (AC2)** — a durable person + komiti + kaitiaki designation survived a real `clan machines update node1` redeploy and the `kanidm-provision` re-application **untouched**; the structural groups re-declared. Evidence (3 JSON verdicts + the setup): `docs/spike-findings/smoke-idp-178.md`. Lab config: `spikes/smoke-idp/`. Lab `clan-lab-smoke-idp-178-340907d9` (golden pin clan-core `db4db726`, kanidm 1.10.3), run on node1, all legs exit 0, then destroyed. ### The gate earned its keep — two real adapter bugs the fake double masked, both FIXED in this slice 1. **Missing entity is `200 null`, not `404`.** kanidm answers a GET for a missing person/group with HTTP 200 + a JSON `null` body. `internal/kanidm`'s `Person`/`entityExists` keyed existence off the status alone, so *every* missing entity read as *found*. Fixed to read existence from the body; the contract-test double is made faithful and `TestPerson_Missing_ReadsNotFound` locks it. 2. **`overwriteMembers` strips runtime memberships on redeploy.** `kanidm-provision`'s default `overwriteMembers=true` resets each declared group to exactly its declared members on every run — silently stripping the runtime **kaitiaki designation** on redeploy (a direct breach of ADR 0105's load-bearing rule, caught by the survive leg). Fixed with `overwriteMembers=false` (existence declared, membership runtime). **This is a hard requirement for founding's real gateway provisioning** — worth an ADR 0105 note. ### ⚠️ FOLLOW-UP NEEDED (not blocking #178) The admin `setPassword` credential-update path in `internal/kanidm` does **not** work against real kanidm 1.10: - begin (`GET …/_credential/_update`) returns an **array** `[CUSessionToken, CUStatus]`, not `{"token":…}`; - the set request body is `[CURequest, CUSessionToken]` (request first) with the externally-tagged variant `{"password":…}`; - the commit route is `…/_credential/_commit`, not `…/_update_commit`; **and** kanidm's default account policy **refuses to commit a bare admin-set password** (`can_commit:false, warnings:["MfaRequired"]`). The member's real credential path is the reset-token intent flow (`MintResetToken`), which works, so the smoke drives signup as a passkey / by-hand with no temp password — the acceptance clauses do not depend on `setPassword`. But `setPassword` (used by the by-hand `TempPassword` and the signup password fallback, ADR 0077) needs a focused follow-up: rework it to kanidm's credential-update protocol and reconcile the password fallback with kanidm's credential policy. Recommend a human file this as a new ticket in the engine-adapters arc.
ben closed this issue 2026-07-29 16:47:54 +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#178
No description provided.