pub struct MoqEventPep { /* private fields */ }Expand description
The installed MoQ/event MAC floor.
Dormancy is represented by the caller not installing this PEP. Every check on an installed instance is fail-closed.
Implementations§
Source§impl MoqEventPep
impl MoqEventPep
Sourcepub fn deny_event_scope(
&self,
subject: &Subject,
prefix: &str,
action: MoqEventAction,
)
pub fn deny_event_scope( &self, subject: &Subject, prefix: &str, action: MoqEventAction, )
Audit an explicit service/source ownership denial in addition to MAC.
Sourcepub fn new(
resolver: Arc<dyn MoqEventLabelResolver>,
clearance: Arc<dyn ClearanceSource>,
audit: Arc<dyn MoqMacAuditSink>,
) -> Self
pub fn new( resolver: Arc<dyn MoqEventLabelResolver>, clearance: Arc<dyn ClearanceSource>, audit: Arc<dyn MoqMacAuditSink>, ) -> Self
Construct an active, fail-closed PEP from this plane’s typed object-label resolver, verified-subject clearance source, and mandatory audit sink.
Sourcepub async fn check(
&self,
subject: &Subject,
object: &MoqEventObjectRef,
action: MoqEventAction,
) -> MacDecision
pub async fn check( &self, subject: &Subject, object: &MoqEventObjectRef, action: MoqEventAction, ) -> MacDecision
Check the per-track/per-event label ceiling for an already-decoded typed identity.
This is the typed core: the object is an
MoqEventObjectRef, never a string, so no caller can smuggle
another plane’s coordinate into this plane’s resolver.
Sourcepub async fn event_grant_is_current(
&self,
subject: &Subject,
prefix: &str,
) -> bool
pub async fn event_grant_is_current( &self, subject: &Subject, prefix: &str, ) -> bool
Boundary check for an event-plane topic prefix. Fresh held-grant validation, not an attempted operation. Do not write audit records for watchdog ticks; never cache clearance or label state.
Sourcepub async fn check_event_prefix(
&self,
subject: &Subject,
prefix: &str,
action: MoqEventAction,
) -> MacDecision
pub async fn check_event_prefix( &self, subject: &Subject, prefix: &str, action: MoqEventAction, ) -> MacDecision
Boundary check for an event-plane topic prefix.
Parses the dot grammar exactly once; a coordinate that does not decode into a typed identity (including the tenant-qualified internal map keys the confidential path uses, which are not object identities) denies and is audited as such — with only its bounded representation in the audit record, so a malformed attacker-sized name cannot amplify allocation or the durable WAL.
Sourcepub async fn check_stream_track(
&self,
subject: &Subject,
track: &str,
action: MoqEventAction,
) -> MacDecision
pub async fn check_stream_track( &self, subject: &Subject, track: &str, action: MoqEventAction, ) -> MacDecision
Boundary check for a stream-plane track / broadcast name.
Parses the slash grammar exactly once; malformed or noncanonical names deny and are audited as unknown identities — bounded, as above, so an oversized malformed track cannot amplify the audit trail.
Sourcepub async fn deny_track_admission_without_hook(&self, subject: &Subject)
pub async fn deny_track_admission_without_hook(&self, subject: &Subject)
Audit and deny a transport session because no per-track callback exists.
This is the fail-closed bridge to #276: an installed track authorizer must never be retained as dead configuration while tracks are served.
pub fn resolver(&self) -> &Arc<dyn MoqEventLabelResolver> ⓘ
pub fn clearance(&self) -> &Arc<dyn ClearanceSource> ⓘ
Auto Trait Implementations§
impl Freeze for MoqEventPep
impl !RefUnwindSafe for MoqEventPep
impl Send for MoqEventPep
impl Sync for MoqEventPep
impl Unpin for MoqEventPep
impl UnsafeUnpin for MoqEventPep
impl !UnwindSafe for MoqEventPep
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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