Skip to main content

RpcObjectLabelResolver

Trait RpcObjectLabelResolver 

pub trait RpcObjectLabelResolver: Send + Sync {
    // Required method
    fn resolve(
        &self,
        service_domain: &str,
        method: Option<&[u16]>,
    ) -> Option<SecurityLabel>;
}
Expand description

Resolve the trusted SecurityLabel for the concrete object a dispatching RPC acts on.

None ⇒ unlabeled ⇒ the PEP denies (D2/D3 — objects deny/clamp, never default-allow). Implementors must NOT manufacture a permissive default.

service_domain is the canonical service name (“model”, “registry”, …). method is the full numeric method leaf path derived from the ONE decode of the signed request body (v16 §5.1) — the same identity the generated method policy resolved — else None when the dispatching service has no Cap’n Proto request schema (opaque bodies).

Production implementations will map static schema nodes (S3, #569) and content-addressed manifests to labels. The default implementation ([DenyAllObjectResolver]) returns None for everything — fail-closed.

Required Methods§

fn resolve( &self, service_domain: &str, method: Option<&[u16]>, ) -> Option<SecurityLabel>

Implementors§

Source§

impl RpcObjectLabelResolver for DenyUnlabeledResolver

Available on non-WebAssembly only.
§

impl RpcObjectLabelResolver for DenyAllObjectResolver