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 14:06:10 UTC

[GitHub] [zookeeper] arshadmohammad commented on a change in pull request #1504: ZOOKEEPER-3969: Add whoami API and Cli command

arshadmohammad commented on a change in pull request #1504:
URL: https://github.com/apache/zookeeper/pull/1504#discussion_r505571007



##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java
##########
@@ -3070,4 +3071,19 @@ private void validateACL(List<ACL> acl) throws KeeperException.InvalidACLExcepti
         }
     }
 
+    /**
+     * Returns comma separated list of users authenticated in the current session
+     *
+     * @return users
+     * @throws InterruptedException when interrupted
+     */
+    public String whoAmI() throws InterruptedException {

Review comment:
       Good suggestion. 
   Added  below structure
   ```
   class ClientInfo {
           ustring authScheme; // Authentication scheme
           ustring user;       // user name or any other id(for example ip)
       }
   ```
   Response changed to 
   ```
   class WhoAmIResponse {
           vector<org.apache.zookeeper.data.ClientInfo> clientInfo;
       }
   ```




----------------------------------------------------------------
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