members: member-detail-reset — member detail screen + single-use reset link #71

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

Parent

Feature spec: #19 (members).

What to build

Drilling into a member from the list (P6-S1 → S4) opens the one screen that answers "what can this person touch?" Member detail shows their role, komiti chips with an add affordance, the per-service access derived from the service × komiti matrix, their kaitiaki designation state, and the lifecycle actions. This slice builds that detail surface reading over the member orchestrator (ADR 0077); the actions it exposes — suspend, remove, komiti/matrix edits, kaitiaki and operator-role changes — are wired in their own later slices.

The reset link lands here (S4 → S1). When an active member has lost their credential ("I got a new phone"), the operator mints a reset link — kanidm's native reset token, branded — that is single-use, short-expiry, revocable, and audit-logged, and reuses the branded credential screen on the member's own device, fixed across a table with no email machinery. Minting is blocked while the member is suspended: un-suspend first, so suspension can never be quietly bypassed.

Acceptance criteria

  • (story 16) Given I drill into a member, then I see role, komiti chips (+ add), the per-service access derived from the matrix, kaitiaki designation state, and the lifecycle actions.
  • (story 17) Given an active member lost their credential, when I mint a reset link, then it is single-use, short-expiry, revocable, audit-logged, and reuses the branded credential screen on their device; and given the member is suspended, then minting is blocked until un-suspend.

Blocked by

  • #42 — detail drills in from the list
  • #64 — detail shows active, approved members

Task manifest

task: members:member-detail-reset
implements_flow: p6-members
implements_edge: S1→S4, S4→S1 (reset)
wireframe: docs/ux/wireframes/p6-members/p6-s4-member-detail.html
interface: the `member` orchestrator (ADR 0077) — read member detail (role, komiti, matrix-derived per-service access, kaitiaki state, lifecycle actions); `idp` port mint-reset-token (single-use, short-expiry, revocable, branded), blocked while suspended
seam: "`member` orchestrator seam tests (control plane, Go) \u2014 fake `idp`, in-memory reset ledger, audit sink; assert reset is single-use/revocable and refused while suspended, reset link reuses the branded credential screen"
acceptance:
  - given: I drill into a member
    when: the detail opens
    then: I see role, komiti chips (+ add), per-service access derived from the matrix, kaitiaki designation state, and the lifecycle actions
  - given: an active member lost their credential
    when: I mint a reset link
    then: it is single-use, short-expiry, revocable, audit-logged, and reuses the branded credential screen on their device
  - given: the member is suspended
    when: I try to mint a reset link
    then: minting is blocked until un-suspend
