You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/22 15:47:02 UTC
[GitHub] [pulsar] lhotari commented on a diff in pull request #14997: [feat][pulsar-io] ElasticSearch Sink: option to disable SSL certificate validation
lhotari commented on code in PR #14997:
URL: https://github.com/apache/pulsar/pull/14997#discussion_r856361426
##########
pulsar-io/elastic-search/src/main/java/org/apache/pulsar/io/elasticsearch/client/RestClient.java:
##########
@@ -172,6 +173,9 @@ private SSLContext buildSslContext(ElasticSearchConfig config) throws NoSuchAlgo
sslContextBuilder.loadTrustMaterial(new File(sslConfig.getTruststorePath()),
sslConfig.getTruststorePassword().toCharArray());
}
+ if (sslConfig.isDisableCertificateValidation()) {
+ sslContextBuilder.loadTrustMaterial(null, TrustAllStrategy.INSTANCE);
Review Comment:
Please add logging at warning level when certification validation is disabled. Please address this for hostnameVerification too if there's no logging currently.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org