pub struct TrustPolicy { /* private fields */ }Expand description
The set of public keys the operator trusts to sign filters (ADR 000006 provenance). A
filter loads only if a trusted key verifies BOTH its component signature and its SBOM
signature (keyed cosign, offline — no Fulcio / Rekor / network). An empty policy
trusts no one, so nothing loads: deny-by-default / fail-closed, with no “allow unsigned”
escape hatch in the production API. The keys live on the Host, not on each load call,
so the operator manages one trust root.
This gates whether a filter may load at all. It deliberately does NOT pick the filter’s
Isolation (trusted/untrusted lifecycle) — a valid signature from a third party’s key is
still untrusted code. Mapping signer identity to isolation is left to the declarative
manifest (ADR 000007); here, isolation stays the caller’s explicit LoadOptions choice.
Implementations§
Source§impl TrustPolicy
impl TrustPolicy
Sourcepub fn from_pem_keys<I, B>(pems: I) -> Result<Self>
pub fn from_pem_keys<I, B>(pems: I) -> Result<Self>
Trust the given public keys (SPKI PEM). The key type is auto-detected — cosign’s default is ECDSA P-256; P-256 / Ed25519 / RSA cosign keys are all accepted.
Auto Trait Implementations§
impl Freeze for TrustPolicy
impl RefUnwindSafe for TrustPolicy
impl Send for TrustPolicy
impl Sync for TrustPolicy
impl Unpin for TrustPolicy
impl UnsafeUnpin for TrustPolicy
impl UnwindSafe for TrustPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more