zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eolivelli <...@git.apache.org>
Subject [GitHub] zookeeper pull request #457: ZOOKEEPER-1534: ZookeeperServer now returns Aut...
Date Wed, 14 Feb 2018 20:46:16 GMT
Github user eolivelli commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/457#discussion_r168302873
  
    --- Diff: src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java ---
    @@ -1101,8 +1102,16 @@ public void processPacket(ServerCnxn cnxn, ByteBuffer incomingBuffer)
throws IOE
             } else {
                 if (h.getType() == OpCode.sasl) {
                     Record rsp = processSasl(incomingBuffer,cnxn);
    -                ReplyHeader rh = new ReplyHeader(h.getXid(), 0, KeeperException.Code.OK.intValue());
    -                cnxn.sendResponse(rh,rsp, "response"); // not sure about 3rd arg..what
is it?
    +                if (rsp == null) {
    +                    ReplyHeader rh = new ReplyHeader(h.getXid(), 0, Code.AUTHFAILED.intValue());
    +                    cnxn.sendResponse(rh, new SetSASLResponse(AUTHENTICATION_FAILED.getBytes()),
"response"); // not sure about 3rd arg..what is it?
    +                    LOG.warn("Closing client connection due to SASL authentication failure.");
    --- End diff --
    
    Can we log at least the ip address of the client?


---

Mime
View raw message