pub struct KeySlot {
pub current: Option<TrustedPubkey>,
pub previous: Option<TrustedPubkey>,
pub reject_before: Option<DateTime<Utc>>,
pub successor: Option<TrustedPubkey>,
pub retire_at: Option<DateTime<Utc>>,
}Expand description
LOADBEARING: reject_before is the compromise kill-switch - artifacts
signed before this timestamp are refused regardless of which key signed.
successor + retire_at declare a planned rotation: while
now < retire_at the successor’s signature is accepted (overlap window);
past retire_at the reconciler emits Action::RotateTrustRoot so the
operator’s tooling can promote current -> previous, successor -> current.
Fields§
§current: Option<TrustedPubkey>§previous: Option<TrustedPubkey>§reject_before: Option<DateTime<Utc>>§successor: Option<TrustedPubkey>Pre-announced next key. Accepted during the overlap window
(now < retire_at). Must be set together with retire_at (Nix-side
assertion in contracts/trust.nix). Promotion to current is operator-
driven, never automated by CP.
retire_at: Option<DateTime<Utc>>RFC 3339 deadline for rotation. Drives both the verifier’s overlap-
window check and the reconciler’s RotateTrustRoot signal.
Implementations§
Source§impl KeySlot
impl KeySlot
Sourcepub fn active_keys(&self) -> Vec<TrustedPubkey>
pub fn active_keys(&self) -> Vec<TrustedPubkey>
Time-less view: [current, previous] (newer first). For schema-only
inspection / fixtures. Verifiers should call Self::active_keys_at so
successor is honored during the overlap window.
Sourcepub fn active_keys_at(&self, now: DateTime<Utc>) -> Vec<TrustedPubkey>
pub fn active_keys_at(&self, now: DateTime<Utc>) -> Vec<TrustedPubkey>
LOADBEARING: [current, previous, successor (if now < retire_at)].
Verifiers iterate first-match-wins; this ordering lets the successor
signature verify during the overlap window without forcing the
operator to rotate current before the deadline. Outside the overlap
it’s identical to Self::active_keys.