Skip to main content

PeerCapabilities

Struct PeerCapabilities 

Source
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: ProtectionLevel

Protection level the peer itself offers.

§has_valid_cert: bool

true 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

Source

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_protection is always taken over (monotonically increasing via ProtectionLevel::stronger) — a peer can upgrade its level but not silently downgrade it.
  • has_valid_cert=true is sticky: once validated, it cannot fall back to false (cert rotation requires an explicit PeerCache::forget).

Trait Implementations§

Source§

impl Clone for PeerCapabilities

Source§

fn clone(&self) -> PeerCapabilities

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PeerCapabilities

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PeerCapabilities

Source§

fn default() -> PeerCapabilities

Returns the “default value” for a type. Read more
Source§

impl Eq for PeerCapabilities

Source§

impl PartialEq for PeerCapabilities

Source§

fn eq(&self, other: &PeerCapabilities) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for PeerCapabilities

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.