From a52e9af9ddfeb90c129a77969c60f6da38281e9d Mon Sep 17 00:00:00 2001 From: Fangbin Sun Date: Wed, 12 Jun 2019 02:15:07 +0800 Subject: [PATCH] Add function worker client auth config in cluster. (#4499) --- .../java/org/apache/pulsar/PulsarBrokerStarter.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java index 4502ea29212f7..19570f51c1a64 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java @@ -188,6 +188,16 @@ private static class BrokerStarter { workerConfig.setZooKeeperSessionTimeoutMillis(brokerConfig.getZooKeeperSessionTimeoutMillis()); workerConfig.setZooKeeperOperationTimeoutSeconds(brokerConfig.getZooKeeperOperationTimeoutSeconds()); + workerConfig.setUseTls(brokerConfig.isTlsEnabled()); + workerConfig.setTlsHostnameVerificationEnable(false); + + workerConfig.setTlsAllowInsecureConnection(brokerConfig.isTlsAllowInsecureConnection()); + workerConfig.setTlsTrustCertsFilePath(brokerConfig.getTlsTrustCertsFilePath()); + + // client in worker will use this config to authenticate with broker + workerConfig.setClientAuthenticationPlugin(brokerConfig.getBrokerClientAuthenticationPlugin()); + workerConfig.setClientAuthenticationParameters(brokerConfig.getBrokerClientAuthenticationParameters()); + // inherit super users workerConfig.setSuperUserRoles(brokerConfig.getSuperUserRoles());