#[non_exhaustive]pub struct TlsConfig {
pub trust_config: Option<TrustConfig>,
pub ssl_principal_mapping_rules: String,
/* private fields */
}Expand description
The TLS configuration for the Kafka cluster.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.trust_config: Option<TrustConfig>Optional. The configuration of the broker truststore. If specified, clients can use mTLS for authentication.
ssl_principal_mapping_rules: StringOptional. A list of rules for mapping from SSL principal names to
short names. These are applied in order by Kafka.
Refer to the Apache Kafka documentation for ssl.principal.mapping.rules
for the precise formatting details and syntax.
Example: “RULE:^CN=(.?),OU=ServiceUsers.$/$1@example.com/,DEFAULT”
This is a static Kafka broker configuration. Setting or modifying this field will trigger a rolling restart of the Kafka brokers to apply the change. An empty string means no rules are applied (Kafka default).
Implementations§
Source§impl TlsConfig
impl TlsConfig
pub fn new() -> Self
Sourcepub fn set_trust_config<T>(self, v: T) -> Selfwhere
T: Into<TrustConfig>,
pub fn set_trust_config<T>(self, v: T) -> Selfwhere
T: Into<TrustConfig>,
Sets the value of trust_config.
Sourcepub fn set_or_clear_trust_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<TrustConfig>,
pub fn set_or_clear_trust_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<TrustConfig>,
Sets or clears the value of trust_config.
Sourcepub fn set_ssl_principal_mapping_rules<T: Into<String>>(self, v: T) -> Self
pub fn set_ssl_principal_mapping_rules<T: Into<String>>(self, v: T) -> Self
Sets the value of ssl_principal_mapping_rules.