Skip to main content

MacDispatchPep

Trait MacDispatchPep 

Source
pub trait MacDispatchPep: Send + Sync {
    // Required method
    fn check(
        &self,
        ctx: &EnvelopeContext,
        service_domain: &str,
        method: Option<&[u16]>,
    ) -> MacDecision;
}
Expand description

The mandatory, unavoidable RPC dispatch PEP for native MAC (epic #547, activation-gate T3, #1268).

Called by process_request after verify_claims and before handle_request. If the PEP returns MacDecision::Deny, the handler is never invoked — the error payload is signed and returned to the caller.

If no PEP is installed process-globally, the dispatch wrapper denies with MacDenyReason::NoPepInstalled. Once installed, this check remains mandatory and cannot be bypassed.

Required Methods§

Source

fn check( &self, ctx: &EnvelopeContext, service_domain: &str, method: Option<&[u16]>, ) -> MacDecision

Check mandatory MAC access before handler dispatch.

ctx — the verified envelope context. The PEP derives the subject clearance via EnvelopeContext::security_context (Claims × VerifiedKeyMaterial, S1 invariant). No schema change.

service_domain — the canonical service name being dispatched to. method — the full numeric method leaf path derived from the single decode of the signed request body, else None for opaque bodies.

Implementors§