pub struct MacEventAuthz { /* private fields */ }Expand description
Adapter from the canonical MAC contract to the event authorization surface.
Constructing this type installs an active PEP, so all missing clearance or
object labels fail closed. Uninstalled publishers/subscribers use
DenyAllEventAuthz, never a dormant permit fallback.
Typed identity (v16 §10 / #1510): each check parses the topic-prefix
grammar exactly once at this boundary. Tenant-qualified internal map keys
(for example "5:tenantworker") are bookkeeping keys, not identities,
and must never cross this boundary. Confidential callers retain those keys
only for state lookup, while presenting the underlying Event prefix here.
Implementations§
Source§impl MacEventAuthz
impl MacEventAuthz
Sourcepub fn deny_scope(
&self,
subject: &Subject,
prefix: &str,
action: MoqEventAction,
) -> bool
pub fn deny_scope( &self, subject: &Subject, prefix: &str, action: MoqEventAction, ) -> bool
Service-specific ownership is independent of the MAC lattice floor.
pub fn new(pep: MoqEventPep) -> Self
Trait Implementations§
Source§impl EventAuthz for MacEventAuthz
impl EventAuthz for MacEventAuthz
Source§fn revalidate_publish<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Subject,
prefix: &'life2 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn revalidate_publish<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Subject,
prefix: &'life2 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Watchdog checks must consult current authority without sampling or
suppressing audits on actual attempted operations.
fn revalidate_subscribe<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Subject,
prefix: &'life2 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn can_publish<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Subject,
prefix: &'life2 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn can_publish<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Subject,
prefix: &'life2 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
May
caller publish to the group/prefix? Maps to the publish
ScopeAction.Source§fn can_subscribe<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Subject,
prefix: &'life2 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn can_subscribe<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Subject,
prefix: &'life2 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
May
caller subscribe to the group/prefix? Maps to the subscribe
ScopeAction.Source§fn can_join_decrypt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Subject,
prefix: &'life2 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn can_join_decrypt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Subject,
prefix: &'life2 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
May
caller receive an encrypted epoch key and decrypt this prefix?Source§fn admission_is_current(&self, _peer: &AdmittedMoqPeer) -> bool
fn admission_is_current(&self, _peer: &AdmittedMoqPeer) -> bool
Bind a verified carrier witness to the authority granting clearance.
Auto Trait Implementations§
impl Freeze for MacEventAuthz
impl !RefUnwindSafe for MacEventAuthz
impl Send for MacEventAuthz
impl Sync for MacEventAuthz
impl Unpin for MacEventAuthz
impl UnsafeUnpin for MacEventAuthz
impl !UnwindSafe for MacEventAuthz
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
§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>
Converts
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>
Converts
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more