HADOOP-6781. security audit log shouldn't have exception in it.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@946815 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
78778a158c
commit
f4998a7813
@ -23,6 +23,8 @@ Trunk (unreleased changes)
|
|||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
||||||
|
HADOOP-6781. security audit log shouldn't have exception in it.
|
||||||
|
|
||||||
HADOOP-6612. Protocols RefreshUserToGroupMappingsProtocol and
|
HADOOP-6612. Protocols RefreshUserToGroupMappingsProtocol and
|
||||||
RefreshAuthorizationPolicyProtocol will fail with security enabled (boryas)
|
RefreshAuthorizationPolicyProtocol will fail with security enabled (boryas)
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ public abstract class Server {
|
|||||||
static int INITIAL_RESP_BUF_SIZE = 10240;
|
static int INITIAL_RESP_BUF_SIZE = 10240;
|
||||||
|
|
||||||
public static final Log LOG = LogFactory.getLog(Server.class);
|
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());
|
LogFactory.getLog("SecurityLogger."+Server.class.getName());
|
||||||
private static final String AUTH_FAILED_FOR = "Auth failed for ";
|
private static final String AUTH_FAILED_FOR = "Auth failed for ";
|
||||||
private static final String AUTH_SUCCESSFULL_FOR = "Auth successfull for ";
|
private static final String AUTH_SUCCESSFULL_FOR = "Auth successfull for ";
|
||||||
@ -995,7 +995,7 @@ public Object run() throws SaslException {
|
|||||||
rpcMetrics.authenticationFailures.inc();
|
rpcMetrics.authenticationFailures.inc();
|
||||||
String clientIP = this.toString();
|
String clientIP = this.toString();
|
||||||
// attempting user could be null
|
// attempting user could be null
|
||||||
auditLOG.warn(AUTH_FAILED_FOR + clientIP + ":" + attemptingUser, e);
|
AUDITLOG.warn(AUTH_FAILED_FOR + clientIP + ":" + attemptingUser);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
if (replyToken != null) {
|
if (replyToken != null) {
|
||||||
@ -1013,7 +1013,7 @@ public Object run() throws SaslException {
|
|||||||
user = getAuthorizedUgi(saslServer.getAuthorizationID());
|
user = getAuthorizedUgi(saslServer.getAuthorizationID());
|
||||||
LOG.info("SASL server successfully authenticated client: " + user);
|
LOG.info("SASL server successfully authenticated client: " + user);
|
||||||
rpcMetrics.authenticationSuccesses.inc();
|
rpcMetrics.authenticationSuccesses.inc();
|
||||||
auditLOG.info(AUTH_SUCCESSFULL_FOR + user);
|
AUDITLOG.info(AUTH_SUCCESSFULL_FOR + user);
|
||||||
saslContextEstablished = true;
|
saslContextEstablished = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -242,7 +242,7 @@ public MiniProtocol run() throws IOException {
|
|||||||
|
|
||||||
static void setLoggingLevel(Level level) {
|
static void setLoggingLevel(Level level) {
|
||||||
LogManager.getLogger(Server.class.getName()).setLevel(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);
|
LogManager.getLogger(Client.class.getName()).setLevel(level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user