komiti: backfill the files ocgroups claim-map on deploy for komiti created before files (the #1406 silent half) #1409
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#1409
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?
What
Follow-up from #1406/#1407. Those tickets fixed the loud half — creating a komiti before files is co-hosted no longer 400s (the runtime claim-map write now reads a 404 as "files not deployed, nothing to map"), and the non-atomic-create retry hole is closed (the claim-map is reconciled on every
CreateKomiti, not only on first create). See commit(s) on #1406.This is the remaining silent half: a komiti created before files is deployed lands with no ocgroups claim-map entry. When files is later co-hosted, nothing writes those entries, so members of a pre-deploy komiti do not reach Nextcloud as a group (basic files access via the all-persons scope is unaffected; group-scoped behaviour is).
Where it belongs
The reconcile-on-deploy point is the files render's
nextcloud-oidconeshot (internal/clan/files.go,renderNextcloudOIDC) — the same oneshot that already writes the files-admin ->adminocgroups claim-map (create-or-update, idempotent, runs on every deploy). It should, after creating the OAuth2 client, backfill an ocgroups claim-map for every existingkomiti_*group, mapping each to its bare name — exactly whatmember.FilesKomitiClaimMapPort.AddFilesKomitiClaimMapwrites at runtime.Why it was NOT shipped with #1406
It is deploy-critical shell against a real kanidm CLI (
kanidm group listoutput shape / JSON support in the pinned version) that I could not live-prove in the sandcastle sandbox. Shipping unproven parsing into the&&-chained oneshot risks reding every files deploy — a far worse regression than the silent gap. This needs aclan-labspike to prove the enumeration + backfill against real kanidm before it lands.Note also: the existing safety test
TestRenderFiles_OIDCProvisionsMemberByClaimAloneassertsstrings.Count(out, "update-claim-map nextcloud ocgroups ") == 1. The backfill adds more ocgroups claim-map writes (to non-admin values), so that test must be tightened to its true intent — exactly ONE map to theadminvalue (the files-admin group), any number to komiti's own bare names.Acceptance
deploy-filesevery such komiti has its ocgroups claim-map entry (proven on a live box or the droplet drive).adminvalue.Found while fixing #1406 (rehearsal-183, drive
20260912T034016Z, legportal-s1e).swarm-claim host=matou-dev-server-01 run=22235
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=22235
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=bens-mac-04 run=22240
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=bens-mac-04 run=22240
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=bens-mac-04 run=22240
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=matou-dev-server-01 run=22249
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=matou-dev-server-01 run=22262
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=matou-dev-server-01 run=22297
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=matou-dev-server-01 run=22305
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=matou-dev-server-01 run=22305
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=bens-mac-04 run=22323
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=8ab5a5d16aad run=22323
(sandcastle agent claim)
close-report for #1409 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope