pub struct ExpectedContext {
pub operator_epoch: String,
pub principal_uid: u32,
pub observation: Observation,
}Expand description
Operator assertion from protected configuration, never an engine observation.
Fields§
§operator_epoch: String§principal_uid: u32§observation: ObservationImplementations§
Source§impl ExpectedContext
impl ExpectedContext
pub fn validate(&self) -> Result<(), &'static str>
Sourcepub fn validate_local_socket_policy(&self) -> Result<(), &'static str>
pub fn validate_local_socket_policy(&self) -> Result<(), &'static str>
Supported local deployment policy, not an authentication claim. Rootful sockets must belong to root; rootless sockets to the non-root configured principal. Other deployments require an explicit future profile.
Sourcepub fn match_current_operation(
&self,
bound: &Self,
before: &Observation,
after: &Observation,
) -> Result<(), &'static str>
pub fn match_current_operation( &self, bound: &Self, before: &Observation, after: &Observation, ) -> Result<(), &'static str>
Integration entry on Unix: compare the configured principal to actual process euid, not another caller-supplied identity. Config protection is still the host’s responsibility; this does not open any file.
Sourcepub fn match_operation(
&self,
bound: &Self,
before: &Observation,
after: &Observation,
) -> Result<(), &'static str>
pub fn match_operation( &self, bound: &Self, before: &Observation, after: &Observation, ) -> Result<(), &'static str>
Compare the exact protected caller context and both observations. Equal observations can occur across socket activation or service restart. Success therefore says nothing about daemon lifetime or authentication.
Trait Implementations§
Source§impl Clone for ExpectedContext
impl Clone for ExpectedContext
Source§impl Debug for ExpectedContext
impl Debug for ExpectedContext
Source§impl<'de> Deserialize<'de> for ExpectedContext
impl<'de> Deserialize<'de> for ExpectedContext
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ExpectedContext
Source§impl PartialEq for ExpectedContext
impl PartialEq for ExpectedContext
Source§impl Serialize for ExpectedContext
impl Serialize for ExpectedContext
impl StructuralPartialEq for ExpectedContext
Auto Trait Implementations§
impl Freeze for ExpectedContext
impl RefUnwindSafe for ExpectedContext
impl Send for ExpectedContext
impl Sync for ExpectedContext
impl Unpin for ExpectedContext
impl UnsafeUnpin for ExpectedContext
impl UnwindSafe for ExpectedContext
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