Class TlsAdvancedConfiguration


  • public class TlsAdvancedConfiguration
    extends java.lang.Object
    Advanced TLS configuration settings class for creating a client. Shared settings for standalone and cluster clients.
    • 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 file
        keyStorePassword - Password for the KeyStore
        keyStoreType - 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 accessed
        java.io.IOException - if KeyStore file cannot be read
        java.security.NoSuchAlgorithmException - if integrity check algorithm is not available
        java.security.cert.CertificateException - if certificates cannot be loaded or encoded
      • 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.