invite-member: suspend addresses Nextcloud by bare person id, user_oidc JIT'd the SPN #866
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
Reference
Matou/idss#866
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?
Failure
invite-memberis the run's only red (artifacts/verdict.json:"firstRedLeg": "invite-member", 24 green / 1 red / 1 skip). This is not the known frontier — the frontier rows skip with the own-VPS carrier reason (backup-honest-floor, andalert-email/rescue-rungin the leg table), whereasinvite-memberisreachable: () => trueand actually ran.Suspend move 3 (the Nextcloud reconciler) fails:
That message is literally true and badly misleading. There is no Nextcloud user
e2e-member. There is one callede2e-member@id.rehearsal-b.idss.nz, and it was created six seconds before the suspend. The control plane looked up the wrong id.Evidence — the live droplet (134.199.165.229, still up)
ssh was accepted;
systemctl --failedis empty and every service is listening. The Nextcloud user list:The account exists, is enabled, carries the right display name and the
e2e-crewkomiti. Timing puts it inside the drive, before the suspend:and the suspend itself is in the journal at 02:46:51 — move 1 succeeded against kanidm using the bare id (
logs/droplet-journal.txt, 02:46:51):So the same
personIDis valid on kanidm and invalid on Nextcloud. That is the whole bug.The chain, in repo terms
internal/clan/files.go:720-721(and the droplet twin ininternal/clan/files_idp_gateway.go) provisions user_oidc with the claim used verbatim as the Nextcloud uid:nextcloudoauth2 client is created imperatively (files_idp_gateway.go:183-206,files.go:650-693) and never gets the short-username toggle, so kanidm emitspreferred_usernameas the SPNname@domain. The gate client does set it —internal/clan/vmguest.go:1212:preferShortUsername = true;(STATUS.md:2137 documents it as part of the gate-oidc client). The files client drifted from that convention.e2e-member@id.rehearsal-b.idss.nz(proven above).internal/member/byhand.go:85:PersonID: spec.Username,— andinternal/member/suspend.go:194passes it straight through:return o.reconciler.DisableCredentials(personID).internal/nextcloud/nextcloud.go:264GETs/ocs/v1.php/cloud/users/e2e-member→ OCS 404.Secondary defect — and a false-green trap
internal/nextcloud/nextcloud.go:351tolerates only the historical missing-user code:Nextcloud 32.0.11 answers
statuscode: 404in the OCS envelope, so the deliberate "no account here — nothing to reconcile" path atnextcloud.go:239never fired and a miss became a hard 400.Widening 998→404 alone is the wrong fix and must not be shipped by itself. A rehearsal healer already did exactly that in a side worktree (
logs/healer-claude.out, commit16182abe). Because the member does have a Nextcloud account, that patch converts this red into a silent green: suspend would skip Nextcloud for a member who is still fully enabled there, quietly breaking ADR 0074's one-switch promise while the drive reports success.That healer's residual note also claims "the Circles app kills user_oidc JIT provisioning, so no member ever gets a Nextcloud account" — the live box refutes that. The
OCA\Circles\...\RequestNetworkExceptionatlogs/droplet-journal.txt02:46:29 / 02:46:44 is real, but its trace enters fromGroupMemberAddedafterGroup::addUsercommitted; the user row, display name ande2e-crewmembership all persisted (seeuser:infoabove,lastseen02:46:45).What the Circles exception does break is the member's HTTP response: it escapes to
index.php, soLoginController::provisionUsernever returns a session and the browser gets a 500 page. The sign-in leg still passed, so its landing assertion is too loose to notice. Real, worth its own ticket, but not the cause of this red.Suspected layer
Product / deployment, in the identity-mapping seam between the kanidm oauth2 client render and the control plane's service ports. Not harness, not infra — the harness reported the failure accurately and the box is healthy.
What plugging it needs
kanidm system oauth2 prefer-short-username <client>, the CLI counterpart ofpreferShortUsername = true) to the nextcloud client oneshot in bothinternal/clan/files_idp_gateway.goandinternal/clan/files.go, with afiles_test.gocase pinning the emitted line so the two paths cannot drift again. Alternative if bare uids are unwanted: give the service ports an explicit person-id→service-id mapping instead of passingPersonIDthrough raw. The first matches the existing convention (internal/kanidm/auth.go:236-242already strips@domainfrom SPNs) and is the cheaper ruling.name@domainrows. Fine on a fresh drive, needs a rename step for a live community.preferred_usernameis the SPN unless the client opts into short usernames, and any service keyed off that claim will disagree with the control plane's bare person id.Absent evidence (all expected for a droplet target)
artifacts/journey.jsonis{"rows": null, "fault": null}— founding rows were never captured.logs/guest-*.logare stubs ("the guest was never created, so there is nothing to ask") andlogs/qemu.logisspawn qemu-system-x86_64 ENOENT, matchinghost.json's"qemu": "exit ENOENT". These are the VM-target collectors idling on a droplet run, not faults.drive
20260826T023458Zred atinvite-member:POST /api/v1/members/e2e-member/suspend failed: 400 {"code":"act_failed","message":"nextcloud: read user \"e2e-member\" failed: OCS 404 User does not exist"}evidence:
/home/dev/swarm/Matou/idss/test-results/drive-droplet/20260826T023458Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedswarm-claim host=elitebook-distributed-server-03 run=10107
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #866 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope