You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/10/15 07:43:25 UTC

[GitHub] [zookeeper] ztzg commented on a change in pull request #1503: ZOOKEEPER-3959: Add support for multiple SASL-authenticated super users

ztzg commented on a change in pull request #1503:
URL: https://github.com/apache/zookeeper/pull/1503#discussion_r505281836



##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java
##########
@@ -1627,6 +1628,22 @@ public void processPacket(ServerCnxn cnxn, ByteBuffer incomingBuffer) throws IOE
         }
     }
 
+    private static boolean isSaslSuperUser(String id) {
+        String superUser = System.getProperty(SASL_SUPER_USER);
+
+        if (superUser == null || id == null || id.isEmpty()) {
+            return false;
+        }
+
+        for (String superId : superUser.split(",")) {

Review comment:
       I like this! (Particularly since there is a precedent.  Sorta.)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org