Skip to content

Commit

Permalink
YARN-11468. Zookeeper SSL/TLS support
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdelyi committed Sep 25, 2023
1 parent bf9975a commit 8002a47
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,10 @@ public static boolean isAclEnabled(Configuration conf) {
/** Zookeeper interaction configs */
public static final String RM_ZK_PREFIX = RM_PREFIX + "zk-";

/** Enable Zookeeper SSL/TLS communication */
public static final String RM_ZK_CLIENT_SSL_ENABLED = RM_ZK_PREFIX + "client-ssl.enabled";
public static final boolean DEFAULT_RM_ZK_CLIENT_SSL_ENABLED = false;

public static final String RM_ZK_ADDRESS = RM_ZK_PREFIX + "address";

public static final String RM_ZK_NUM_RETRIES = RM_ZK_PREFIX + "num-retries";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,12 @@
<value>1048576</value>
</property>

<property>
<description>Enable SSL/TLS encryption for the ZooKeeper communication.</description>
<name>yarn.resourcemanager.zk-client-ssl.enabled</name>
<value>false</value>
</property>

<property>
<description>Name of the cluster. In a HA setting,
this is used to ensure the RM participates in leader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ public ZKCuratorManager createAndStartZKManager(Configuration
authInfos.add(authInfo);
}

manager.start(authInfos);
manager.start(authInfos, config.getBoolean(YarnConfiguration.RM_ZK_CLIENT_SSL_ENABLED,
YarnConfiguration.DEFAULT_RM_ZK_CLIENT_SSL_ENABLED));
return manager;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ public void testFormatConfStoreCmdForZK() throws Exception {
curatorFramework.checkExists().forPath(confStorePath));
}
}

@Test
public void testRemoveApplicationFromStateStoreCmdForZK() throws Exception {
StateChangeRequestInfo req = new StateChangeRequestInfo(
Expand All @@ -111,6 +110,7 @@ public void testRemoveApplicationFromStateStoreCmdForZK() throws Exception {
setupCuratorFramework(curatorTestingServer)) {
Configuration conf = TestZKRMStateStore.createHARMConf("rm1,rm2", "rm1",
1234, false, curatorTestingServer);

ResourceManager rm = new MockRM(conf);
rm.start();
rm.getRMContext().getRMAdminService().transitionToActive(req);
Expand Down

0 comments on commit 8002a47

Please sign in to comment.