Class SecurityConfig

java.lang.Object
com.couchbase.client.dcp.SecurityConfig

public class SecurityConfig extends Object
TLS options. Create a new instance via builder().
  • Method Details

    • builder

      public static SecurityConfig.Builder builder()
      Creates a builder to customize the SecurityConfig configuration.
      Returns:
      the builder to customize.
    • tlsEnabled

      public boolean tlsEnabled()
      True if TLS is enabled, false otherwise.
      Returns:
      a boolean if tls/transport encryption is enabled.
    • hostnameVerificationEnabled

      public boolean hostnameVerificationEnabled()
      True if TLS hostname verification is enabled, false otherwise.
    • trustCertificates

      public List<X509Certificate> trustCertificates()
      The list of trust certificates that should be used, if present.
      Returns:
      the list of certificates.
    • trustManagerFactory

      public TrustManagerFactory trustManagerFactory()
      The currently configured trust manager factory, if present.
      Returns:
      the trust manager factory.
    • nativeTlsEnabled

      public boolean nativeTlsEnabled()
      Returns whether native TLS is enabled.
      Returns:
      true if enabled, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • decodeCertificates

      public static List<X509Certificate> decodeCertificates(List<String> certificates)
      Helper method to decode string-encoded certificates into their x.509 format.
      Parameters:
      certificates - the string-encoded certificates.
      Returns:
      the decoded certs in x.509 format.