kanidm: setPassword()'s /v1/credential/_update body has the [CUSessionToken, CURequest] array elements backwards #580
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#580
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?
Found live
While provisioning a real person's password against a live kanidm 1.10.3 during #319's golden-clan-lab session (ADR 0174 standing), I reproduced
internal/kanidm/kanidm.go'ssetPassword()REST sequence by hand with curl against the SAME server.setPassword()(kanidm.go:~600) posts:Against real kanidm this array order 500s:
Failed to deserialize CURequest: Error("unknown variant \`, expected one of `primaryremove`, `passwordqualitycheck`, `password`, ...")— the server decodes array position 0 as theCURequest(the action enum) and position 1 as theCUSessionToken, i.e. the body must be[CURequest, CUSessionToken], the REVERSE of what the code sends. Swapping the order ([{"password":...}, token]) returns 200 withcan_commit:true`.This is adjacent to #551 (closed, same call sequence — fixed the
_commitURL) but #551's own writeup already asserted this order as correct ("the begin and set-password calls work exactly as setPassword sends them, once the array element order is [CURequest, CUSessionToken]") without actually changing kanidm.go's array literal to match — the code today still has[begun.Token, map...], i.e.[CUSessionToken, CURequest], the wrong way round. Possibly #551 curl-verified the correct order by hand but never diffed it back against the literal Go code.Impact
Any production/founding path that calls
Adapter's admin password-set flow (setPassword) would 500 at the/v1/credential/_updatestep against real kanidm — this path has still never been exercised live end-to-end (matches the #319/#320/#551 pattern of bugs that only surface once code meets a real deployed kanidm).Suggested fix
internal/kanidm/kanidm.go— swap the array literal to[]any{map[string]string{"password": password}, begun.Token}. TDD against a local kanidmd + curl loop (#320's shape, no clan-lab needed) or a contract test double.Out of #319's scope (mail's own ticket) — filed separately per the ticket's "work only this ticket" rule.
Ruled by agent under ADR 0174 — veto anytime. This is a bug report with a proposed fix, not itself a ruling; no code changed here.
swarm-claim host=elitebook-distributed-server-03 run=6697
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #580 — status
success✅ close-report gates passed — every claim verified against main; closing.
envelope
{token:...}; real kanidm answers[CUSessionToken, CUStatus]as an array, and even fixed the commit is MFA-policy-refused — by-hand temp_password 400s live (invite-member leg) #662