allod secret declare: write a credential's non-secret half in canonical shape #196
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools#196
Loading…
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?
Give agents a command that writes a credential's non-secret half in the canonical shape, so the PR that declares a new credential is generated rather than hand-edited across three files.
Primary goals:
allod secret declare <name> --kind <kind> --owner <owner> --to <machine>,... --format <format> --deployed-path <path> --verify <probe>appends thecredentials.nixentry inrotation_state = "pending", thesecrets.nixline in the[ hostKey ] ++ vmKeys "<machine>"form, and the registry group withservicenoneorforgejo.Current state and specifics
allod/tools#182 settled that the host command
allod secret createverifies and encrypts and does not author, so the reviewed PR is the only authoring path (see its design comment). That leaves agents writing the three entries by hand from the shapes in the secrets template's README. Thecredentials.nixentry shape is theagent-pr-tokenone;secrets.nixlines are"secrets/<name>.age".publicKeys = [ hostKey ] ++ vmKeys "<vm>";; the registry group shape is the onerotate-token'svalidate_group_metadataaccepts. The command should write text, not regenerate files, so the diff stays one block per file.Scope
In: the three writes, the name-collision refusal, and tests against a fixture checkout. Out: encrypting anything, touching the identity, the consumer module wiring, and the identity export in the secrets flake, which stay hand-written in the same PR.