Skip to main content

Module rotation

Module rotation 

Source
Expand description

Core rotation execution pipeline.

A Revoked or Closed session fails the attempt up front; an Expired one is refreshed by the gate. execute_by bounds only the target-side steps (rotate, verify, terminate sessions), not the server-side cipher write and report.

ModulesΒ§

cipher πŸ”’
The vault side of a rotation attempt: the pre-flight dry run and the cipher write (including the 409 re-check), plus fetching, checking and re-encrypting the cipher. The stage fixes how a rejection is reported.
gate πŸ”’
The gate for target-side steps: lease, cancellation, session and connectivity checks.

StructsΒ§

Attempt πŸ”’
One attempt’s inputs, shared by its steps.
CipherWritten πŸ”’
Proof that the cipher write succeeded.
ExecutionContext πŸ”’
Inputs to execute.
Verified πŸ”’
Proof that verify succeeded.

EnumsΒ§

AbortReason πŸ”’
Why a gate aborted the rotation without reporting. The server’s release sweep reclaims the job.
ExecutionResult πŸ”’
The outcome of a single execute call.
Halt πŸ”’
Why an attempt stopped before success: report a failure, or abort unreported.
TargetStep πŸ”’
A gated, target-side integration step.

FunctionsΒ§

abort_from_api πŸ”’
The abort for an error that ends the attempt unreported, if it is one.
execute πŸ”’
Runs one rotation attempt: a cipher pre-flight check, then resolve, generate, rotate, verify, write cipher, terminate sessions and report.
halt_from_api πŸ”’
Maps an API error to a halt: abort when the attempt or session is gone, else report Internal.
report_failure_absorb πŸ”’
Reports a rotation failure, absorbing report errors. Also used by the claim loop, before an ExecutionContext exists.