diff --git a/CHANGES.txt b/CHANGES.txt index 19b47a76b16..a688bcae2a8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -23,6 +23,8 @@ Trunk (unreleased changes) BUG FIXES + HADOOP-6781. security audit log shouldn't have exception in it. + HADOOP-6612. Protocols RefreshUserToGroupMappingsProtocol and RefreshAuthorizationPolicyProtocol will fail with security enabled (boryas) diff --git a/src/java/org/apache/hadoop/ipc/Server.java b/src/java/org/apache/hadoop/ipc/Server.java index 9339ca5e919..68697325def 100644 --- a/src/java/org/apache/hadoop/ipc/Server.java +++ b/src/java/org/apache/hadoop/ipc/Server.java @@ -111,7 +111,7 @@ public abstract class Server { static int INITIAL_RESP_BUF_SIZE = 10240; public static final Log LOG = LogFactory.getLog(Server.class); - public static final Log auditLOG = + public static final Log AUDITLOG = LogFactory.getLog("SecurityLogger."+Server.class.getName()); private static final String AUTH_FAILED_FOR = "Auth failed for "; private static final String AUTH_SUCCESSFULL_FOR = "Auth successfull for "; @@ -995,7 +995,7 @@ public abstract class Server { rpcMetrics.authenticationFailures.inc(); String clientIP = this.toString(); // attempting user could be null - auditLOG.warn(AUTH_FAILED_FOR + clientIP + ":" + attemptingUser, e); + AUDITLOG.warn(AUTH_FAILED_FOR + clientIP + ":" + attemptingUser); throw e; } if (replyToken != null) { @@ -1013,7 +1013,7 @@ public abstract class Server { user = getAuthorizedUgi(saslServer.getAuthorizationID()); LOG.info("SASL server successfully authenticated client: " + user); rpcMetrics.authenticationSuccesses.inc(); - auditLOG.info(AUTH_SUCCESSFULL_FOR + user); + AUDITLOG.info(AUTH_SUCCESSFULL_FOR + user); saslContextEstablished = true; } } else { diff --git a/src/test/core/org/apache/hadoop/ipc/MiniRPCBenchmark.java b/src/test/core/org/apache/hadoop/ipc/MiniRPCBenchmark.java index fa429e4a012..14eac72b118 100644 --- a/src/test/core/org/apache/hadoop/ipc/MiniRPCBenchmark.java +++ b/src/test/core/org/apache/hadoop/ipc/MiniRPCBenchmark.java @@ -242,7 +242,7 @@ public class MiniRPCBenchmark { static void setLoggingLevel(Level level) { LogManager.getLogger(Server.class.getName()).setLevel(level); - ((Log4JLogger)Server.auditLOG).getLogger().setLevel(level); + ((Log4JLogger)Server.AUDITLOG).getLogger().setLevel(level); LogManager.getLogger(Client.class.getName()).setLevel(level); }