files-member: the OIDC scope-map is admin-group-only, so a plain member may be refused authorization to files (regression against #514 stories 1/2) #526
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.
Dependencies
No dependencies set.
Reference
Matou/idss#526
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?
Symptom
#514 (closed) ships the files OIDC render's member-tier provisioning, but its
nextcloudOAuth2 scope-map is granted only to the files-admin group(
nextcloud_admins), not to all members. In kanidm's model an OAuth2 client'sscope-maps define which groups receive which scopes, and a person who is a
member of no scope-mapped group is refused at the authorization endpoint
(
access_denied). Founding adds only the operator tonextcloud_admins(see
NextcloudAdminGroupininternal/clan/files.go) — a plain member is neveradded — so an active plain member appears unable to complete the files sign-in at
all, before any account is provisioned.
If confirmed, this contradicts #514's own headline and stories:
Where
internal/clan/files.go,renderNextcloudOIDC— the sole scope-map line:#514 added the
groupsscope (for komiti in the token) but left the scope-mapaudience as
nextcloud_admins. Widening the token's scopes is not the sameas widening who the client authorizes.
Why it wasn't caught
The files render-seam tests assert the emitted Nix text, not live kanidm
authorization. A scope-map-audience defect only shows on a live drive — the
member-tier leg (#514 story 11) rides standing drive #523, which has not yet
run. So the unit suite is green while the live door may still refuse members.
Proposed fix
Grant the base scopes to kanidm's built-in all-persons group so any active
member authenticates and is provisioned by claim alone, keeping the admin path
untouched:
idm_all_personsholds every PERSON account and excludes service identities likeocadmin(keeping the reconciler credential out of member logins — #514 story10). WHO may authenticate stays the IdP's call (waiting/suspension refuse the
token, ADR 0074); this only widens WHAT an authenticated person receives. Only
nextcloud_adminsstill writesadmininto theocgroupsclaim, so story 4(no member admin session) holds. The member-tier leg on #523 is the live proof.
Needs human confirmation
Please confirm kanidm's scope-map semantics (a person in no scope-mapped group is
denied) before an agent acts — or point at the grant I've missed if members are
authorized some other way. Found while a duplicate run had claimed #514; the
ticket was completed and closed by another host (commit
92004d6) before this runcould land, so filing rather than reopening.
Ruled by agent under ADR 0174 — veto anytime. Confirming the semantics asked about: in kanidm an OAuth2 client authorizes through its scope maps — a person who is a member of no scope-mapped group is granted no scopes and is refused at the authorization endpoint (
access_denied). The ticket's reading is right, and the proposed fix is adopted: grant the base scopes toidm_all_persons, keepingnextcloud_adminsas the sole writer ofadminintoocgroups. Two-way door: a one-line render change, revertible; live proof = the member-tier leg riding standing drive #523. Relabelledready-for-agent.swarm-claim host=matou-dev-server-01 run=6130
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=6130
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #526 — status
success✅ close-report gates passed — every claim verified against main; closing.
envelope