jiazhai commented on a change in pull request #6128: Fix broker client tls
settings error
URL: https://github.com/apache/pulsar/pull/6128#discussion_r372879251
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
##########
@@ -873,12 +873,16 @@ public synchronized PulsarClient getClient() throws
PulsarServerException {
ClientBuilder builder = PulsarClient.builder()
.serviceUrl(this.getConfiguration().isTlsEnabled()
? this.brokerServiceUrlTls :
this.brokerServiceUrl)
- .enableTls(this.getConfiguration().isTlsEnabled())
-
.allowTlsInsecureConnection(this.getConfiguration().isTlsAllowInsecureConnection())
-
.tlsTrustCertsFilePath(this.getConfiguration().getTlsCertificateFilePath());
+ .enableTls(this.getConfiguration().isTlsEnabled());
+
+ if (this.getConfiguration().isBrokerClientTlsEnabled()) {
+
builder.allowTlsInsecureConnection(this.getConfiguration().isTlsAllowInsecureConnection());
+
builder.tlsTrustCertsFilePath(this.getConfiguration().getBrokerClientTrustCertsFilePath());
Review comment:
@ivankelly, Thanks. A user meet this issue in their environment. As you
mentioned, the content of path for the 2 configs could be the same, but we
should provide the ability for user to set it differently. All the auth logic
is the same for internal client, in all the admin-client and the
replicator-client, it is all set as this change, this is the only place that is
not align.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services