kanidm: internal/kanidm's setPassword() posts to the wrong credential-commit route (/v1/credential/_update_commit vs real /v1/credential/_commit) #551
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#551
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 driving #319's golden-clan-lab smoke-mail session (ADR 0174 standing), I needed
internal/kanidm.Adapter's admin credential-set path (setPassword,internal/kanidm/kanidm.go:590) to give a lab person a primary password, and reproduced its exact REST call sequence by hand against a real kanidm 1.10.3 (the same pinned version this repo targets).The begin (
GET /v1/person/<id>/_credential/_update) and set-password (POST /v1/credential/_update) calls work exactly assetPasswordsends them (once the array element order is[CURequest, CUSessionToken]-- confirmed by the server's own deserialization error messages naming which position was expected).The COMMIT call is wrong:
setPasswordposts toPOST /v1/credential/_update_commit, which returns kanidm's own404 Route not found(not a generic web-server 404 -- kanidm's router genuinely has no such route). The real route, confirmed by grepping the installedkanidmCLI binary forcredential/_updateliterals (grep -a -o '/v1/credential[a-zA-Z0-9_/]*' <kanidm-binary>), isPOST /v1/credential/_commit. Once pointed at the right path (same body shape, the rawCUSessionTokenobject, not array-wrapped), the commit succeeds (200, credential live, login works).Impact
Any production/founding code path that calls
internal/kanidm.Adapter's admin password-set flow would currently fail at the commit step against a real kanidm 1.10.3 -- this looks like it has never been exercised against real kanidm before (matches the #319 pattern: several real bugs this cycle were found only once code met a REAL deployed service for the first time).Suggested fix
internal/kanidm/kanidm.go:608-- change the path from/v1/credential/_update_committo/v1/credential/_commit. Should be TDD-able against a small local double or, ideally, verified once against a real kanidm the way this finding was (a local kanidmd + curl loop, no clan-lab needed -- same shape as spike #320).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.
Verification: Confirmed live in the codebase — the admin credential-set flow's commit step posts to
/v1/credential/_update_commit, a route the reporter confirmed (via the installed kanidm 1.10.3 binary and live REST probing) does not exist on real kanidm. The begin and set-password calls in the same flow are correct; only the commit call's path is wrong.Agent Brief
Category: bug
Summary: The admin password-set flow's commit call posts to a kanidm route that doesn't exist on real kanidm 1.10.3, so the flow fails at the final step every time it's exercised against a real server.
Current behavior:
The kanidm adapter's admin password-set flow issues three REST calls in sequence: a begin call (GET the update-session token), a set-password call (POST the new password), and a commit call. The begin and set-password calls work correctly against real kanidm. The commit call posts to
/v1/credential/_update_commit, which kanidm's router does not recognize — it returns kanidm's own genuine404 Route not found, not a generic web-server 404. Any caller of this flow currently fails at the commit step against a real kanidm server.Desired behavior:
The commit call posts to the correct route,
/v1/credential/_commit, with the same body shape already in use (the rawCUSessionTokenobject, not array-wrapped). The full begin → set-password → commit sequence succeeds end-to-end against real kanidm: the credential is live and the account can log in with the new password.Key interfaces:
setPasswordflow — only the commit call's route changes; the request/response handling around it is otherwise correct.Acceptance criteria:
/v1/credential/_commit, not/v1/credential/_update_commit.go build/vet/testand golangci-lint stay green.Out of scope:
swarm-claim host=elitebook-distributed-server-03 run=6523
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #551 — 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