Skip to main content

NinePClearanceSource

Trait NinePClearanceSource 

Source
pub trait NinePClearanceSource: Send + Sync {
    // Required method
    fn clearance_for(&self, verified_subject: &str) -> Option<SecurityContext>;
}
Expand description

Clearance provenance seam for the 9P MAC PEP (#698 dependency).

The production reference monitor derives a subject’s [SecurityContext`` from **verified attach credentials** — not from a caller-supplied label. Until #698 wires the real clearance-issuance path, the production impl resolves clearance from the compiled policy's enrollment table keyed by the verified subject DID ([EnrollmentClearanceSource]). An unenrolled DID or absent compiled policy resolves to None` → mandatory deny (there is no permissive default per #547).

This trait is the clean clearance-input seam the fleet-coordination contract asks each activation lane to expose: plane-specific label resolution and the clearance source are the two independent inputs the monitor needs, and this is the clearance one.

Required Methods§

Source

fn clearance_for(&self, verified_subject: &str) -> Option<SecurityContext>

Derive the verified subject’s clearance context from verified_subject (a DID or stable credential fingerprint obtained from verified attach material, never an unverified Tattach.uname string).

Returns None to deny — the monitor constructs SessionContext::deny or a token-less fail-closed session.

Implementors§