You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by je...@apache.org on 2019/04/30 18:09:02 UTC

[pulsar] branch master updated: WorkerService should inherit authentication configs from broker when running as part of the broker (#4172)

This is an automated email from the ASF dual-hosted git repository.

jerrypeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 436e4ba  WorkerService should inherit authentication configs from broker when running as part of the broker (#4172)
436e4ba is described below

commit 436e4ba2f24fc80fc870656bfa635d4a37872b6d
Author: Boyang Jerry Peng <je...@gmail.com>
AuthorDate: Tue Apr 30 11:08:55 2019 -0700

    WorkerService should inherit authentication configs from broker when running as part of the broker (#4172)
---
 pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java | 3 +++
 pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java    | 3 +++
 2 files changed, 6 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 346a3eb..bda08b2 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java
@@ -167,6 +167,9 @@ public class PulsarBrokerStarter {
                         + "-fw-" + hostname
                         + "-" + workerConfig.getWorkerPort());
                 // inherit broker authorization setting
+                workerConfig.setAuthenticationEnabled(brokerConfig.isAuthenticationEnabled());
+                workerConfig.setAuthenticationProviders(brokerConfig.getAuthenticationProviders());
+
                 workerConfig.setAuthorizationEnabled(brokerConfig.isAuthorizationEnabled());
                 workerConfig.setAuthorizationProvider(brokerConfig.getAuthorizationProvider());
                 workerConfig.setConfigurationStoreServers(brokerConfig.getConfigurationStoreServers());
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java
index 4acbc44..2ec79a0 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java
@@ -298,6 +298,9 @@ public class PulsarStandalone implements AutoCloseable {
                     + "-fw-" + hostname
                     + "-" + workerConfig.getWorkerPort());
             // inherit broker authorization setting
+            workerConfig.setAuthenticationEnabled(config.isAuthenticationEnabled());
+            workerConfig.setAuthenticationProviders(config.getAuthenticationProviders());
+
             workerConfig.setAuthorizationEnabled(config.isAuthorizationEnabled());
             workerConfig.setAuthorizationProvider(config.getAuthorizationProvider());
             workerConfig.setConfigurationStoreServers(config.getConfigurationStoreServers());