@InterfaceAudience.Public @InterfaceStability.Evolving public abstract class DefaultAuditLogger extends HdfsAuditLogger
Modifier and Type | Field and Description |
---|---|
protected int |
callerContextMaxLen
The maximum bytes a caller context string can have.
|
protected int |
callerSignatureMaxLen |
protected Set<String> |
debugCmdSet
List of commands to provide debug messages.
|
protected boolean |
isCallerContextEnabled |
protected boolean |
logTokenTrackingId
adds a tracking ID for all audit log events.
|
protected static ThreadLocal<StringBuilder> |
STRING_BUILDER |
Constructor and Description |
---|
DefaultAuditLogger() |
Modifier and Type | Method and Description |
---|---|
abstract void |
initialize(Configuration conf)
Called during initialization of the logger.
|
abstract void |
logAuditEvent(boolean succeeded,
String userName,
InetAddress addr,
String cmd,
String src,
String dst,
FileStatus status,
CallerContext callerContext,
UserGroupInformation ugi,
org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenSecretManager dtSecretManager)
Same as
HdfsAuditLogger.logAuditEvent(boolean, String, InetAddress, String, String, String,
FileStatus) with additional parameters related to logging delegation token
tracking IDs. |
abstract void |
logAuditEvent(boolean succeeded,
String userName,
InetAddress addr,
String cmd,
String src,
String dst,
FileStatus status,
UserGroupInformation ugi,
org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenSecretManager dtSecretManager)
|
abstract void |
logAuditMessage(String message) |
logAuditEvent
protected static final ThreadLocal<StringBuilder> STRING_BUILDER
protected volatile boolean isCallerContextEnabled
protected int callerContextMaxLen
protected int callerSignatureMaxLen
protected boolean logTokenTrackingId
public abstract void initialize(Configuration conf)
AuditLogger
conf
- The configuration object.public abstract void logAuditMessage(String message)
public abstract void logAuditEvent(boolean succeeded, String userName, InetAddress addr, String cmd, String src, String dst, FileStatus status, UserGroupInformation ugi, org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenSecretManager dtSecretManager)
HdfsAuditLogger
HdfsAuditLogger.logAuditEvent(boolean, String, InetAddress, String, String,
String, FileStatus, CallerContext, UserGroupInformation,
DelegationTokenSecretManager)
without CallerContext
information.logAuditEvent
in class HdfsAuditLogger
public abstract void logAuditEvent(boolean succeeded, String userName, InetAddress addr, String cmd, String src, String dst, FileStatus status, CallerContext callerContext, UserGroupInformation ugi, org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenSecretManager dtSecretManager)
HdfsAuditLogger
HdfsAuditLogger.logAuditEvent(boolean, String, InetAddress, String, String, String,
FileStatus)
with additional parameters related to logging delegation token
tracking IDs.logAuditEvent
in class HdfsAuditLogger
succeeded
- Whether authorization succeeded.userName
- Name of the user executing the request.addr
- Remote address of the request.cmd
- The requested command.src
- Path of affected source file.dst
- Path of affected destination file (if any).status
- File information for operations that change the file's metadata
(permissions, owner, times, etc).callerContext
- Context information of the callerugi
- UserGroupInformation of the current user, or null if not logging
token tracking informationdtSecretManager
- The token secret manager, or null if not logging
token tracking informationCopyright © 2023 Apache Software Foundation. All rights reserved.