File tree Expand file tree Collapse file tree 4 files changed +37
-0
lines changed Expand file tree Collapse file tree 4 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 136
136
Boolean $use_ticket_cache = $zookeeper::params::use_ticket_cache,
137
137
Boolean $remove_host_principal = $zookeeper::params::remove_host_principal,
138
138
Boolean $remove_realm_principal = $zookeeper::params::remove_realm_principal,
139
+ # Quorum SASL /!\ Only works with ZK 3.4.10 or more recent; disabled by default /!\
140
+ Boolean $quorum_auth_enable_sasl = $zookeeper::quorum_auth_enable_sasl,
141
+ Boolean $quorum_auth_learner_require_sasl = $zookeeper::quorum_auth_learner_require_sasl,
142
+ Boolean $quorum_auth_server_require_sasl = $zookeeper::quorum_auth_server_require_sasl,
143
+ String $quorum_sasl_user = $zookeeper::quorum_sasl_user,
144
+ String $quorum_sasl_password = $zookeeper::quorum_sasl_password,
139
145
# four letter words whitelist
140
146
Array[String] $whitelist_4lw = $zookeeper::params::whitelist_4lw,
141
147
# Metrics Providers
Original file line number Diff line number Diff line change 210
210
# whitelist of Four Letter Words commands, see https://zookeeper.apache.org/doc/r3.4.12/zookeeperAdmin.html#sc_zkCommands
211
211
$whitelist_4lw = []
212
212
213
+ # quorum SASL
214
+ $quorum_auth_enable_sasl = false
215
+ $quorum_auth_learner_require_sasl = false
216
+ $quorum_auth_server_require_sasl = false
217
+ $quorum_sasl_user = undef
218
+ $quorum_sasl_password = undef
219
+
213
220
# Metrics Providers
214
221
$metrics_provider_classname = undef
215
222
$metrics_provider_http_port = 7000
Original file line number Diff line number Diff line change @@ -13,3 +13,17 @@ Server {
13
13
<% end %> ;
14
14
<% end -%>
15
15
};
16
+
17
+ <% if scope.lookupvar("zookeeper::quorum_auth_enable_sasl") -%>
18
+ <%# Only tested with Digest-MD5 authentication scheme but it can also work with Kerberos -%>
19
+ QuorumServer {
20
+ org.apache.zookeeper.server.auth.DigestLoginModule required
21
+ user_<%= scope.lookupvar("zookeeper::quorum_sasl_user") %> ="<%= scope.lookupvar("zookeeper::quorum_sasl_password") %> ";
22
+ };
23
+
24
+ QuorumLearner {
25
+ org.apache.zookeeper.server.auth.DigestLoginModule required
26
+ username="<%= scope.lookupvar("zookeeper::quorum_sasl_user") %> "
27
+ password="<%= scope.lookupvar("zookeeper::quorum_sasl_password") %> ";
28
+ };
29
+ <% end -%>
Original file line number Diff line number Diff line change @@ -142,6 +142,16 @@ kerberos.removeRealmFromPrincipal=true
142
142
<% end -%>
143
143
<% end -%>
144
144
145
+ <% if scope.lookupvar("zookeeper::quorum_auth_enable_sasl") -%>
146
+ quorum.auth.enableSasl=true
147
+ <% end -%>
148
+ <% if scope.lookupvar("zookeeper::quorum_auth_learner_require_sasl") -%>
149
+ quorum.auth.learnerRequireSasl=true
150
+ <% end -%>
151
+ <% if scope.lookupvar("zookeeper::quorum_auth_server_require_sasl") -%>
152
+ quorum.auth.serverRequireSasl=true
153
+ <% end -%>
154
+
145
155
<% if scope.lookupvar("zookeeper::ssl") -%>
146
156
# Supported since 3.5.1
147
157
<% if ! [nil, :undefined, :undef].include?(scope.lookupvar("zookeeper::secure_client_port")) -%>
You can’t perform that action at this time.
0 commit comments