members: komiti-matrix-roles — komiti CRUD, the access matrix, kaitiaki + operator role #76
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
Reference
Matou/idss#76
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Feature spec: #19 (members).
What to build
This slice gives komiti teeth and completes the role/designation surface. From the Members tab the operator creates, renames, and deletes komiti (P6-S1 → S7); deleting one closes its doors and mappings and touches no member account, and the operator role and kaitiaki designation never appear among komiti. On komiti detail the operator sets the service × komiti matrix (ADR 0076): each service is open to all members by default or restricted to named komiti. Restriction bites at the gateway's auth gate — a member outside a restricted komiti has their browser request to that service denied and never reaches the app at all — and a matrix change enforces on each affected member's next request, not on a deploy.
Per-app role mapping follows what each catalogue port declares: where a port declares claim-native groups, komiti ride the OIDC token as app groups; where it declares a reconciler-mapped construct (team, org, group folder), the reconciler applies the mapping and komiti detail shows it; where it declares neither, komiti detail says "front door only" for that service, honestly. The matrix and role mappings live in the config repo (the clan Config hatch, carried by the Tier-1 replica), so they are policy the community owns.
On member detail (S7 → S1, and P6-S4) the operator designates a kaitiaki — a designation, not a role, granting no access, stored as the hidden kanidm kaitiaki group, shown as a badge in the list and read by rescue from the IdP — and grants or revokes the operator role. Granting operator is a deliberate act: audit-logged, never flowing from any invite; revoking it leaves the member an active member.
Notes: the operator-role grant invokes rescue's key mint (ADR 0089) — an operator gets a standing operator key — which is why this slice depends on rescue's operator-key-ledger (Ben-confirmed 2026-07-25).
Acceptance criteria
Blocked by
Task manifest
clanpackage + fake adapter behind DDR 0010Done in commit
af56999(branch sandcastle/worker/20260725-113503-6f3f7b).Built the
memberorchestrator's komiti / access-matrix / role-designation surface (ADRs 0076/0077/0078/0089) at the single member seam —internal/member/komiti.go+roles.go, with 8 new seam tests inkomiti_test.go(go build/go test ./internal/member//go vet/gofmtclean).Acceptance coverage:
CreateKomiti/RenameKomiti/DeleteKomiti(kanidm groups via theidpport), all audit-logged; delete closes doors (drops the komiti from every restricted policy) and touches no member account (strips group membership only); the operator role + kaitiaki are reserved names, refused and never among komiti. TestsTestDeleteKomiti_ClosesDoorsTouchesNoAccount,TestKomiti_OperatorAndKaitiakiNeverAmongKomiti.GateDecision(sessionIdentity, service)reads deny-projection + matrix + live komiti; a restricted service denies an outsider (never reaches the app), the default is open to all, a suspended member is denied everywhere, an operator is never locked out, and a matrix change bites on the next request (read live, not on a deploy). Matrix writes viaRestrictService/OpenService(newAccessMatrix.SetPolicy, config repo). TestsTestGateDecision_RestrictedDeniesOutsiderDefaultOpen,TestGateDecision_DenyListAndOperatorBypass,TestGateDecision_MatrixChangeBitesOnNextRequest.Catalogue.RoleMapping/ApplyRoleMapping): claim-native ride the OIDC claim, reconciler-mapped applied by the reconciler and shown onKomitiDetail, neither reads "front door only" honestly. TestTestKomitiDetail_PortDeclaredRoleMappings.Designatewrites the hidden kanidmkaitiakigroup (newidp.SetKaitiaki/IsKaitiaki— rescue reads it from the IdP), grants no access, mirrors the list badge. TestTestDesignate_KaitiakiIsHiddenGroupGrantsNoAccessBadgeInList.GrantOperator/RevokeOperator: a deliberate audit-logged act, never from an invite (active members only), invoking rescue's key mint (newRescue.GrantOperatorKey/RevokeOperatorKey, ADR 0089); revoke leaves the member active. TestTestGrantOperator_AuditedMintsKeyNeverFromInvite.No production adapters implement these ports yet (the durable config-repo matrix writer, the real catalogue role-mapping verbs, and rescue's wiring are later slices); only the seam fakes. STATUS.md updated in the same commit.
idss-rental-expires-tag on a LIVE rental once the broker actually deploys (#741's broker half is merged but not installed) #745idss-rental-expires-tag on a LIVE rental once the broker actually deploys (#741's broker half is merged but not installed) #745