members: suspend — one switch, instant at the front door, honest two speeds #75

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

Parent

Feature spec: #19 (members).

What to build

Suspend is one switch on member detail (P6-S4 → S1) that pauses a member everywhere, and it bites instantly at the community's front door regardless of app-session luck (ADR 0074). Flipping it runs three moves: the IdP disables the account, the gateway's auth gate denies the member's very next browser request to any service, and the reconciler disables their non-OIDC (client-protocol) app credentials within minutes. The copy is honest about the two speeds — "paused at the community's front door immediately; background app access (sync clients) within minutes" — and never claims instant for the client-protocol tail. Un-suspend is the same switch back: the three moves reverse (IdP enable, gate allow, credentials re-enabled) and the member returns to active, so a pause is genuinely reversible.

The auth gate is the control plane's OIDC client holding the community SSO session; suspend's fast path writes through the gate-state deny projection. All three moves and the reversal are audit-logged (ADR 0027).

Notes: suspending a member who holds a recovery share surfaces the share-holder warning (ADR 0015) — advice, never veto. That warning reads rescue's holder state at runtime and only renders when shares exist; it is a runtime read, not a build edge, and its wiring rides with the removal-fates slice's warning treatment.

Acceptance criteria

  • (story 18) Given an active member with live app sessions, when I suspend them, then the IdP disables the account, the gateway's auth gate denies their very next browser request to any service, and the reconciler disables their non-OIDC app credentials within minutes.
  • (story 19) Given the suspend control, then its copy reads "paused at the community's front door immediately; background app access (sync clients) within minutes" — never claiming instant for the client-protocol tail.
  • (story 20) Given a suspended member, when I un-suspend, then the three moves reverse (IdP enable, gate allow, credentials re-enabled) and the member returns to active.

Blocked by

  • #71 — suspend is an action on member detail

Task manifest

task: members:suspend
implements_flow: p6-members
implements_edge: S4→S1 (suspend)
wireframe: docs/ux/wireframes/p6-members/p6-s4-member-detail.html
interface: the `member` orchestrator (ADR 0077) suspend/un-suspend — `idp` disable/enable + auth-gate deny/allow (write-through gate-state projection) + reconciler disable-credentials port verb; honest two-speed copy
seam: "`member` orchestrator seam tests (control plane, Go) \u2014 fake `idp`, fake catalogue-port disable-credentials verb, gate-state; assert next-request deny given session identity + deny-list, un-suspend reverses all three moves, reversible \u21c4 active"
acceptance:
  - given: an active member with live app sessions
    when: I suspend them
    then: the IdP disables the account, the auth gate denies their very next browser request to any service, and the reconciler disables their non-OIDC app credentials within minutes
  - given: the suspend control
    when: it renders
    then: its copy states "front door immediately; background app access within minutes" and never claims instant for the client-protocol tail
  - given: a suspended member
    when: I un-suspend
    then: the three moves reverse (IdP enable, gate allow, credentials re-enabled) and the member returns to active
