Skip to main content

CasClearanceSource

Trait CasClearanceSource 

Source
pub trait CasClearanceSource: Send + Sync {
    // Required method
    fn clearance_for<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        subject_id: &'life1 str,
        verified_tenant: Option<&'life2 str>,
    ) -> Pin<Box<dyn Future<Output = Option<SecurityContext>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Resolve a verified subject identity to a MAC SecurityContext for CAS access.

The CAS PEP calls CasClearanceSource::clearance_for with the verified subject and tenant binding (extracted from EnvelopeContext or an equivalent verified HTTP identity) and receives a SecurityContext — never a caller-supplied clearance.

None ⇒ unresolvable ⇒ the PEP MUST deny. Implementors must NOT manufacture a permissive default.

The #698 clearance primitives are available, but until a CAS-specific adapter is installed DenyAllClearanceSource returns None for every subject.

Async because the production source revalidates credential-bearing cache entries against the canonical revocation authority on every read.

Required Methods§

Source

fn clearance_for<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, subject_id: &'life1 str, verified_tenant: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Option<SecurityContext>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Resolve subject_id to its MAC clearance, or None if unresolvable.

Implementors§