pub struct MaskingSpec {
pub description: Option<String>,
pub key: Option<String>,
pub rules: Vec<MaskRule>,
}masking only.Expand description
The masking: config block: a declarative, destination-scoped policy that
classifies sensitive fields (by field-name pattern, by value detector, or
by explicit field list) and applies a masking action per page. The masking
pass runs first — before the quality, contract, and schema-drift passes
and before every sink write — so PII never reaches a sink, the DLQ, or a
lineage sample unmasked.
Masking never fails a run or quarantines records: every matching field is rewritten in place. Rules are evaluated in declared order; for a given field, the first matching rule wins.
Fields§
§description: Option<String>Human-readable description of the policy (documentation metadata).
key: Option<String>Secret key for keyed hashing/tokenization (hash / tokenize
actions). When present, masked values are HMAC-SHA256 keyed digests, so
the mapping cannot be reversed by an attacker who lacks the key yet stays
deterministic (equal inputs → equal tokens) so masked values remain
joinable downstream. Pull it from a secrets manager
(${vault:...} / ${aws-sm:...} / …) rather than hard-coding it.
When absent, hash / tokenize fall back to an unkeyed SHA-256
digest — still deterministic, but not secret (anyone can recompute it).
rules: Vec<MaskRule>The masking rules. Must be non-empty. Evaluated in declared order; the first rule that matches a given field wins for that field.
Trait Implementations§
Source§impl Clone for MaskingSpec
impl Clone for MaskingSpec
Source§fn clone(&self) -> MaskingSpec
fn clone(&self) -> MaskingSpec
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 MaskingSpec
impl Debug for MaskingSpec
Source§impl<'de> Deserialize<'de> for MaskingSpec
impl<'de> Deserialize<'de> for MaskingSpec
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 JsonSchema for MaskingSpec
impl JsonSchema for MaskingSpec
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for MaskingSpec
impl RefUnwindSafe for MaskingSpec
impl Send for MaskingSpec
impl Sync for MaskingSpec
impl Unpin for MaskingSpec
impl UnsafeUnpin for MaskingSpec
impl UnwindSafe for MaskingSpec
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>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request