java.lang.Object
com.couchbase.columnar.client.java.SecurityOptions

public final class SecurityOptions extends Object
  • Method Details Link icon

    • cipherSuites Link icon

      public SecurityOptions cipherSuites(List<String> cipherSuites)
      Parameters:
      cipherSuites - Names of the cipher suites to allow for TLS, or empty list to allow any suite supported by the runtime environment.
    • trustOnlyCapella Link icon

      public SecurityOptions trustOnlyCapella()
      Clears any existing trust settings, and tells the SDK to trust only the Capella CA certificates bundled with this SDK.

      This is the default trust setting.

    • trustOnlyPemFile Link icon

      public SecurityOptions trustOnlyPemFile(Path pemFile)
      Clears any existing trust settings, and tells the SDK to trust only the certificates in the specified PEM file.
    • trustOnlyPemString Link icon

      public SecurityOptions trustOnlyPemString(String pemEncodedCertificates)
      Clears any existing trust settings, and tells the SDK to trust only the PEM-encoded certificates contained in the given string.
    • trustOnlyCertificates Link icon

      public SecurityOptions trustOnlyCertificates(List<X509Certificate> certificates)
      Clears any existing trust settings, and tells the SDK to trust only the specified certificates.
    • trustOnlyJvm Link icon

      public SecurityOptions trustOnlyJvm()
      Clears any existing trust settings, and tells the SDK to trust only the certificates trusted by the Java runtime environment.
    • trustOnlyFactory Link icon

      public SecurityOptions trustOnlyFactory(TrustManagerFactory factory)
      Clears any existing trust settings, and tells the SDK to use the specified factory to verify server certificates.

      For advanced use cases only.

      See Also:
    • disableServerCertificateVerification Link icon

      @Deprecated public SecurityOptions disableServerCertificateVerification(boolean disable)
      Deprecated.
      Not really deprecated, but disabling verification is almost always a bad idea.
      Server certification verification is enabled by default. You can disable it by passing true to this method, but you almost certainly shouldn't. Instead, call one of the trust methods to tell the SDK which certificates it should trust.

      IMPORTANT: Disabling verification is insecure because it exposes you to on-path attacks. Never do this in production. In fact, you probably shouldn't do it anywhere.

      Parameters:
      disable - If true, the SDK does not verify the certificate presented by the server.
      See Also: