private path: clean machines fail enroll — the app never bootstraps the sops age key the secret kanidm ca var needs #313
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#313
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?
The clean-install drive found it (2026-08-06)
Ben's true-clean drive (no state dir, no Nix, no
~/.config/sops) failed the private path's enroll leg at disk layout with, at the bottom of the honest error:Why every clean machine will hit this
The fleet-seeding arc deliberately made kanidm's TLS
cavar SECRET (ADR 0105; STATUS names it as the fourth spike delta — a public var's.pathneeds the file on disk at eval time, which the install stage's generate step hasn't run yet). Secret clan vars are sops-encrypted, which requires:~/.config/sops/age/keys.txt(clan secrets key generate), andclan secrets users add operator --age-key <pub>— writessops/users/operator).Nothing in the app performs either step. Every drive before this arc passed because the repo's vars were public-only (
state-version); every truly clean machine now fails at enroll, with the sops line buried underclan: disk on gateway: the disk could not be laid out.The live drive was unblocked manually with exactly those two commands (pinned clan CLI from the store); the key +
sops/users/operatornow exist on benz-HP.What the fix owns
The private path is app-managed clan end-to-end (ADR 0125) — the app must own this bootstrap too. Likely shape: the seed leg (or the enrollment install stage's opening, next to
vars generate) ensures the key exists and the operator user is registered, through the pinned CLI, fail-loud on either step (ADR 0100). Idempotent: both steps are no-ops when already present.The custody ruling this needs (why ready-for-human)
The age private key is crown-jewel-adjacent — whoever holds it can decrypt every secret var in the config repo:
~/.config/sops— scrubbing a shared-tool location the operator may also use for other clans needs care.SOPS_AGE_KEY_FILEunder the state dir) so custody follows the app's existing discipline?Evidence
founding: stand up the local VM: clan: disk on gateway: the disk could not be laid out: … No SOPS key found.vars/per-machine/gateway/state-version/version/valueonly — public, no sops needed.~/.config/sops/age/keys.txt,sops/users/operatorcommitted in the live config repo.Ben ruled the custody questions (2026-08-06, ready-for-human sweep):
SOPS_AGE_KEY_FILE; the operator's shared~/.config/sopsis never touched.Build shape as specced in the body: seed leg (or enroll install-stage opening, next to
vars generate) ensures key +sops/users/operatorregistration through the pinned CLI, idempotent, fail-loud (ADR 0100). Migration note: benz-HP's manual unblock left a key at the clan-default~/.config/sops/age/keys.txt— the fix should adopt/import an existing registered key rather than minting a second admin blindly.Flipped
ready-for-agent.Fixed on
origin/mainin6fa4d77.The app now owns the sops-admin bootstrap on the private path (app-managed clan end-to-end, ADR 0125), so a clean machine no longer fails enroll at disk-layout with
No SOPS key found.Shape (per Ben's 2026-08-06 custody ruling):
Secrets().EnsureOperatorseam (internal/clan/secrets.go): ensures an app-scoped age key (<state-dir>/sops/age/keys.txt, pointed at viaSOPS_AGE_KEY_FILEon the pinned-CLI env —clan.ExecEnv) and registerssops/users/operatorthrough the pinned CLI inside the single-writer commit. Idempotent (tree/file presence) and fail-loud (ADR 0100).# public key:header.founding.StandUpPrivateruns it after the ADR 0125 toolchain gate and before the VM enrollment reaches secret-var sealing (ClanFace/clan.Clan/the fake/the resting stub gainSecrets()).wiring_prod.go:143-145); placing the key under the state dir gives the scrub/reset behaviour for free.Tests: the clan CLI seam (a scripted
secretsdouble + a real config repo — mint→register, adopt-existing, idempotent no-op, fail-loud,ExecEnvoverride) and the founding gate (the bootstrap runs; its failure gates the VM before any stand-up).go build/vet/test+ golangci-lint green (pre-push gate).Lab-pending (next clean drive): the exact
clan secrets key generatewrite-location behaviour (does it honourSOPS_AGE_KEY_FILE?) and thesecrets users addflag shape are proven against the pinned CLI on the next real drive (the private-path arc's lab discipline); the belt-and-braces adopt relocates the key app-scoped either way. Evidence:internal/clan/secrets_test.go.