YARN-11468. Zookeeper SSL/TLS support. Contributed by Ferenc Erdelyi

This commit is contained in:
Szilard Nemeth 2023-09-27 18:21:45 -04:00
parent f232eec490
commit d9cb76ac98
3 changed files with 12 additions and 1 deletions

View File

@ -857,6 +857,10 @@ public static boolean isAclEnabled(Configuration conf) {
/** Zookeeper interaction configs */ /** Zookeeper interaction configs */
public static final String RM_ZK_PREFIX = RM_PREFIX + "zk-"; 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_ADDRESS = RM_ZK_PREFIX + "address";
public static final String RM_ZK_NUM_RETRIES = RM_ZK_PREFIX + "num-retries"; public static final String RM_ZK_NUM_RETRIES = RM_ZK_PREFIX + "num-retries";

View File

@ -741,6 +741,12 @@
<value>1048576</value> <value>1048576</value>
</property> </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> <property>
<description>Name of the cluster. In a HA setting, <description>Name of the cluster. In a HA setting,
this is used to ensure the RM participates in leader this is used to ensure the RM participates in leader

View File

@ -427,7 +427,8 @@ public ZKCuratorManager createAndStartZKManager(Configuration
authInfos.add(authInfo); 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; return manager;
} }