Class ConfluentTrustManager
java.lang.Object
javax.net.ssl.X509ExtendedTrustManager
io.confluent.kafka.client.plugins.ssl.ConfluentTrustManager
- All Implemented Interfaces:
TrustManager,X509TrustManager
- Direct Known Subclasses:
NetworkLinkTrustManager
A trust manager that verifies that the client invalid input: '&' server certificate presented during
clientAuth belongs to confluent cloud and then delegates to the
defaultTrustManager for general certificate chain validation. It first verifies that
the subjectAltName is CCloud host and if missing it verifies the subject
belongs to confluent cloud.-
Constructor Summary
ConstructorsConstructorDescriptionConfluentTrustManager(Map<String, ?> configs, X509ExtendedTrustManager defaultTrustManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckClientTrusted(X509Certificate[] x509Certificates, String authType) voidcheckClientTrusted(X509Certificate[] x509Certificates, String authType, Socket socket) voidcheckClientTrusted(X509Certificate[] x509Certificates, String authType, SSLEngine sslEngine) voidcheckServerTrusted(X509Certificate[] x509Certificates, String authType) voidcheckServerTrusted(X509Certificate[] x509Certificates, String authType, Socket socket) voidcheckServerTrusted(X509Certificate[] x509Certificates, String authType, SSLEngine sslEngine) booleanverifyClientCerts(X509Certificate[] x509Certificates) booleanverifyServerCerts(X509Certificate[] x509Certificates)
-
Constructor Details
-
ConfluentTrustManager
-
-
Method Details
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] x509Certificates, String authType, Socket socket) throws CertificateException - Specified by:
checkClientTrustedin classX509ExtendedTrustManager- Throws:
CertificateException
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] x509Certificates, String authType, Socket socket) throws CertificateException - Specified by:
checkServerTrustedin classX509ExtendedTrustManager- Throws:
CertificateException
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] x509Certificates, String authType, SSLEngine sslEngine) throws CertificateException - Specified by:
checkClientTrustedin classX509ExtendedTrustManager- Throws:
CertificateException
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] x509Certificates, String authType, SSLEngine sslEngine) throws CertificateException - Specified by:
checkServerTrustedin classX509ExtendedTrustManager- Throws:
CertificateException
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] x509Certificates, String authType) throws CertificateException - Throws:
CertificateException
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] x509Certificates, String authType) throws CertificateException - Throws:
CertificateException
-
getAcceptedIssuers
-
verifyClientCerts
- Throws:
CertificateException
-
verifyServerCerts
- Throws:
CertificateException
-