reta commented on code in PR #91:
URL:
https://github.com/apache/flink-connector-elasticsearch/pull/91#discussion_r1574279683
##########
flink-connector-elasticsearch-base/src/main/java/org/apache/flink/connector/elasticsearch/sink/ElasticsearchSinkBuilderBase.java:
##########
@@ -263,6 +271,41 @@ public B setSocketTimeout(int timeout) {
return self();
}
+ /**
+ * Allows to bypass the certificates chain validation and connect to
insecure network endpoints
+ * (for example, servers which use self-signed certificates).
+ *
+ * @param allowInsecure allow or not to insecure network endpoints
+ * @return this builder
+ */
+ public B setAllowInsecure(boolean allowInsecure) {
+ this.allowInsecure = allowInsecure;
+ return self();
Review Comment:
Since there is overlap between this setting and suppliers, you may just rely
on SSL context supplier here:
```
this.allowInsecure = allowInsecure;
if (this.allowInsecure) {
return
setSslContextSupplier(SSLContexts.custom().loadTrustMaterial(TrustAllStrategy.INSTANCE)::build);
}
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]