Skip to main content

Module vault_rotate

Module vault_rotate 

Source
Expand description

Vault rotate: a new value for an entry, set at its service by a command, without anyone seeing it (docs/specs/SPEC_VAULT_GENERATE_CAPTURE_AND_BROWSER_SIGNINS_2026_10_28.md §4.4).

  1. srv generates a new value as a pending version that nothing is given yet;
  2. runs set with it in NEW_SECRET and the current value in OLD_SECRET;
  3. runs verify, if given, with it in NEW_SECRET;
  4. on success makes it the entry’s value (the old one kept 7 days); on any failure keeps the old one and the pending one, marked with the step that failed: if set succeeded and verify didn’t, the service may already hold the new value, so nothing is thrown away.

The person approves the rotation once, naming set and verify and saying the value at the service changes; “Always” covers those two command lines for this agent and entry. The commands run like Terminal run with secrets (in the agent’s folder, output cleaned of both values), approved with the rotation.

Structs§

Ran 🔒
What a command did: its exit code and its last lines, already cleaned of the values it was given.
RotateBody 🔒
RunError 🔒
Why a command has no exit code: it never started (nothing ran), or it started and was stopped or lost track of (it may have done its work).

Constants§

COMMAND_WAIT 🔒
How long set or verify may run.
ROTATED 🔒
The activity’s action for a rotation.

Functions§

clip 🔒
error 🔒
grant_key 🔒
The grant “Always” gives: this agent may rotate the entry with these two command lines without asking again.
handle_vault_rotate 🔒
POST /api/v1/vault/rotate.
host_pane 🔒
The pane of the agent asking, proven. A rotation runs its set and verify commands on the host, which a container agent can’t do (/api/v1/shell/ is refused to it for the same reason), so one is refused before the person is asked.
ran_json 🔒
rotatable_entry 🔒
The entry id an agent asks to rotate. Before anything is asked or written, one in a Vault the agent may not use is refused as one that is not there.
rotation_request 🔒
The person’s question about rotating row: both commands, that its value changes, and what the agent says it is for.
run 🔒
Runs cmd as Terminal run would with secrets, approved with the rotation, and waits for it to end.
shown_commands 🔒
What the approval prompt shows as the command.
step_failed 🔒
The step a rotation failed at: 2 when set didn’t succeed (it exited non-zero, or was stopped or lost after it started), 3 when verify didn’t; None when both succeeded.