HDFS-16925. Namenode audit log to only include IP address of client (#5413)
Reviewed-by: Takanobu Asanuma <tasanuma@apache.org> Signed-off-by: Tao Li <tomscut@apache.org>
This commit is contained in:
parent
477f17be97
commit
e47ff5f3c0
@ -8506,9 +8506,10 @@ public void logAuditEvent(boolean succeeded, String userName,
|
||||
src = escapeJava(src);
|
||||
dst = escapeJava(dst);
|
||||
sb.setLength(0);
|
||||
String ipAddr = addr != null ? "/" + addr.getHostAddress() : "null";
|
||||
sb.append("allowed=").append(succeeded).append("\t")
|
||||
.append("ugi=").append(userName).append("\t")
|
||||
.append("ip=").append(addr).append("\t")
|
||||
.append("ip=").append(ipAddr).append("\t")
|
||||
.append("cmd=").append(cmd).append("\t")
|
||||
.append("src=").append(src).append("\t")
|
||||
.append("dst=").append(dst).append("\t");
|
||||
|
Loading…
Reference in New Issue
Block a user