pub struct SecurityConfig { /* private fields */ }Expand description
Builder for DDS Security configuration.
Security is enabled by setting specific QoS properties that tell CycloneDDS which plugins to load and where to find certificates, keys, and policy files.
Implementations§
Source§impl SecurityConfig
impl SecurityConfig
Sourcepub fn identity_ca(self, path: impl Into<String>) -> Self
pub fn identity_ca(self, path: impl Into<String>) -> Self
Path to the Identity CA certificate (PEM).
Sourcepub fn identity_certificate(self, path: impl Into<String>) -> Self
pub fn identity_certificate(self, path: impl Into<String>) -> Self
Path to the participant identity certificate (PEM).
Sourcepub fn identity_private_key(self, path: impl Into<String>) -> Self
pub fn identity_private_key(self, path: impl Into<String>) -> Self
Path to the participant identity private key (PEM).
Sourcepub fn governance(self, path: impl Into<String>) -> Self
pub fn governance(self, path: impl Into<String>) -> Self
Path to the Governance XML document.
Sourcepub fn permissions(self, path: impl Into<String>) -> Self
pub fn permissions(self, path: impl Into<String>) -> Self
Path to the Permissions XML document.
Sourcepub fn permissions_ca(self, path: impl Into<String>) -> Self
pub fn permissions_ca(self, path: impl Into<String>) -> Self
Path to the Permissions CA certificate (PEM).
Sourcepub fn crl(self, path: impl Into<String>) -> Self
pub fn crl(self, path: impl Into<String>) -> Self
Path to the Certificate Revocation List (CRL) in PEM format.
Sourcepub fn auth_plugin(self, name: impl Into<String>) -> Self
pub fn auth_plugin(self, name: impl Into<String>) -> Self
Override the authentication plugin name (default: dds.sec.auth.builtin.PKI-DH).
Sourcepub fn access_plugin(self, name: impl Into<String>) -> Self
pub fn access_plugin(self, name: impl Into<String>) -> Self
Override the access-control plugin name (default: dds.sec.access.builtin.Access-Permissions).
Sourcepub fn crypto_plugin(self, name: impl Into<String>) -> Self
pub fn crypto_plugin(self, name: impl Into<String>) -> Self
Override the cryptography plugin name (default: dds.sec.crypto.builtin.AES-GCM-GMAC).
Sourcepub fn validate(&self) -> DdsResult<()>
pub fn validate(&self) -> DdsResult<()>
Validate that all configured certificate and policy files exist and appear to be valid PEM documents.
Returns Ok(()) if all configured files are present and readable,
or Err with a description of the first problem found.
Sourcepub fn reload(&self) -> Self
pub fn reload(&self) -> Self
Create a new SecurityConfig with the same settings.
This is a semantic wrapper for certificate hot-reload workflows:
after updating certificate files on disk, call reload() and then
validate() before recreating the DomainParticipant.
Sourcepub fn apply_to(self, builder: QosBuilder) -> QosBuilder
pub fn apply_to(self, builder: QosBuilder) -> QosBuilder
Apply this security configuration to a QosBuilder.
Trait Implementations§
Source§impl Clone for SecurityConfig
impl Clone for SecurityConfig
Source§impl Debug for SecurityConfig
impl Debug for SecurityConfig
Auto Trait Implementations§
impl Freeze for SecurityConfig
impl RefUnwindSafe for SecurityConfig
impl Send for SecurityConfig
impl Sync for SecurityConfig
impl Unpin for SecurityConfig
impl UnsafeUnpin for SecurityConfig
impl UnwindSafe for SecurityConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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