operator-session: /authz/signin serves signin_idp — kanidm has no gate-oidc OAuth2 client #1239
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.
Reference
Matou/idss#1239
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?
Drive
20260905T190829Z(private path, targetarchive) went 1/2:founding-prefixgreen (711s),operator-sessionred (60s).artifacts/verdict.jsonrecords"firstRedLeg": "operator-session","skip": 0, commit35d7cc91.This is not the KNOWN frontier. The named frontier is pairing-never-flips (the own-VPS carrier issue), which this drive's
legs.jsonwould carry as a skip reason — there are no skip reasons inlegs.jsonat all, and no skipped legs. Founding went green and the drive reached the admin door for the first time on this path, so35d7cc91's apex-name→:443-forward mapping held. What it found at the door is new.The failure
artifacts/legs.json(and identicallyartifacts/journey.json'sfault), legoperator-session:The same record shows the door itself answered:
"door": {"url": "https://admin.e2e-drive.idss.internal:45983/", "status": 302}. So the front door redirected to the gate correctly; the gate is what failed.Evidence chain (three logs, same second, 19:21:48)
logs/guest-control-plane.log:144— the gate's own account:logs/guest-kanidm.log:197-200— the matching server-side record:The IdP is otherwise healthy, so this is not "kanidm down". The same log shows the operator's passkey ceremony committing and a real cookie session minted three seconds earlier —
logs/guest-kanidm.log:187:and
logs/guest-failed-units.logreports0 loaded units listed— nothing failed on the box.So: kanidm has no OAuth2 resource server named
gate-oidc. The gate is running the authorization-code flow against a client the IdP has never been told about.The defect, proved from the rendered artifact
The render this drive actually deployed is in the run directory, and it is half-wired:
state/clan-config/machines/gateway/gateway-guest.nix:92— the client secret IS minted:clan.core.vars.generators.gate-oidc = { files.secret = { owner = "kanidm"; … }; }, under a comment (:87-90) that says the secret is what "kanidm's gate-oidc oauth2 client is provisioned with (basicSecretFile, gatewayKanidmProvision)".state/clan-config/machines/gateway/gateway-guest.nix:129-153— but theservices.kanidm.provisionblock on this path declares onlygroups(operators,members,kaitiaki,nextcloud_admins) andpersons.operator. There is nosystems.oauth2attribute anywhere in the block.gatewayKanidmProvision— the function the comment names — is not what rendered this machine.state/clan-config/machines/gateway/gateway-guest.nix:288— the control-plane unit nonetheless exportsIDSS_GATE_OIDC_SECRET="$(cat …gate-oidc…)".With apex + secret both present, the substrate wires itself up —
logs/guest-control-plane.log:140:Secret generated, env exported, substrate wired, client never provisioned. Deterministic, not a flake:
operator-sessionis the first door-sign-in leg on this path, so it will red every private-path drive from here.Suspected layer
Product — the guest NixOS render, not the harness and not infra. The VM/guest kanidm provision block diverges from the public/full-install one by omitting the gate client.
logs/healer-claude.out(a healer agent already ran, refused, and left its note) places this atinternal/clan/vmguest.go—kanidmServer(:660-683) vsgatewayKanidmProvision(:1386-1396). I confirmed the rendered-output half of that claim byte-for-byte above; I could not verify its Go file/line citations — the source tree is outside my read scope for this run.What plugging it needs
Two self-consistent shapes exist and the code does neither, which is why this wants a ruling rather than a patch:
systems.oauth2."gate-oidc"(originUrlhttps://<apex>/authz/callback,basicSecretFile= the existing generator,scopeMaps.idm_all_persons) plus theidm_all_personsgroup the module's eval-time check needs, and the consent-disable oneshot that today is public-path-only — otherwise every sign-in lands on kanidm's "Consent to Proceed" page (the DDR 0158 / #644 shape) and reds the next step instead of this one.IDSS_GATE_OIDC_SECRETon a VM-path gateway so the gate falls back to the header-trust resolver. Self-consistent, but/authz/signinstays unwired andoperator-sessionstays red with a 404 instead ofsignin_idp.(A) is what the leg is written to prove. Either way the change carries the ADR 0042 same-commit obligation on the VM/full-install divergence doc, which records no gate-oidc divergence today — so there is no prior decision to read off.
Follow-on hazard worth checking in the same pass (unverified):
gateway-guest.nix:122-123sets kanidm'sdomain = "localhost"andorigin = "https://localhost:41075", while the gate discovers atid.e2e-drive.idss.internal. kanidm builds its discovery document'sissuer/authorization_endpointfrom that origin, so once the client exists the browser may be redirected tolocalhost:41075and the leg reds one step later.What is absent from this run directory
logs/guest-unit.log:3showsidss-guest.servicestillactive (running)with ssh forwarded on127.0.0.1:46075, so a live box exists; I had no grant to use it.logs/droplet-journal.txtdoes not exist. This is a VM-mode guest (ADR 0056), not a droplet. What was harvested islogs/guest-journal.log— host-side qemu unit lines only (boot/stop), no guest-side journal — plus per-service pulls (guest-kanidm.log,guest-control-plane.log,guest-caddy.log, …).logs/guest-files-oidc.logharvested nothing — the collector's own error is the whole file:exit 1: Command failed: ssh … journalctl -u 'nextcloud*' -u 'kanidm-provision*' …/Failed to add filter for units: No data available. No unit matcheskanidm-provision*on this guest, so the harvest that would most directly show what provisioning did is empty on every private-path drive. Minor, harness-side, not the cause — but it made this diagnosis go the long way round viaguest-kanidm.log.logs/state-logs.logis 0 bytes;logs/reporter-claude.errandlogs/healer-claude.errare 0 bytes.logs/guest-kanidm.logis ajournalctl -n 200tail, so the start of the provisioning run is truncated; the survivingSyncing oauth2 resource serversline (:19) emits no per-client output, unlike the person/group lines around it.artifacts/host.jsonrecords"qemu": "exit ENOENT: spawn qemu-system-x86_64 ENOENT"— cosmetic host-probe noise; the drive runs qemu frompayloadMode: /home/swarm/swarm/rehearsal-payloadand the VM booted fine.drive
20260905T190829Zred atoperator-session:the admin-door sign-in reached neither the dashboard, a login form, nor a consent prompt at https://e2e-drive.idss.internal/authz/signin?rd=https://admin.e2e-drive.idss.internal/ — the page reads: "evidence:
/home/swarm/swarm/Matou/idss/test-results/private-path/20260905T190829Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedRULED (agent, two-way under ADR 0174 — Ben vetoes async): shape A — provision the gate client on the VM path. Shape B (let the substrate rest) is REJECTED: DDR 0172 (#511) and ADR 0074 put the control panel behind the door on the community SSO session, and #1236 (Ben, today) ruled that the private path takes the SAME door. A private path whose IdP has no gate client cannot honour either. The VM/full divergence is a DEFECT, not a recorded decision — no ADR, DDR or architecture diagram says the private-path guest omits the gate client;
vmguest.go:198-207composesgatewayKanidmProvision+gatewayGateConsentBlockfor the public path only andkanidmServer(groups + operator, nosystems.oauth2) for the guest, while the SAME render mints thegate-oidcsecret and exportsIDSS_GATE_OIDC_SECRET, so the gate wires itself against a client that never exists (the half-wired shape GOTCHAS #164 names).What to build (
internal/clan/vmguest.go)systems.oauth2."gate-oidc"— originUrlhttps://<apex>/authz/callback(the exactsignin.gocallbackURL()),basicSecretFile= the existinggate-oidcgenerator,scopeMapsoveridm_all_persons— plus theidm_all_personsgroup the module's eval-time check needs. Do NOT re-derive: lift the client fragment out ofgatewayKanidmProvisioninto one function both renders call (one source, the #452/#453/#454 reuse precedent the comment already cites), so the two paths can never drift again.gatewayGateConsentBlock, DDR 0158/#644) on the guest too, targeting the guest's own loopback bind — otherwise the very next step lands on kanidm's "Consent to Proceed" page.gateway_attach_test.go:503-505: the VM render declaressystems.oauth2."gate-oidc"with the callback originUrl +basicSecretFileon the generator, declaresidm_all_persons, and carries the consent block; and the negative: a render that exportsIDSS_GATE_OIDC_SECRETMUST declare the client (the half-wire can never come back).nix-instantiate --parseon the rendered guest nix as the siblings do.domain = "localhost"; origin = "https://localhost:<port>"(the private path's local WebAuthn origin), so the discovery document will send the operator's browser tolocalhost:<port>— which on the operator's own machine (and the drive host) IS the guest's kanidm forward, so the operator's local sign-in is expected to work. If the leg reds one step later there, file it as a NEW ticket (private-path IdP origin vs id.), never widen this one.guest-files-oidcharvest grepskanidm-provision*, which matches no unit on the guest — the provisioning journal is empty on every private-path drive. Fix the collector's unit filter if it is a one-liner; otherwise leave it for the retro.Close = the archive drive #1235 passes
operator-sessionon the re-fire (the leg records the door 302 + the dashboard chrome);go test ./internal/clan/green; ADR 0042: no diagram encodes a VM-path gate divergence, so none changes — say so in the commit.close-report for #1239 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope