Skip to main content

EventAuthz

Trait EventAuthz 

Source
pub trait EventAuthz: Send + Sync {
    // Required methods
    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_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;

    // Provided methods
    fn admission_is_current(&self, _peer: &AdmittedMoqPeer) -> bool { ... }
    fn sources(&self) -> &[&str] { ... }
    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_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_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 { ... }
}
Expand description

The caller attempting an event-plane op (publish/subscribe). Carries the verified subject identity (a DID when available). Until #446 lands, IPC callers may resolve as anonymous — see PublisherIdentity.

Async because the MAC-backed adapter revalidates credential-bearing cached subject contexts against the canonical revocation authority on every check.

Required Methods§

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,

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,

May caller subscribe to the group/prefix? Maps to the subscribe ScopeAction.

Provided Methods§

Source

fn admission_is_current(&self, _peer: &AdmittedMoqPeer) -> bool

Bind a verified carrier witness to the authority granting clearance.

Source

fn sources(&self) -> &[&str]

Finite source inventory used at session admission. A held session only revalidates its acquired grants; adding scope requires new admission.

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,

Watchdog checks must consult current authority without sampling or suppressing audits on actual attempted operations.

Source

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_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?

Implementors§