pub struct ScanGateMatrix {
pub native: NativeGates,
pub l1: Option<bool>,
pub l2: Option<bool>,
pub l3: Option<bool>,
pub conditional: Vec<ConditionalPipelineGate>,
pub l3_policy: L3SchedulerPolicy,
}Expand description
Caller-controlled execution gates for one scanner execution profile.
Unspecified rules use the shared credentials/secrets-only DLP default;
other execution gates default to enabled. Diagnostic explain and the
scored PII and DLP modes are opt-in. max_level is still enforced by
ScanExecution, so a gate can only further restrict the configured scanner.
Deserializes from the one gate schema of every host (Python
execution_gates, Ark API gates): the native keys rules, models,
pii_mode, dlp_mode and explain, the level switches l1, l2 and
l3, conditional and the L3 worker policy l3_policy. Unknown keys and
out-of-range values are refused.
Fields§
§native: NativeGatesNative rule, model, mode and explain gates, shared with Ark Core.
l1: Option<bool>Optional L1 override. None means enabled.
l2: Option<bool>Optional L2 override. None means enabled.
l3: Option<bool>Optional L3 override. None means enabled.
conditional: Vec<ConditionalPipelineGate>Request-context and prior-result conditions applied before L2 or L3.
l3_policy: L3SchedulerPolicyL3 worker scheduling policy.
Implementations§
Source§impl ScanGateMatrix
impl ScanGateMatrix
Sourcepub fn all_enabled() -> Self
pub fn all_enabled() -> Self
Explicitly enable all native rules, including opt-in DLP content families.
Sourcepub fn set_level(&mut self, level: SecurityLevel, enabled: bool)
pub fn set_level(&mut self, level: SecurityLevel, enabled: bool)
Set one level gate.
Sourcepub fn set_model(&mut self, model: impl Into<String>, enabled: bool)
pub fn set_model(&mut self, model: impl Into<String>, enabled: bool)
Set one model/native scanner gate.
Sourcepub fn with_model(self, model: impl Into<String>, enabled: bool) -> Self
pub fn with_model(self, model: impl Into<String>, enabled: bool) -> Self
Builder-style model/native scanner gate setter.
Sourcepub fn set_rule(&mut self, rule_id: impl Into<String>, enabled: bool)
pub fn set_rule(&mut self, rule_id: impl Into<String>, enabled: bool)
Set one stable rule-id gate.
Sourcepub fn with_rule(self, rule_id: impl Into<String>, enabled: bool) -> Self
pub fn with_rule(self, rule_id: impl Into<String>, enabled: bool) -> Self
Builder-style stable rule-id gate setter.
Sourcepub fn set_conditional(
&mut self,
gates: Vec<ConditionalPipelineGate>,
) -> Result<(), String>
pub fn set_conditional( &mut self, gates: Vec<ConditionalPipelineGate>, ) -> Result<(), String>
Replace request-context and prior-result gates.
Sourcepub fn allows_level(&self, level: SecurityLevel) -> bool
pub fn allows_level(&self, level: SecurityLevel) -> bool
Return whether the level is allowed by this matrix before max-level enforcement.
Sourcepub fn set_l3_policy(&mut self, policy: L3SchedulerPolicy)
pub fn set_l3_policy(&mut self, policy: L3SchedulerPolicy)
Replace the L3 worker scheduling policy.
Trait Implementations§
Source§impl Clone for ScanGateMatrix
impl Clone for ScanGateMatrix
Source§impl Debug for ScanGateMatrix
impl Debug for ScanGateMatrix
Source§impl Default for ScanGateMatrix
impl Default for ScanGateMatrix
Source§impl<'de> Deserialize<'de> for ScanGateMatrix
impl<'de> Deserialize<'de> for ScanGateMatrix
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>,
Auto Trait Implementations§
impl Forget for ScanGateMatrix
impl Freeze for ScanGateMatrix
impl Move for ScanGateMatrix
impl RefUnwindSafe for ScanGateMatrix
impl Send for ScanGateMatrix
impl Sync for ScanGateMatrix
impl Unpin for ScanGateMatrix
impl UnsafeUnpin for ScanGateMatrix
impl UnwindSafe for ScanGateMatrix
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> 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