Craton Shield
Changelog
All notable changes to vs-key-manager are documented here. This crate
follows the workspace version (pre-1.0; see ROADMAP for stability commitment).
[0.7.0]
Changed
- Behavior change for fail-closed callers:
provision_key,generate_key,rotate_key, andrevoke_keynow pre-check audit-ring headroom viaaudit_has_headroom()before mutating slot state. Previously, aResourceExhaustederror from the post-commit audit append could leave the slot already updated (or zeroized) with no audit record. Callers now observe a clean refusal with state unchanged.
Added
KeyManager::audit_has_headroom()— public predicate for fail-closed callers to perform their own pre-flight checks.- O(1) cached
active_count;key_capacity()no longer scans all slots.
Fixed
keym_finalizeno longer collapses every slot'smetadata.key_idtoKeyId(0). The slot-index == key_id invariant is preserved after finalize.- Bench
audit_append_after_wrapnow uses non-uniform key material sovalidate_key_materialaccepts it. - README example rewritten to compile against the real API and added
as a doc-test on
KeyManager::new.
Docs
tick()documents that audit-emit failures during expiry are dropped.- All public enum variants and
KeyMetadata/AuditEntryfields are documented (#![deny(missing_docs)]).