#[non_exhaustive]pub enum CardTrustPolicy {
Ignore,
Prefer,
Require,
}Expand description
Trust policy for peer AgentCard signature + URL-origin verification during A2A
discovery (A2A 1.0.0 §8.4, #5928).
Mirrors zeph_a2a::discovery::CardTrustPolicy (protocol-crate-facing) as an
independent type — zeph-config must not depend on protocol crates, the same reason
McpTrustLevel has no zeph-mcp counterpart dependency. Conversion happens in the
top-level zeph binary crate (src/tui_remote.rs::convert_card_trust_policy), which
constructs the AgentRegistry used before zeph --connect <URL> establishes an A2A
session (#6200).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ignore
Discover peer cards without checking signatures or URL origin. Default — byte-identical to pre-#5928 behavior.
Prefer
Log a warning on an untrusted/unverifiable card or URL-origin mismatch, but still
accept it; reject only an actively tampered signature. Recommended production
setting once real-peer interop is proven (see zeph-a2a::card_signing module docs).
Require
Reject any card with an unverifiable signature or a URL-origin mismatch.
Requires the card-signing feature to be compiled in — Config::validate
rejects this setting at config-load time otherwise, rather than allowing it to
silently degrade or brick discovery at runtime.
Trait Implementations§
Source§impl Clone for CardTrustPolicy
impl Clone for CardTrustPolicy
Source§fn clone(&self) -> CardTrustPolicy
fn clone(&self) -> CardTrustPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CardTrustPolicy
Source§impl Debug for CardTrustPolicy
impl Debug for CardTrustPolicy
Source§impl Default for CardTrustPolicy
impl Default for CardTrustPolicy
Source§fn default() -> CardTrustPolicy
fn default() -> CardTrustPolicy
Source§impl<'de> Deserialize<'de> for CardTrustPolicy
impl<'de> Deserialize<'de> for CardTrustPolicy
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CardTrustPolicy, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CardTrustPolicy, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for CardTrustPolicy
Source§impl PartialEq for CardTrustPolicy
impl PartialEq for CardTrustPolicy
Source§impl Serialize for CardTrustPolicy
impl Serialize for CardTrustPolicy
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for CardTrustPolicy
Auto Trait Implementations§
impl Freeze for CardTrustPolicy
impl RefUnwindSafe for CardTrustPolicy
impl Send for CardTrustPolicy
impl Sync for CardTrustPolicy
impl Unpin for CardTrustPolicy
impl UnsafeUnpin for CardTrustPolicy
impl UnwindSafe for CardTrustPolicy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request