own-VPS full-install: the public gateway's kanidm has NO provision block — no operator person, no groups, no admin password (GOTCHAS #12, 7th port) #452
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#452
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?
Divergence class: GOTCHAS #12 (VM-vs-full-install) — pre-filed by the #450 audit
Root cause. The gateway's kanidm
provisionblock — the operator personaccount, the structural groups
operators/members/kaitiaki/nextcloud_admins,and (via
idmAdminPasswordFile/adminPasswordFile) the admin + idm_adminpasswords — is declared only in
renderGatewayGuest's inlinekanidmServer(internal/clan/vmguest.go:234-274), which rides the VM pathonly. On the own-VPS full-install public gateway:
front-door.nix's (renderKanidmLoopback,frontdoor.go:223-240) —it sets
enableServer+serverSettingsand declares noprovisionblock.renderControlPlaneSurface(vmguest.go:400-412) deliberately omitsservices.kanidm(front-door owns it) — so it adds no provision either.seedOperator/founding person-create anywhere in
internal/foundingorinternal/fleetwire(grep confirms). The only runtime kanidm structure-create is the files-service
OIDC oneshot, which get-or-creates
nextcloud_adminsand the OAuth2 clientas
idm_admin(internal/clan/files.go:496-499).What faults. Every kanidm-authenticated leg on the own-VPS gateway:
Enrolment.MintToken→MintResetToken(clan.OperatorAccount)(
internal/fleetwire/enrolment.go:156-168,internal/kanidm/kanidm.go:265-273)returns HTTP 404
no such person "operator".as
idm_adminusing thekanidm-adminsgenerator password — but the publickanidm's idm_admin password was never set to that value (no
idmAdminPasswordFile), so auth fails 401.kanidm-brand-push(see #453) logs in asadminwith the samenever-set password.
Why it's next. #442/#443 just made the finish leg reach green; the very
next thing the control-plane does at seed/finish is compose against kanidm
(
/api/v1/fleetcomposition"whole",internal/fleetwire/fleet.go:266-270),which needs a provisioned kanidm. This is the 7th port of GOTCHAS #12 — pre-filed
so it does not cost a paid red.
Proposed fix
Give the public/full-install gateway a kanidm
provisionblock equivalent to theVM path's: the operator person (from
OperatorDisplay/OperatorMail), thestructural groups, and
adminPasswordFile/idmAdminPasswordFilefrom thekanidm-adminsgeneratorcontrol-plane.nixalready declares. It can ridecontrol-plane.nix(services.kanidm.provisionmerges with front-door'sservices.kanidm.enableServer) or front-door'srenderKanidmLoopback— decidewhich module owns provision so nothing double-declares (ADR 0105's ownership
split: founding's declarative layer owns the seed operator + structural groups).
Acceptance
services.kanidm.provisionwith the operator person and the four structural groups, admin/idm_admin from
the
kanidm-adminsgenerator.TestOwnVPSGateway_EvalSmoke(and/or the configure-stage seam) asserts theprovision block is present on the full-install assembly.
services.kanidmattrpath (front-door'senableServer+ thisprovisionmerge cleanly under eval).Audit:
docs/vm-full-install-divergence.md(DIV-1). Rulingcontext: requested by Ben 2026-08-11 (each pre-filed defect saves a ~1h drive).
Landed in
7e40ceeonmain.DIV-1 (GOTCHAS #12, 7th port) fixed.
renderControlPlaneSurfacenow emitsgatewayKanidmProvision(internal/clan/vmguest.go): aservices.kanidm.provisionblock on the full-install/public gateway — the operator person (fromOperatorDisplay/OperatorMail), the four structural groups (operators/members/kaitiaki/nextcloud_admins, alloverwriteMembers = false), andadminPasswordFile/idmAdminPasswordFilefrom thekanidm-adminsgenerator control-plane.nix already declares.It rides its OWN attrpath (
services.kanidm.provision), so the NixOS module system MERGES it with front-door.nix'sservices.kanidm.enableServerrather than double-declaring (ADR 0105's split: founding's declarative layer owns the seed operator + groups; front-door owns the server).instanceUrltargets front-door's127.0.0.1:8443loopback bind;acceptInvalidCertsfor the self-signed localhostkanidm-tlsCA (as the VM path).Acceptance:
services.kanidm.provisionwith the operator person + 4 structural groups + admin/idm_admin from the generator. ✔TestAttachGateway_ControlPlaneProvisionsKanidmOnOwnVPSasserts the provision block on the full-install assembly; provision tokens also folded intoTestOwnVPSGateway_FullInstallClosureAudit. ✔services.kanidmattrpath — the test asserts control-plane.nix carries noservices.kanidm =(front-door owns the server); the real-eval merge is covered by the gatedTestOwnVPSGateway_EvalSmoke. ✔Audit doc
docs/vm-full-install-divergence.mdDIV-1 marked CLOSED (same-commit law, ADR 0042); STATUS.md header + milestone log updated. Fullgo test ./internal/clan/ ./internal/founding/green, and the pre-push go-ci gate passed.