pub struct HooksSubscriptionConfig {
pub hmac_secret: Option<String>,
}Expand description
[hooks.subscription] sub-block. K7 ships one knob today
(hmac_secret); future K-track work may add per-event opt-out
filters or alternate signing algorithms.
#1262 — Debug is implemented manually to redact hmac_secret so
accidental {:?} prints never leak the signing key. #1258 — the
manual Drop impl zeroizes the secret on scope exit.
Fields§
§hmac_secret: Option<String>Server-wide HMAC secret. Plaintext on disk — operators are
expected to chmod 600 the config file (same posture as the
existing api_key field).
#1262 — skip_serializing blocks the secret from being echoed
through any serde_json::to_string(&HooksSubscriptionConfig)
path.
Implementations§
Source§impl HooksSubscriptionConfig
impl HooksSubscriptionConfig
Sourcepub fn zeroize_secrets(&mut self)
pub fn zeroize_secrets(&mut self)
#1258 — zeroize the hmac_secret buffer in place. Idempotent.
The Drop impl below delegates here so the helper is the
single source of truth for the zero-on-secret-loss contract.
Tests probe the buffer via this entry point so they observe
the post-zeroize state of a still-live allocation (probing
after the owning value is dropped is UB — the allocator’s
free-list bookkeeping stamps the first 8-16 bytes of the
just-freed slot and that’s not a zeroize defect; see #1321).
Trait Implementations§
Source§impl Clone for HooksSubscriptionConfig
impl Clone for HooksSubscriptionConfig
Source§fn clone(&self) -> HooksSubscriptionConfig
fn clone(&self) -> HooksSubscriptionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HooksSubscriptionConfig
impl Debug for HooksSubscriptionConfig
Source§impl Default for HooksSubscriptionConfig
impl Default for HooksSubscriptionConfig
Source§fn default() -> HooksSubscriptionConfig
fn default() -> HooksSubscriptionConfig
Source§impl<'de> Deserialize<'de> for HooksSubscriptionConfig
impl<'de> Deserialize<'de> for HooksSubscriptionConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Drop for HooksSubscriptionConfig
impl Drop for HooksSubscriptionConfig
Source§fn drop(&mut self)
fn drop(&mut self)
#1258 — zeroize hmac_secret on scope exit. Delegates to
HooksSubscriptionConfig::zeroize_secrets.
Auto Trait Implementations§
impl Freeze for HooksSubscriptionConfig
impl RefUnwindSafe for HooksSubscriptionConfig
impl Send for HooksSubscriptionConfig
impl Sync for HooksSubscriptionConfig
impl Unpin for HooksSubscriptionConfig
impl UnsafeUnpin for HooksSubscriptionConfig
impl UnwindSafe for HooksSubscriptionConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more