Demo · M3
Undo
verified in CI · 2026-11-20 · c06551c
The transcript below is recorded by a test that runs the real command-line tool against a local test setup. Identifiers, times and ports are replaced with numbered placeholders so the transcript is stable from run to run.
## One key in three places. Something nobody inventoried still uses the old key.
$ cat inventory.yaml
tenant: default
credentials:
- id: billing
tier: medium
approval: never
rotator: mockvendor
issuer: { principal: billing }
targets:
- { id: gha, system: github-actions, ref: acme/billing/BILLING_KEY }
- { id: app, system: file, ref: <dir>/app.key }
- { id: worker, system: file, ref: <dir>/worker.key }
$ rotor import inventory.yaml
imported billing (tier medium, managed, mockvendor, 3 target(s))
## During the rotation, on-call edits worker.key by hand; after the old key is disabled, a forgotten cron job calls the vendor with it.
$ rotor rotate billing
rotation <rotation-1> started for billing
==> plan
mode chosen: issuer allows overlapping keys (unlimited) (mode=scheduled)
rollback source: old value read from value-readable target app (source=target:app)
==> escrow-old
old escrowed: sealed under the rotation data key (envelope=<envelope-1>)
==> mint
minted: key ID journaled before sealing (key=<key-id-1>)
==> validate
validated: read-only call succeeded with the new key (negative_control=passed ok=true)
==> propagate
write landed [gha]: PUT returned HTTP 204 (system=github-actions)
write landed [app]: written under lock after fingerprint check (system=file)
write landed [worker]: written under lock after fingerprint check (system=file)
==> verify
reloaded [app]: reload sighup
reloaded [worker]: reload none
confirm live [app]
confirm unsupported [worker]
==> drain
target live [app]: consumer confirmed the new value
no consumer [worker]: no running consumer to confirm; not waited on
drained: all confirmable targets live; max lag 1s passed; no use of the old key in the trailing 3s
==> disable-old
old disabled: reversible disable before revoke (key=<key-id-2>)
==> soak
==> rollback (old key still in use: the issuer rejected requests made with it during soak)
old enabled: old key re-enabled (key=<key-id-2>)
restored [gha]: PUT returned HTTP 204
restored [app]: written under lock after fingerprint check
left untouched [worker]: target changed by someone else since our write; left untouched
new revoked: new key revoked (key=<key-id-1>)
reloaded [app]: reload sighup
escrow destroyed: data key deleted in the runner; envelopes unreadable everywhere
result: RolledBack (old key still in use: the issuer rejected requests made with it during soak)
$ rotor status <rotation-1>
rotation <rotation-1>
credential: billing
mode: scheduled
status: RolledBack
stage: rollback
reason: old key still in use: the issuer rejected requests made with it during soak
current key <key-id-2>, version 0
new key <key-id-1> was revoked
restored: gha
restored: app
left untouched: worker (target changed by someone else since our write; left untouched)
## gha and app hold their original value again; worker.key keeps the human's edit; the old key is active again.