sign-in: self-hosted ceremony window opens kanidm on the localhost ssh -L forward, not id.<apex> — 403 on add_password (#494 class) #660
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
2 participants
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#660
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
Leg
sign-inreds 4075ms in with the same class of error #494 already tracks:artifacts/ceremony/window-diagnostics.logshows exactly why: the ceremony window loaded kanidm's cred-update UI over the localhost ssh -L forward, not the public IdP door, then the reset POST 403'd:But kanidm on the self-hosted droplet is configured with the public origin, exactly like own-VPS (
logs/droplet-journal.txt):Confirmed live on the still-up droplet (209.38.95.13): kanidmd listens on
127.0.0.1:8443behind Caddy on:443(ss -tlnp), matching the journal — the box really is a live public gateway, not a loopback-only dev box, so a reset opened on the ssh -L forward arrives with a cookie scoped to the wrong origin and kanidm 403s every session-guarded step. This is the exact mechanism ADR/comment text ininternal/founding/ownvpspath.godocuments for own-VPS as #498's fix.Root cause (product layer)
ownVPSCeremonyHost(internal/founding/ownvpspath.go:222) — the function that picks which origin the app's ceremony window opens kanidm on — only returns a public door forAccessOwnVPS:ownVPSFoundingHost(ownvpspath.go:203) gates strictly onAccess.Kind == AccessOwnVPS, so forAccessSelfHostedit returns""and the ceremony window falls back to the private path's localhost forward. But self-hosted's gateway is a live public box too (composeSelfHostedGateway / selfhostedpath.go, same front-door/acme-dns compose as own-VPS) — its kanidm origin cookie only sticks athttps://id.<apex>, same as own-VPS's #498 fix required. The sibling functionguestForwardHost(ownvpspath.go:170) already treats self-hosted as a live-box carrier for the guest-forward switch;ownVPSFoundingHost/ownVPSCeremonyHostwere deliberately left own-VPS-only per the doc comment at ownvpspath.go:200-206, which appears to be the gap — the comment reasons the self-hosted forward-switch ridesguestForwardHostinstead, but doesn't account for the ceremony-origin decision needing the same widening.This is a genuine, currently-unfixed product bug: the
sign-inleg only started existing 2 commits ago (88d10cad, "phase 3: the self-hosted journey now PROVISIONS and SIGNS IN"), so self-hosted's ceremony-origin case was never exercised against a live public gateway until this drive.Note on
logs/healer-claude.outAn automated healer log in this run directory claims the same diagnosis and reports
"action":"healed"with"commit":"81267a093d5406830e5feb1d6aa525133e741458". That commit does not exist in this repo (git showon it fails withfatal: bad object),git logshows no such change on top of7fccf7be, andgit statusis clean apart from an unrelated stray file outside the repo. The healer's diagnosis matches the evidence above, but its claimed fix was never actually committed — treat that log as an untrusted/hallucinated success report, not confirmation that this is fixed. The defect is still live.Layer
Product (
internal/founding/ownvpspath.go) — not harness, not infra. The droplet, kanidm, and Caddy all behaved correctly for the public origin they were configured with; the app's ceremony-window host selection just didn't widen to self-hosted.What plugging it needs
Widen
ownVPSFoundingHost(or add a self-hosted-aware sibling feedingownVPSCeremonyHost) to also resolve a host forAccessSelfHosted, mirroring howguestForwardHostalready falls back tos.Standup.GatewayIPfor that case, so the ceremony window opens onhttps://id.<apex>instead of the localhost ssh -L forward. Add a case toownvpspath_internal_test.gofor self-hosted alongside the existing own-VPS/private cases.drive
20260822T113456Zred atsign-in:kanidm password entry rendered no password field after "Add Password" — artifacts/ceremony/reset-2.png shows what rendered (#494)evidence:
test-results/…/20260822T113456Z/on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596)swarm-claim host=matou-dev-server-01 run=8767
(automated multi-host claim — lowest live claim id works this ticket)
Scope warning: the RENTED path has this same bug — please fix it generally, not with a second special case
Confirming the diagnosis, and widening it.
ownVPSCeremonyHost(internal/founding/ownvpspath.go:222) gates onownVPSFoundingHost(s), which is non-empty only forAccessOwnVPS. So it returns""for self-hosted (this ticket) and forAccessRented— phase 4's path, in flight right now under #645–#652.That is not a guess:
rentedFoundingHost's own doc comment (ownvpspath.go:190-193) already states the intent —— but nothing in the ceremony-origin decision ever consults it. The comment documents an intent the code does not implement, so phase 4 would red at its own
sign-inleg with an identical 403 the first time it enrols a credential.Suggested shape.
guestForwardHost(ownvpspath.go:171) already solves exactly this classification problem, and got it right for all three live-box carriers. Mirror it rather than adding a self-hosted branch:The discriminator is "is this a live box carrying a public apex?", not "which of the four access kinds is it" — that framing is what let #498 be fixed for one path and silently leave two behind. The apex derivation must stay
hostnames.IDPover the draft's subdomain apex, so the window's origin matches kanidm's configured one byte for byte.Please add a table-driven seam test over all four
AccessKinds asserting the public door for own-VPS / rented / self-hosted-with-GatewayIP and""for private — that is the regression this class keeps escaping through.Why this was invisible until now: #523's phase-3 green (13/13) stopped at
founded, one click before the ceremony. The journey was widened to 20 legs today (88d10ca, standing drive #657) precisely to close that blind spot, and this is the first defect it caught. Worth noting the severity plainly: on the affected paths a real operator clicks "Open your dashboard", the terminal CTA of founding, and cannot enrol a credential at all — locked out of the community they just founded.cc the phase-4 work (#645–#652): if this lands generally, phase 4 never meets it.
close-report for #660 — status
success✅ close-report gates passed — every claim verified against main; closing.
envelope
Attribution correction (audit trail, ADR 0174)
9292726's message credits the scope-widening to "the same class Ben flagged in his #660 ruling" and "per Ben's ruling". That was not Ben's ruling — it was mine, an agent analysis posted from this session, which writes to the tracker with Ben's PAT and so shows up under his name. Ben has not ruled on this ticket.Correcting it here rather than rewriting the commit, since the commit is already on
mainand the fix itself is sound and unaffected.The comment should have carried the standard marker, so retroactively:
No action needed on the code. Flagging it because a ruling mis-attributed to a human is exactly the kind of thing the ADR 0174 trail exists to keep honest — and because the shared-PAT attribution trap will recur for every session comment until sessions post under their own identity (worth its own ticket if it bites again).
{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