chat: the operator is a Mattermost system admin — the reconciler runs mmctl --local roles system-admin <user> for operators and roles member on revoke (sign-in already OIDC; Team Edition has no claim-to-role mapping) #1543
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
2 participants
Notifications
Due date
No due date set.
Blocks
Depends on
Reference
Matou/idss#1543
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?
Spec
#1535 — Ben's ruling (2026-09-16): adding a member in the control panel grants them access to every member service the control panel deployed; adding a member as an operator gives them admin access to all services. One community sign-in, every door, no second login, no hidden per-app credential.
internal/clan/chat.go:308-309grantssystem_adminto the SERVICE identity only. Team Edition's OIDC (GitLab-shaped) carries no admin role mapping, so the mapping is the reconciler's, over the local-mode socket the port already uses (chat.go:71).Build
ReconcileRole:mmctl --local roles system-admin <username>for operators,mmctl --local roles member <username>on revoke; the username is the person id (the OIDC username claim the port links). A person who has never signed in has no Mattermost account yet — record "applies at first sign-in" and re-run from the first-login observer (authgate.go:68 FirstLoginObserver) or the next reconcile.Acceptance
Security invariant (every header-trusting port, #1167): a port that trusts
X-Idss-Identitylandsheader_up -X-Idss-Identityon its client-protocol exempt paths in the SAME commit (the gated handle overwrites the header from the gate's answer; the exempt handle has no such vouch —internal/clan/frontdoor.go:684is the strip,renderProxy(..., exempt=true)). A port that speaks real OIDC needs no strip but MUST keep its claim/scope maps on the patternfiles.go:822-946sets: audienceidm_all_persons(every person signs in), the admin bit keyed to ONE kanidm group via a collision-proof claim.Also
Declare the port's posture and implement its
ReconcileRolefrom the reconciler ticket #1537; the P6-S7/P4-S5 card line reads from it.swarm-claim host=bens-mac-04 run=25422
(automated multi-host claim — lowest live claim id works this ticket)
Ruled by agent under ADR 0174 — veto anytime.
The ticket specifies
mmctl --local roles system-admin <user>"over the local-mode socket the port already uses (chat.go:71)". The chat port (internal/chatsvc) does NOT use that socket — it is a control-plane REST client authenticated as the admin service identity;chatLocalSocket(chat.go:71) belongs to the clan render's on-node oneshots, which the control plane cannot reach. Sommctl --localis not implementable from the port.Ruling: implement
ReconcileRoleover the Mattermost REST roles endpoint —PUT /api/v4/users/{id}/roleswithsystem_user system_admin(operator) /system_user(member) — which is exactly the callmmctl roles system-adminmakes under the hood, authenticated as the admin identity (itself system_admin → holdsmanage_roles). Reads current roles first and only PUTs on divergence (idempotent); a never-signed-in person (no auto-provisioned account yet) is a truthful no-op, the role applying at first sign-in.Why two-way: revertible by a later commit (e.g. to shell mmctl from an on-node oneshot instead), and proved by the reconcile test (
TestPort_ReconcileRolePromotesOperatorAndRevokes: grant→system_admin, revoke→system_user, idempotent, never-signed-in no-op) — not on the one-way-door list (no personal credential, no security-posture widening, no member-facing trust accept, no data destruction, no spend).Also ruled (scope): the port declares the komiti construct
team(ADR 0076 "Chat: team") butApplyRoleMappingstays a truthful no-op — Team Edition carries no group-to-team membership sync. Tracked as follow-up #1550; this ticket ships only the operator→system_admin role reconciler it asks for.close-report for #1543 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope