code: the operator is a Forgejo admin — add --group-claim-name groups --admin-group operators to the community-idp OAuth source (sign-in already OIDC) #1542
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#1542
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/code.go:253registersadmin auth add-oauth --name community-idp --provider openidConnect …with no group mapping, so an operator is an ordinary Forgejo user.Build
--group-claim-name groups --admin-group operators(Forgejo maps the claim on every login; thegroupsscope already rides kanidm tokens for Nextcloud — reuse the scope map shape). Update-in-place for existing sources (admin auth update-oauth), idempotent.forgejoclient's scope map must includegroups.admin user change-password-free toggle via APIPATCH /api/v1/admin/users/{u}admin: true|falsefor immediacy.Acceptance
code.<apex>and sees the site admin menu; a revoked operator loses it at next login.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=elitebook-distributed-server-03 run=25422
(automated multi-host claim — lowest live claim id works this ticket)
Ruled by agent under ADR 0174 — veto anytime.
The ticket asks two things of the kanidm side: (a)
--group-claim-name groups --admin-group operatorson the Forgejo OIDC source, and (b) that theforgejokanidm client's scope map includegroups.(a) is done — both the
add-oauthandupdate-oauthpaths of theforgejo-oidconeshot now carry the flags (internal/clan/code.go), pinned by a render test.(b) has no target in this repo: there is no
forgejoOAuth2 client provisioned anywhere. The "forgejo/mattermost pre-shared declarative client" the ticket's mental model assumes (aservices.kanidm.provision.systems.oauth2.forgejoblock withbasicSecretFile) is described ininternal/clan/files_idp_gateway.go:122as a pattern but is not rendered — only the gate-oidc and nextcloud clients exist. So there is no scope map to edit here; wiring the whole forgejo kanidm client is a separate gap/ticket.The ruling: deliver the operator's Forgejo-admin door via the reconciler belt the ticket itself sanctions ("the reconciler may additionally toggle via API … for immediacy"), and make the port reconciler-mapped so the #1537 fan-out actually calls it.
codesvc.Port.ReconcileRolenow PATCHes/api/v1/admin/users/{u}{admin: true|false}— reliable and immediate, and it works regardless of the unwired kanidm client. The source flags ship as the belt-and-braces claim path for when theforgejoclient is provisioned.Why two-way: render + posture + reconciler are all revertible and proved by an existing test (render test pins the flags; the reconcile test proves grant→admin / revoke→not-admin / idempotent / offboarded-never-promoted / never-signed-in no-op). No credential, security-widening, member-facing trust, data-destruction, or spend one-way door.
Follow-up: provisioning the
forgejokanidm client (with thegroupsscope) so the pure-claim path lights up; and the komiti→organisation membership sync (ApplyRoleMappingis a declared no-op).close-report for #1542 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope