pub struct StreamSecurityPolicy {
pub remote_limits: StreamRemoteLimits,
}Expand description
Security policy applied to stream payloads that leave the local boundary.
Combines the StreamRemoteLimits bounds with a redaction scan over
expression graphs so private paths, host names, credentials, and oversized
binaries do not escape in public payloads.
Fields§
§remote_limits: StreamRemoteLimitsBounds applied to remote stream access.
Implementations§
Source§impl StreamSecurityPolicy
impl StreamSecurityPolicy
Sourcepub fn validate_public_expr(self, expr: &Expr) -> Result<()>
pub fn validate_public_expr(self, expr: &Expr) -> Result<()>
Rejects an expression destined for a public surface if it contains any redaction finding.
Returns an Error::Eval naming the offending finding category.
Sourcepub fn finding_for_expr(self, expr: &Expr) -> Option<StreamRedactionFinding>
pub fn finding_for_expr(self, expr: &Expr) -> Option<StreamRedactionFinding>
Recursively scans an expression graph and returns the first redaction
finding, or None if the expression is clean.
Sourcepub fn finding_for_text(self, value: &str) -> Option<StreamRedactionFinding>
pub fn finding_for_text(self, value: &str) -> Option<StreamRedactionFinding>
Scans a single text value and returns the first redaction finding, or
None if no sensitive pattern matches.
Trait Implementations§
Source§impl Clone for StreamSecurityPolicy
impl Clone for StreamSecurityPolicy
Source§fn clone(&self) -> StreamSecurityPolicy
fn clone(&self) -> StreamSecurityPolicy
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 moreimpl Copy for StreamSecurityPolicy
Source§impl Debug for StreamSecurityPolicy
impl Debug for StreamSecurityPolicy
Source§impl Default for StreamSecurityPolicy
impl Default for StreamSecurityPolicy
Source§fn default() -> StreamSecurityPolicy
fn default() -> StreamSecurityPolicy
Returns the “default value” for a type. Read more
impl Eq for StreamSecurityPolicy
Source§impl PartialEq for StreamSecurityPolicy
impl PartialEq for StreamSecurityPolicy
Source§fn eq(&self, other: &StreamSecurityPolicy) -> bool
fn eq(&self, other: &StreamSecurityPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StreamSecurityPolicy
Auto Trait Implementations§
impl Freeze for StreamSecurityPolicy
impl RefUnwindSafe for StreamSecurityPolicy
impl Send for StreamSecurityPolicy
impl Sync for StreamSecurityPolicy
impl Unpin for StreamSecurityPolicy
impl UnsafeUnpin for StreamSecurityPolicy
impl UnwindSafe for StreamSecurityPolicy
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