Skip to main content

SslConfigs

Struct SslConfigs 

Source
#[non_exhaustive]
pub struct SslConfigs { /* private fields */ }
Expand description

SSL/TLS configuration for Kafka connections.

Translated from org.apache.kafka.common.config.SslConfigs. The Java class hosts only the ssl.* config keys and defaults; the values themselves travel in the Map<String, ?> handed to SslFactory.configure. The Rust struct keeps Java’s name and constants, and additionally holds the client-relevant subset of those values, parsed once from the client config properties. The fields are crate-private: callers set them through the ssl.* properties of a client config, as a Java caller does.

Java defaults to JKS keystores; Rust/rustls works natively with PEM, so truststore_type and keystore_type default to "PEM".

Implementations§

Source§

impl SslConfigs

Source

pub const SSL_PROTOCOL_CONFIG: &str = "ssl.protocol"

Config key: ssl.protocol.

Source

pub const DEFAULT_SSL_PROTOCOL: &str = "TLSv1.3"

Default SSL protocol.

Source

pub const SSL_PROVIDER_CONFIG: &str = "ssl.provider"

Config key: ssl.provider.

Source

pub const SSL_CIPHER_SUITES_CONFIG: &str = "ssl.cipher.suites"

Config key: ssl.cipher.suites.

Source

pub const SSL_ENABLED_PROTOCOLS_CONFIG: &str = "ssl.enabled.protocols"

Config key: ssl.enabled.protocols.

Source

pub const DEFAULT_SSL_ENABLED_PROTOCOLS: &str = "TLSv1.2,TLSv1.3"

Default enabled SSL protocols.

Source

pub const SSL_KEYSTORE_TYPE_CONFIG: &str = "ssl.keystore.type"

Config key: ssl.keystore.type.

Source

pub const DEFAULT_SSL_KEYSTORE_TYPE: &str = "JKS"

Default keystore type in Java. Rust defaults to PEM (see SslConfigs::default).

Source

pub const SSL_KEYSTORE_KEY_CONFIG: &str = "ssl.keystore.key"

Config key: ssl.keystore.key.

Source

pub const SSL_KEYSTORE_CERTIFICATE_CHAIN_CONFIG: &str = "ssl.keystore.certificate.chain"

Config key: ssl.keystore.certificate.chain.

Source

pub const SSL_TRUSTSTORE_CERTIFICATES_CONFIG: &str = "ssl.truststore.certificates"

Config key: ssl.truststore.certificates.

Source

pub const SSL_KEYSTORE_LOCATION_CONFIG: &str = "ssl.keystore.location"

Config key: ssl.keystore.location.

Source

pub const SSL_KEYSTORE_PASSWORD_CONFIG: &str = "ssl.keystore.password"

Config key: ssl.keystore.password.

Source

pub const SSL_KEY_PASSWORD_CONFIG: &str = "ssl.key.password"

Config key: ssl.key.password.

Source

pub const SSL_TRUSTSTORE_TYPE_CONFIG: &str = "ssl.truststore.type"

Config key: ssl.truststore.type.

Source

pub const DEFAULT_SSL_TRUSTSTORE_TYPE: &str = "JKS"

Default truststore type in Java. Rust defaults to PEM (see SslConfigs::default).

Source

pub const SSL_TRUSTSTORE_LOCATION_CONFIG: &str = "ssl.truststore.location"

Config key: ssl.truststore.location.

Source

pub const SSL_TRUSTSTORE_PASSWORD_CONFIG: &str = "ssl.truststore.password"

Config key: ssl.truststore.password.

Source

pub const SSL_KEYMANAGER_ALGORITHM_CONFIG: &str = "ssl.keymanager.algorithm"

Config key: ssl.keymanager.algorithm.

Source

pub const SSL_TRUSTMANAGER_ALGORITHM_CONFIG: &str = "ssl.trustmanager.algorithm"

Config key: ssl.trustmanager.algorithm.

Source

pub const SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG: &str = "ssl.endpoint.identification.algorithm"

Config key: ssl.endpoint.identification.algorithm.

Source

pub const DEFAULT_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM: &str = "https"

Default endpoint identification algorithm (enables hostname verification).

Source

pub const SSL_SECURE_RANDOM_IMPLEMENTATION_CONFIG: &str = "ssl.secure.random.implementation"

Config key: ssl.secure.random.implementation.

Trait Implementations§

Source§

impl Clone for SslConfigs

Source§

fn clone(&self) -> SslConfigs

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SslConfigs

Source§

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

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

impl Default for SslConfigs

Source§

fn default() -> Self

Returns an SslConfigs with sensible defaults for Rust/rustls:

  • PEM format for both truststore and keystore
  • TLSv1.2 and TLSv1.3 enabled
  • "https" endpoint identification (hostname verification enabled)
  • All optional paths/passwords are None
Source§

impl PartialEq for SslConfigs

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 Eq for SslConfigs

Source§

impl StructuralPartialEq for SslConfigs

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
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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> 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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V