pi-provider: give one machine its own bearer on a provider #95
No reviewers
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/nexus!95
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/per-provider-target-cli"
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?
pi-provider grant <provider> <machine> [token-name]gives one machine a bearer only it holds on a provider whose credential is otherwise shared: one hidden prompt, one new ciphertext encrypted to that machine's host keys and the hypervisor's, every other target's ciphertext and recipient set untouched.pi-provider rotate <provider> <machine> [new-token-name]replaces that bearer in place, or moves the claim to a fresh named token and retires the old one once nothing claims or defaults to it. Both write the new ciphertext before the registry repoints, and both refuse to land if any ciphertext the operation did not name changes recipients. Registry validation matches the per-target contract clause for clause, including per-(provider, target) uniqueness; provider-wide commands refuse a split provider loudly instead of picking one.retarget,token remove, and discovery handle mixed shared/claimed credentials, and shared-credential behavior is unchanged.docs/credentials.mddocuments the composed, resumable migration from one shared credential to per-target bearers; its last hop, emptying the shared target list, is tracked in allod/nexus#83.Rebased onto master after allod/nexus#94's
add --models-file. The seam needed two fixes: master'sclassify_addcalledprovider_credentialwith one argument after this branch gave it a required command label, which the suite caught as an unbound variable; andadd --models-filerefused a provider split across credentials, which this branch makes contract-valid and which a models update does not need resolved to one credential. It now names every credential serving the provider and a new case covers it.Closes allod/nexus#36
Closes allod/secrets#16
Refs allod/nexus#83
Risk
R3. Secret custody: the tool writes Age ciphertexts and the registry that drives per-machine decryption across two repositories. Narrowness is the contract's job (
lib.piCredentialRecipients, witnessed by the secretspi-credential-registrycheck), the tool's pre-write assertion refuses unintended recipient changes, and every path is fixture-tested, but a mistake here reaches real bearers on real machines. Rollback is a revert pluspi-provider recoverfor an interrupted run.Validation
bash tests/pi-provider.sh: 443 assertions, exit 0 (master before allod/nexus#94: 336; the delivered branch: 410).nix build .#checks.x86_64-linux.provisioning-contracton the rebased commit: exit 0, which runs shellcheck over the tool and the suite. Two cold cross-family review rounds: codexgpt-5.6-solon the delivered branch found three defects, all reproduced and fixed before relay; codexgpt-5.6-solagain on the rebased diff found the split-provideradd --models-filerefusal, fixed with a test, and six comments to trim, trimmed. Its one other finding, thatretargetinstalls the registry before the shared ciphertexts it re-encrypts, is pre-existing master behavior unchanged here and covered by the recovery journal, so it is noted and not acted on.A third pass after the fix round, correctness only, on two seats: gemma4-31b over nullsink returned no findings; codex
gpt-5.6-solreturned two, both pre-existing and not changed here. The bearer is visible underbash -xinprompt_and_encrypt, exactly as on master's path, since xtrace prints every expansion. And the suite stubsnix, so the bash-ported registry validator's agreement withlib/pi-credential-schema.nixis witnessed by the live run's post-install build of the secretspi-credential-registrycheck and by the deployment build, not by the suite, which was already the suite's design.