Class SecurityOptions
java.lang.Object
com.couchbase.columnar.client.java.SecurityOptions
-
Method Summary
Modifier and TypeMethodDescriptioncipherSuites
(List<String> cipherSuites) disableServerCertificateVerification
(boolean disable) Deprecated.Not really deprecated, but disabling verification is almost always a bad idea.Clears any existing trust settings, and tells the SDK to trust only the Capella CA certificates bundled with this SDK.trustOnlyCertificates
(List<X509Certificate> certificates) Clears any existing trust settings, and tells the SDK to trust only the specified certificates.trustOnlyFactory
(TrustManagerFactory factory) Clears any existing trust settings, and tells the SDK to use the specified factory to verify server certificates.Clears any existing trust settings, and tells the SDK to trust only the certificates trusted by the Java runtime environment.trustOnlyPemFile
(Path pemFile) Clears any existing trust settings, and tells the SDK to trust only the certificates in the specified PEM file.trustOnlyPemString
(String pemEncodedCertificates) Clears any existing trust settings, and tells the SDK to trust only the PEM-encoded certificates contained in the given string.
-
Method Details
-
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
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
Clears any existing trust settings, and tells the SDK to trust only the certificates in the specified PEM file. -
trustOnlyPemString
Clears any existing trust settings, and tells the SDK to trust only the PEM-encoded certificates contained in the given string. -
trustOnlyCertificates
Clears any existing trust settings, and tells the SDK to trust only the specified certificates. -
trustOnlyJvm
Clears any existing trust settings, and tells the SDK to trust only the certificates trusted by the Java runtime environment. -
trustOnlyFactory
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
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 thetrust
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:
-