pub struct PeerCapabilities {
pub auth_plugin_class: Option<String>,
pub crypto_plugin_class: Option<String>,
pub access_plugin_class: Option<String>,
pub supported_suites: Vec<SuiteHint>,
pub offered_protection: ProtectionLevel,
pub has_valid_cert: bool,
pub validity_window: Option<Validity>,
pub vendor_hint: Option<String>,
pub cert_cn: Option<String>,
pub delegation_chain: Option<DelegationChain>,
}Expand description
Security-relevant capabilities of a remote peer.
Populated from SPDP properties (auth/crypto/access plugin class,
zerodds.sec.supported_suites, zerodds.sec.offered_protection)
as well as from SEDP permissions tokens. Legacy peers without
security properties land here with auth_plugin_class=None —
no drop, the crate::PolicyEngine decides per
domain rule whether legacy is accepted.
All fields are Option/Vec-based so that partial updates
(upgrade path in §4.3 of the architecture doc) are cleanly possible.
Fields§
§auth_plugin_class: Option<String>DDS:Auth:PKI-DH:1.2 (spec 1.2 §10.3.2.1) etc. None = legacy
peer without an auth plugin.
crypto_plugin_class: Option<String>DDS:Crypto:AES-GCM-GMAC:1.2 (spec 1.2 §10.5) etc.
access_plugin_class: Option<String>DDS:Access:Permissions:1.2 (spec 1.2 §10.4) etc.
supported_suites: Vec<SuiteHint>Suites the peer would accept according to its SPDP announce.
offered_protection: ProtectionLevelProtection level the peer itself offers.
has_valid_cert: booltrue if the cert chain + OCSP were checked and ok — set by the
authentication plugin, not from SPDP.
validity_window: Option<Validity>Validity window from the permissions token.
vendor_hint: Option<String>Vendor identification (e.g. "Cyclone DDS", "Fast DDS")
for quirks.
cert_cn: Option<String>Subject common name from the peer cert (e.g.
"writer1.fast.example"). Set by the authentication plugin after
a successful handshake; not propagated via SPDP.
Used for <zerodds:peer_class><match cert_cn_pattern=...>
.
delegation_chain: Option<DelegationChain>Delegation chain. Propagated by the edge or sub-gateway
via the SPDP property zerodds.sec.delegation_chain.
Validation against a delegation profile happens in
peer_matches_class (j-d). None = peer without a chain (= directly
authenticated peer or legacy).
Implementations§
Source§impl PeerCapabilities
impl PeerCapabilities
Sourcepub fn merge_update(&mut self, other: &PeerCapabilities)
pub fn merge_update(&mut self, other: &PeerCapabilities)
Merges non-empty fields from other into self. Empty fields
(None, []) stay unchanged — so multiple
partial SPDP updates are idempotent and order-tolerant.
Special rules:
offered_protectionis always taken over (monotonically increasing viaProtectionLevel::stronger) — a peer can upgrade its level but not silently downgrade it.has_valid_cert=trueis sticky: once validated, it cannot fall back tofalse(cert rotation requires an explicitPeerCache::forget).
Trait Implementations§
Source§impl Clone for PeerCapabilities
impl Clone for PeerCapabilities
Source§fn clone(&self) -> PeerCapabilities
fn clone(&self) -> PeerCapabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PeerCapabilities
impl Debug for PeerCapabilities
Source§impl Default for PeerCapabilities
impl Default for PeerCapabilities
Source§fn default() -> PeerCapabilities
fn default() -> PeerCapabilities
impl Eq for PeerCapabilities
Source§impl PartialEq for PeerCapabilities
impl PartialEq for PeerCapabilities
Source§fn eq(&self, other: &PeerCapabilities) -> bool
fn eq(&self, other: &PeerCapabilities) -> bool
self and other values to be equal, and is used by ==.