pub struct EventVerifierConfig {
pub verifying_keys: Arc<HashMap<String, VerifyingKey>>,
pub hmac_keys: Arc<HashMap<String, Vec<u8>>>,
pub require_signed: bool,
}Expand description
Verification configuration sourced once at startup.
Cheap to clone (Arc-wrapped keyring); pass into per-event hot loops.
Fields§
§verifying_keys: Arc<HashMap<String, VerifyingKey>>signer_kid → VerifyingKey map. Empty when no verification key file
is configured.
hmac_keys: Arc<HashMap<String, Vec<u8>>>HMAC keys placeholder — currently always empty (supervisor signs
Ed25519 only). Wired so the verify_signed_event_envelope call
surface stays algorithm-agnostic.
require_signed: boolWhen true, raw CloudEventV1 payloads (no signature wrapper) are
rejected. Mirrors CELLOS_EVENT_REQUIRE_SIGNED=1.
Implementations§
Source§impl EventVerifierConfig
impl EventVerifierConfig
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Read configuration from process environment.
Variables:
CELLOS_EVENT_VERIFY_KEYS_PATH: JSON keyring (kid → base64url ed25519 pubkey). Loaded with O_NOFOLLOW on Unix (mirrors SEC-15b).CELLOS_EVENT_REQUIRE_SIGNED:1/true/yes/on→ require every event to arrive in a signed envelope.
Returns Ok(default) when no key file is configured. Returns an error
when the file is configured but cannot be loaded — fail-closed so a
misconfigured operator does not silently accept unsigned traffic.
Trait Implementations§
Source§impl Clone for EventVerifierConfig
impl Clone for EventVerifierConfig
Source§fn clone(&self) -> EventVerifierConfig
fn clone(&self) -> EventVerifierConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for EventVerifierConfig
impl Default for EventVerifierConfig
Source§fn default() -> EventVerifierConfig
fn default() -> EventVerifierConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EventVerifierConfig
impl RefUnwindSafe for EventVerifierConfig
impl Send for EventVerifierConfig
impl Sync for EventVerifierConfig
impl Unpin for EventVerifierConfig
impl UnsafeUnpin for EventVerifierConfig
impl UnwindSafe for EventVerifierConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more