Add the Pi credential registry contract #13
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
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/secrets!13
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/pi-credential-registry"
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?
This adds the empty public contract that a private deployment will use to map Pi credentials to providers and libvirt dev VMs. A running machine stays unchanged because the public registry is empty and no ciphertext is added. When populated in a private fork, the contract derives ciphertext paths, Age recipients, credential inventory, and per-VM projections; malformed or incomplete data fails closed. The focused registry and existing credential-inventory checks prove the empty state, derived synthetic shapes, and sabotage paths. If the contract is wrong, leave this PR unmerged or revert it before private adoption.
Refs allod/strategy#34
Boundary
secretsowns credential IDs, targets, provider references, rotation strategy, ciphertext existence, and recipient derivation. It deliberately does not import profiles:lib.validatePiProviderReferenceslets the archetypes join force unknown-provider rejection against the separately pinned profiles catalog without adding a fifth source edge.No bearer value, real endpoint, provider/model metadata, private target, private recipient, or ciphertext is present in this change.
Exported contract
lib.piCredentialslib.piCredentialCiphertextPathslib.piProviderCredentialslib.piCredentialInventorylib.piCredentialRecipientslib.piCredentialProjectionslib.validatePiProviderReferenceslib.mkPiCredentialContractlib.consumedInventorySourcepiCredentialsandpiProvidersRisk
R3: private adoption will change Age recipients and credential delivery. This public change is inert while the registry remains empty. Residual integration risk is the exact profiles/secrets join and downstream agenix projection, owned by later archetypes and deploy PRs.
Validation
nix build .#checks.x86_64-linux.pi-credential-registry .#checks.x86_64-linux.credential-inventorynix flake check --no-buildgit diff --checkThe independent read-only review found two defects in
cfd52d4:secrets.nix/agenix recipient helper validates only target/key shape. A malformed registry ID such as../escape, invalid rotation strategy, empty providers, or unknown fields can still produce a recipient entry. The standalone surface must force the full registry schema, global provider uniqueness, and recipient-key uniqueness while leaving ciphertext existence to the flake contract so agenix can create a new file.I will fix both in a follow-up commit and rerun the focused checks.
Both review findings are addressed in
2692bef:lib/pi-credential-schema.nixis now the single strict schema used by both the flake contract and standalonesecrets.nixrecipient generation. The agenix surface rejects invalid IDs/fields/lists/rotation strategy, duplicate provider ownership, malformed recipient key records, and duplicate recipient keys before producing any path.Revalidated:
nix build .#checks.x86_64-linux.pi-credential-registry .#checks.x86_64-linux.credential-inventorynix flake check --no-buildsecrets.nixevaluation../escaperegistry rejectiongit diff --check