How it works
Plan, prove, replace, then destroy.
A rotation is a durable workflow. Each step records why it happened, and a failure at any step has a defined way back.
- Plan. Before anything changes, Kleides reads the issuer and every target, and states the mode, where the old value would come from for a rollback, how drift will be detected and how precisely, and anything that blocks the rotation.
- Approve. Credentials you mark as needing approval wait for a person. Nothing is minted first.
- Escrow and mint. The old value and the new key are sealed on your runner under a key used for this rotation only. The new key's ID is written to disk before anything else, so a crash never leaves a key nobody knows about.
- Validate. A read-only call proves the new key works, and a deliberately wrong key proves the check can fail.
- Wait for CI. Workflow runs that started before the write finish first, so no run sees the old value in one job and the new one in the next.
- Propagate. Every target is written with the strongest precondition it supports. Each write is classified as landed, ambiguous or rejected.
- Confirm and drain. Consumers reload and confirm. Kleides waits until the issuer has seen no use of the old key for a quiet window.
- Disable and soak. Where the issuer allows it, the old key is disabled first. A rejected request during the soak re-enables it and rolls everything back.
- Revoke. The point of no return. Kleides retries until it is done.
- Destroy escrow. The rotation's key is deleted on the runner. Every copy of every envelope, wherever it went, can no longer be opened.
When there is no API
Some vendors only create keys in their console. Kleides runs the whole transaction and asks a person for that one step. The person hands the key to the runner from a terminal on the runner host; the value never passes through Kleides itself, a notification or a web page.