Class TlsAdvancedConfiguration
- java.lang.Object
-
- glide.api.models.configuration.TlsAdvancedConfiguration
-
public class TlsAdvancedConfiguration extends java.lang.ObjectAdvanced TLS configuration settings class for creating a client. Shared settings for standalone and cluster clients.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTlsAdvancedConfiguration.TlsAdvancedConfigurationBuilder<C extends TlsAdvancedConfiguration,B extends TlsAdvancedConfiguration.TlsAdvancedConfigurationBuilder<C,B>>
-
Constructor Summary
Constructors Modifier Constructor Description protectedTlsAdvancedConfiguration(TlsAdvancedConfiguration.TlsAdvancedConfigurationBuilder<?,?> b)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TlsAdvancedConfiguration.TlsAdvancedConfigurationBuilder<?,?>builder()static TlsAdvancedConfigurationfromKeyStore(java.lang.String keyStorePath, char[] keyStorePassword, java.lang.String keyStoreType)Create TlsAdvancedConfiguration from a Java KeyStore file.byte[]getRootCertificates()Custom root certificate data for TLS connections.booleanisUseInsecureTLS()Whether to bypass TLS certificate verification.
-
-
-
Constructor Detail
-
TlsAdvancedConfiguration
protected TlsAdvancedConfiguration(TlsAdvancedConfiguration.TlsAdvancedConfigurationBuilder<?,?> b)
-
-
Method Detail
-
fromKeyStore
public static TlsAdvancedConfiguration fromKeyStore(java.lang.String keyStorePath, char[] keyStorePassword, java.lang.String keyStoreType) throws java.security.KeyStoreException, java.io.IOException, java.security.NoSuchAlgorithmException, java.security.cert.CertificateException
Create TlsAdvancedConfiguration from a Java KeyStore file.- Parameters:
keyStorePath- Path to the KeyStore filekeyStorePassword- Password for the KeyStorekeyStoreType- KeyStore type (e.g., "JKS", "PKCS12")- Returns:
- TlsAdvancedConfiguration with certificates from KeyStore
- Throws:
java.security.KeyStoreException- if KeyStore type is not supported or KeyStore cannot be accessedjava.io.IOException- if KeyStore file cannot be readjava.security.NoSuchAlgorithmException- if integrity check algorithm is not availablejava.security.cert.CertificateException- if certificates cannot be loaded or encoded
-
builder
public static TlsAdvancedConfiguration.TlsAdvancedConfigurationBuilder<?,?> builder()
-
isUseInsecureTLS
public boolean isUseInsecureTLS()
Whether to bypass TLS certificate verification.When set to True, the client skips certificate validation. This is useful when connecting to servers or clusters using self-signed certificates, or when DNS entries (e.g., CNAMEs) don't match certificate hostnames.
This setting is typically used in development or testing environments. It is strongly discouraged in production, as it introduces security risks such as man-in-the-middle attacks.
Only valid if TLS is already enabled in the base client configuration. Enabling it without TLS will result in a `ConfigurationError`.
Default: False (verification is enforced).
-
getRootCertificates
public byte[] getRootCertificates()
Custom root certificate data for TLS connections.When provided, these certificates will be used instead of the system's default trust store. If null, the system's default certificate trust store will be used.
The certificate data should be in PEM format as a byte array.
-
-