pub trait SubjectContextResolver: Send + Sync {
// Required method
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
) -> Pin<Box<dyn Future<Output = Option<SecurityContext>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Plane-specific clearance-input seam: resolve a direct-API Subject to the
verified SecurityContext that authorizes it.
This is the VFS-plane half of #698 (production clearance provenance).
The companion RPC-dispatch seam (claims → SecurityContext threading at
dispatch) is owned by #1268, which will publish its interface to
.fleet-coord/mac-pep-contract.md. Until that lands, this trait is the
plane-specific resolution point: a Subject (the only identity the direct
API carries — no verified EnvelopeContext crosses it) becomes a clearance
only through verified credential material this resolver consults.
Returning None is the mandatory fail-closed contract — a subject
whose clearance cannot be established from verified credential material
MUST NOT be authorized; there is no permissive default (#547).
Implementations MUST NOT derive clearance from an unverified,
caller-supplied label (D1 — labels in wire schemas are hints; here the
Subject name is even weaker: an unauthenticated string).
Async because the production resolver revalidates credential-bearing cached subject contexts against the canonical revocation authority on every read.
Required Methods§
Sourcefn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
) -> Pin<Box<dyn Future<Output = Option<SecurityContext>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
) -> Pin<Box<dyn Future<Output = Option<SecurityContext>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve subject to its verified security context, or None if its
clearance cannot be proven — which the PEP treats as deny.