YugabyteDB TLS connections accept revoked certificates: no revocation-check option in client drivers
0 reputation · 13 May 2025, 20:12 UTC
0 reputation · 13 May 2025, 20:12 UTC
I need to enforce certificate revocation checking (CRL or OCSP) for TLS connections to a YugabyteDB cluster, covering both client-to-node and ideally inter-node traffic. The drivers expose ca_file, cert_file, and key_file style parameters, but I cannot find any documented flag to enable revocation validation.
Public documentation describes revocation support as planned, without a release timeline or configuration details. TLS handling is implemented separately in the Java and Go drivers, so behavior may differ between them. My environment issues short-lived certificates from an internal CA, so a compromised or superseded certificate being silently accepted is a real security concern, not a theoretical one.
Separately, nodes occasionally move to new IPs after restarts, and I am unsure whether driver DNS resolution behavior (TTL handling, caching) interacts with TLS re-validation in a way that changes when certificates are re-checked.
Is there any supported way in current YugabyteDB releases (assume 2.20+ / 2024.x) to make the Java or Go driver reject a revoked certificate, via CRL or OCSP, or is the only option an external TLS-terminating proxy?
Does the absence of revocation checking also apply to inter-node replication TLS, and is there a documented hardening workaround?
Do the Java and Go drivers differ in DNS TTL handling after node IP changes, and where is that behavior documented?
31775 reputation · 14 May 2025, 05:05 UTC
As of YugabyteDB 2.20+/2024.x releases, neither the Java nor the Go client driver exposes a dedicated flag to enable CRL or OCSP revocation checking. Revocation validation must be handled by the underlying TLS library or by the application itself.
-Dcom.sun.net.ssl.checkRevocation=true enables both CRL and OCSP checks.-Dcom.sun.net.ssl.enableOcsp=true and -Dcom.sun.net.ssl.ocsp.responder=URL) or provide a CRL file through the standard Java security properties.crypto/tls package, which does not perform CRL/OCSP verification by default.VerifyPeerCertificate function in tls.Config that checks the certificate chain against an OCSP responder or CRL.--use_node_to_node_encryption, --certs_dir) for replication traffic.SSL_CTX_set_verify with a verification callback, which YugabyteDB does not expose.networkaddress.cache.ttl (e.g., to 60 seconds). Changes to a node’s A record will not be seen until the cache expires.-Dcom.sun.net.ssl.checkRevocation=true and point to a valid OCSP responder. Attempt a TLS connection using a certificate that has been revoked; the handshake should fail with a PKIX error.tls.Config.VerifyPeerCertificate to perform OCSP/CRL checks, then connect with a revoked cert; expect an error from the handshake.export SSL_DEBUG=1) on a YB‑TSERVER, restart with a revoked server certificate, and observe whether the TLS handshake proceeds; absence of failure indicates no revocation check.Do you have the ability to set JVM system properties or modify the Go driver code (e.g., add a custom VerifyPeerCertificate)? If not, the only practical workaround is to terminate TLS externally (e.g., with a load balancer or sidecar proxy) that performs revocation checking.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.