zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-1260) Audit logging in ZooKeeper servers.
Date Fri, 25 Aug 2017 22:17:08 GMT

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16142329#comment-16142329
] 

ASF GitHub Bot commented on ZOOKEEPER-1260:
-------------------------------------------

Github user afine commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/338#discussion_r135361699
  
    --- Diff: src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java ---
    @@ -476,6 +624,33 @@ private boolean connClosedByClient(Request request) {
             return request.cnxn == null;
         }
     
    +    private String getHostAddress(ServerCnxn cnxn) {
    +        try {
    +            if (cnxn == null) {
    +                return "";
    +            }
    +            InetSocketAddress remoteSocketAddress = cnxn
    +                    .getRemoteSocketAddress();
    +            if (remoteSocketAddress == null) {
    +                return "";
    +            }
    +            InetAddress address = remoteSocketAddress.getAddress();
    +            if (address == null) {
    +                return "";
    +            }
    +            return address.getHostAddress();
    +        } catch (Exception e) {
    +            // ignore
    +        }
    +        return "";
    +    }
    +
    +    private String getSessionId(ServerCnxn cnxn) {
    --- End diff --
    
    perhaps we can move this string formatting code to somewhere more appropriate


> Audit logging in ZooKeeper servers.
> -----------------------------------
>
>                 Key: ZOOKEEPER-1260
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1260
>             Project: ZooKeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Mahadev konar
>            Assignee: Mohammad Arshad
>             Fix For: 3.5.4, 3.6.0
>
>         Attachments: ZOOKEEPER-1260-01.patch, zookeeperAuditLogs.pdf
>
>
> Lots of users have had questions on debugging which client changed what znode and what
updates went through a znode. We should add audit logging as in Hadoop (look at Namenode Audit
logging) to log which client changed what in the zookeeper servers. This could just be a log4j
audit logger.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message