depends_on: [member-list-audit, join-approval]
out_of_scope: [the suspend switch itself (suspend's), removal fates (removal-fates'), komiti CRUD and matrix (komiti-matrix-roles'), self-service reset, member self-service account page]
needs_human_decision: []
## Parent Feature spec: #19 (members). ## What to build Drilling into a member from the list (P6-S1 → S4) opens the one screen that answers "what can this person touch?" Member detail shows their role, komiti chips with an add affordance, the per-service access derived from the service × komiti matrix, their kaitiaki designation state, and the lifecycle actions. This slice builds that detail surface reading over the `member` orchestrator (ADR 0077); the actions it exposes — suspend, remove, komiti/matrix edits, kaitiaki and operator-role changes — are wired in their own later slices. The reset link lands here (S4 → S1). When an active member has lost their credential ("I got a new phone"), the operator mints a reset link — kanidm's native reset token, branded — that is single-use, short-expiry, revocable, and audit-logged, and reuses the branded credential screen on the member's own device, fixed across a table with no email machinery. Minting is blocked while the member is suspended: un-suspend first, so suspension can never be quietly bypassed. ## Acceptance criteria - [ ] (story 16) Given I drill into a member, then I see role, komiti chips (+ add), the per-service access derived from the matrix, kaitiaki designation state, and the lifecycle actions. - [ ] (story 17) Given an active member lost their credential, when I mint a reset link, then it is single-use, short-expiry, revocable, audit-logged, and reuses the branded credential screen on their device; and given the member is suspended, then minting is blocked until un-suspend. ## Blocked by - #42 — detail drills in from the list - #64 — detail shows active, approved members ## Task manifest ```yaml task: members:member-detail-reset implements_flow: p6-members implements_edge: S1→S4, S4→S1 (reset) wireframe: docs/ux/wireframes/p6-members/p6-s4-member-detail.html interface: the `member` orchestrator (ADR 0077) — read member detail (role, komiti, matrix-derived per-service access, kaitiaki state, lifecycle actions); `idp` port mint-reset-token (single-use, short-expiry, revocable, branded), blocked while suspended seam: "`member` orchestrator seam tests (control plane, Go) \u2014 fake `idp`, in-memory reset ledger, audit sink; assert reset is single-use/revocable and refused while suspended, reset link reuses the branded credential screen" acceptance: - given: I drill into a member when: the detail opens then: I see role, komiti chips (+ add), per-service access derived from the matrix, kaitiaki designation state, and the lifecycle actions - given: an active member lost their credential when: I mint a reset link then: it is single-use, short-expiry, revocable, audit-logged, and reuses the branded credential screen on their device - given: the member is suspended when: I try to mint a reset link then: minting is blocked until un-suspend depends_on: [member-list-audit, join-approval] out_of_scope: [the suspend switch itself (suspend's), removal fates (removal-fates'), komiti CRUD and matrix (komiti-matrix-roles'), self-service reset, member self-service account page] needs_human_decision: [] ```
Author
Owner

Done in commit 63edc21 (branch sandcastle/worker/20260725-082119-bbea88), in internal/member/.

Detail read (story 16) — detail.go: MemberDetail(personID) renders the P6-S4 drill-in — role, komiti chips with the + add affordance, per-service access derived (never stored) from the config repo's service × komiti matrix joined with the member's live komiti (a new read-only AccessMatrix port + FakeAccessMatrix, ADR 0078 — the matrix's CRUD stays komiti-matrix-roles' slice), the kaitiaki designation state with its grants-no-access note, and the lifecycle actions (reset/suspend/remove) under the ALL IDENTITY ACTIONS AUDIT-LOGGED banner. Reset is disabled on the detail while suspended (mirrors the mint rule); an unknown id is ErrNoSuchMember.

Reset link (story 17) — reset.go: MintReset(actor, personID) mints kanidm's native reset token through the idp port's new MintResetToken verb, branded, wrapped in a single-use, short-expiry (ResetTTL=1h), revocable, audit-logged link + QR recorded in a new control-plane runtime ResetLedger (ADR 0078 move 3 — deliberately not the config-repo replica). OpenReset(token) returns the branded credential screen the signup face reuses (brand + passkey-recommended-never-required + password fallback) on the member's device; RedeemReset consumes it single-use; RevokeReset is the idempotent operator revoke; status derives live (open → used | expired | revoked). Minting is blocked while suspended (ErrMemberSuspended, un-suspend first), refused for non-active members and unattributed callers; mint + revoke audit-logged (ActionReset).

Evidence: 15 new seam tests (detail_test.go, reset_test.go) over a fake idp/brand/matrix + in-memory reset & member ledgers + audit sink — each acceptance clause covered. go build/go vet/gofmt/golangci-lint clean; full go test ./... green.

Out of scope (later slices): the suspend switch, removal fates, komiti/matrix/role CRUD, kaitiaki toggle, self-service reset.

Done in commit `63edc21` (branch `sandcastle/worker/20260725-082119-bbea88`), in `internal/member/`. **Detail read (story 16)** — `detail.go`: `MemberDetail(personID)` renders the P6-S4 drill-in — role, komiti chips with the `+ add` affordance, **per-service access derived (never stored) from the config repo's service × komiti matrix** joined with the member's live komiti (a new read-only `AccessMatrix` port + `FakeAccessMatrix`, ADR 0078 — the matrix's CRUD stays komiti-matrix-roles' slice), the kaitiaki designation state with its grants-no-access note, and the lifecycle actions (reset/suspend/remove) under the `ALL IDENTITY ACTIONS AUDIT-LOGGED` banner. Reset is disabled on the detail while suspended (mirrors the mint rule); an unknown id is `ErrNoSuchMember`. **Reset link (story 17)** — `reset.go`: `MintReset(actor, personID)` mints kanidm's native reset token through the `idp` port's new `MintResetToken` verb, branded, wrapped in a **single-use, short-expiry (`ResetTTL`=1h), revocable, audit-logged** link + QR recorded in a new control-plane runtime `ResetLedger` (ADR 0078 move 3 — deliberately not the config-repo replica). `OpenReset(token)` returns the **branded credential screen the signup face reuses** (brand + passkey-recommended-never-required + password fallback) on the member's device; `RedeemReset` consumes it single-use; `RevokeReset` is the idempotent operator revoke; status derives live (`open → used | expired | revoked`). **Minting is blocked while suspended** (`ErrMemberSuspended`, un-suspend first), refused for non-active members and unattributed callers; mint + revoke audit-logged (`ActionReset`). **Evidence**: 15 new seam tests (`detail_test.go`, `reset_test.go`) over a fake `idp`/`brand`/`matrix` + in-memory reset & member ledgers + audit sink — each acceptance clause covered. `go build`/`go vet`/`gofmt`/`golangci-lint` clean; full `go test ./...` green. Out of scope (later slices): the suspend switch, removal fates, komiti/matrix/role CRUD, kaitiaki toggle, self-service reset.
ben closed this issue 2026-07-25 08:33:15 +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#71
No description provided.