depends_on: [member-detail-reset]
out_of_scope: [removal and per-service fates (removal-fates'), the matrix decision function (komiti-matrix-roles'), Caddy forward_auth wiring itself (not unit-tested here), the share-holder warning wiring (removal-fates')]
needs_human_decision: []
## Parent Feature spec: #19 (members). ## What to build Suspend is one switch on member detail (P6-S4 → S1) that pauses a member everywhere, and it bites instantly at the community's front door regardless of app-session luck (ADR 0074). Flipping it runs three moves: the IdP disables the account, the gateway's auth gate denies the member's very next browser request to any service, and the reconciler disables their non-OIDC (client-protocol) app credentials within minutes. The copy is honest about the two speeds — "paused at the community's front door immediately; background app access (sync clients) within minutes" — and never claims instant for the client-protocol tail. Un-suspend is the same switch back: the three moves reverse (IdP enable, gate allow, credentials re-enabled) and the member returns to active, so a pause is genuinely reversible. The auth gate is the control plane's OIDC client holding the community SSO session; suspend's fast path writes through the gate-state deny projection. All three moves and the reversal are audit-logged (ADR 0027). Notes: suspending a member who holds a recovery share surfaces the share-holder warning (ADR 0015) — advice, never veto. That warning reads rescue's holder state at runtime and only renders when shares exist; it is a runtime read, not a build edge, and its wiring rides with the removal-fates slice's warning treatment. ## Acceptance criteria - [ ] (story 18) Given an active member with live app sessions, when I suspend them, then the IdP disables the account, the gateway's auth gate denies their very next browser request to any service, and the reconciler disables their non-OIDC app credentials within minutes. - [ ] (story 19) Given the suspend control, then its copy reads "paused at the community's front door immediately; background app access (sync clients) within minutes" — never claiming instant for the client-protocol tail. - [ ] (story 20) Given a suspended member, when I un-suspend, then the three moves reverse (IdP enable, gate allow, credentials re-enabled) and the member returns to active. ## Blocked by - #71 — suspend is an action on member detail ## Task manifest ```yaml task: members:suspend implements_flow: p6-members implements_edge: S4→S1 (suspend) wireframe: docs/ux/wireframes/p6-members/p6-s4-member-detail.html interface: the `member` orchestrator (ADR 0077) suspend/un-suspend — `idp` disable/enable + auth-gate deny/allow (write-through gate-state projection) + reconciler disable-credentials port verb; honest two-speed copy seam: "`member` orchestrator seam tests (control plane, Go) \u2014 fake `idp`, fake catalogue-port disable-credentials verb, gate-state; assert next-request deny given session identity + deny-list, un-suspend reverses all three moves, reversible \u21c4 active" acceptance: - given: an active member with live app sessions when: I suspend them then: the IdP disables the account, the auth gate denies their very next browser request to any service, and the reconciler disables their non-OIDC app credentials within minutes - given: the suspend control when: it renders then: its copy states "front door immediately; background app access within minutes" and never claims instant for the client-protocol tail - given: a suspended member when: I un-suspend then: the three moves reverse (IdP enable, gate allow, credentials re-enabled) and the member returns to active depends_on: [member-detail-reset] out_of_scope: [removal and per-service fates (removal-fates'), the matrix decision function (komiti-matrix-roles'), Caddy forward_auth wiring itself (not unit-tested here), the share-holder warning wiring (removal-fates')] needs_human_decision: [] ```
Author
Owner

Done in commit 2b8cd37 (internal/member/suspend.go + suspend_test.go).

The member orchestrator's suspend/un-suspend face (ADR 0074) — one switch, three moves, honest two speeds, reversible:

  • Suspend(actor, personID) (stories 18/19): runs the three moves behind one switch — idp.DisableAccount (no new logins/token refresh) → the new AuthGate.Deny write-through deny projection (the member's very next browser request to any service is denied fleet-wide, asserted via the NextRequestDenied(sessionIdentity) seam hook modelling the gateway forward_auth check) → the new Reconciler.DisableCredentials catalogue-port verb (the non-OIDC client-protocol tail, within minutes) — then marks the member suspended and audit-logs it (ActionSuspend).
  • Unsuspend(actor, personID) (story 20): the same switch back — IdP enable + gate allow + credentials re-enabled → active, audited (ActionUnsuspend). A pause is genuinely reversible (⇄ active).
  • Honest two-speed copy SuspendCopy on the detail control (story 19): "paused at the community's front door immediately; background app access (sync clients) within minutes" — never claims instant for the client-protocol tail. The control is a live active↔suspended toggle (Suspend when active, Un-suspend when suspended).
  • Both verbs attributed (unattributed refused, touching nothing), idempotent (no second audit), refused off-toggle (ErrCannotSuspend/ErrNotSuspended) and for unknown members (ErrNoSuchMember). The idp port grew DisableAccount (disable-not-remove, so suspension is reversible).

Evidence: 10 new seam tests over a fake idp/auth-gate/reconciler + in-memory member ledger + audit sink; go test/go vet/gofmt/golangci-lint clean across the module.

Out of scope (untouched): removal & per-service fates, the matrix decision function, Caddy forward_auth wiring itself, the share-holder warning wiring — their own later slices.

Done in commit `2b8cd37` (`internal/member/suspend.go` + `suspend_test.go`). The `member` orchestrator's suspend/un-suspend face (ADR 0074) — one switch, three moves, honest two speeds, reversible: - **`Suspend(actor, personID)`** (stories 18/19): runs the three moves behind one switch — `idp.DisableAccount` (no new logins/token refresh) → the new `AuthGate.Deny` **write-through deny projection** (the member's very next browser request to any service is denied fleet-wide, asserted via the `NextRequestDenied(sessionIdentity)` seam hook modelling the gateway forward_auth check) → the new `Reconciler.DisableCredentials` catalogue-port verb (the non-OIDC client-protocol tail, within minutes) — then marks the member suspended and audit-logs it (`ActionSuspend`). - **`Unsuspend(actor, personID)`** (story 20): the same switch back — IdP enable + gate allow + credentials re-enabled → active, audited (`ActionUnsuspend`). A pause is genuinely reversible (⇄ active). - **Honest two-speed copy** `SuspendCopy` on the detail control (story 19): "paused at the community's front door immediately; background app access (sync clients) within minutes" — never claims instant for the client-protocol tail. The control is a live active↔suspended toggle (Suspend when active, Un-suspend when suspended). - Both verbs attributed (unattributed refused, touching nothing), idempotent (no second audit), refused off-toggle (`ErrCannotSuspend`/`ErrNotSuspended`) and for unknown members (`ErrNoSuchMember`). The `idp` port grew `DisableAccount` (disable-not-remove, so suspension is reversible). Evidence: 10 new seam tests over a fake `idp`/auth-gate/reconciler + in-memory member ledger + audit sink; `go test`/`go vet`/`gofmt`/`golangci-lint` clean across the module. Out of scope (untouched): removal & per-service fates, the matrix decision function, Caddy forward_auth wiring itself, the share-holder warning wiring — their own later slices.
ben closed this issue 2026-07-25 08:43:01 +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#75
No description provided.