Skip to content

Commit 8f670de

Browse files
committed
feat(ZOOKEEPER-3824): allow SASL allowlist expansion during reconfig
1 parent 0697b8a commit 8f670de

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/auth/SaslQuorumServerCallbackHandler.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,20 +164,12 @@ private void handleAuthorizeCallback(AuthorizeCallback ac) {
164164
if (!isDigestAuthn && authzFlag) {
165165
String[] components = authorizationID.split("[/@]");
166166
if (components.length == 3) {
167-
// authorizationID looks like: zookeeper/<host>@REALM
168-
String host = components[1].toLowerCase(Locale.ROOT);
169-
authzFlag = authzHostsRef.get().contains(host);
167+
authzFlag = authzHostsRef.get().contains(components[1]);
170168
} else {
171169
authzFlag = false;
172170
}
173171
if (!authzFlag) {
174-
//LOG.error("SASL authorization completed, {} is not authorized to connect", authorizationID);
175-
Set<String> cur = authzHostsRef.get();
176-
LOG.error("SASL authorization completed, {} is not authorized to connect. principalHost={}, allowlistSize={}, allowlistSample={}",
177-
authorizationID,
178-
(components.length == 3 ? components[1] : "bad-principal"),
179-
cur.size(),
180-
cur.stream().limit(10).collect(Collectors.toList()));
172+
LOG.error("SASL authorization completed, {} is not authorized to connect", authorizationID);
181173
}
182174
}
183175

0 commit comments

Comments
 (0)