Package org.apache.cassandra.audit
Class AuditLogManager
java.lang.Object
org.apache.cassandra.audit.AuditLogManager
- All Implemented Interfaces:
AuditLogManagerMBean,AuthEvents.Listener,QueryEvents.Listener
public class AuditLogManager
extends Object
implements QueryEvents.Listener, AuthEvents.Listener, AuditLogManagerMBean
Central location for managing the logging of client/user-initated actions (like queries, log in commands, and so on).
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidauthFailure(QueryState state, Exception cause) voidauthSuccess(QueryState state) voidbatchFailure(BatchStatement.Type batchType, List<? extends CQLStatement> statements, List<String> queries, List<List<ByteBuffer>> values, QueryOptions options, QueryState state, Exception cause) voidbatchSuccess(BatchStatement.Type batchType, List<? extends CQLStatement> statements, List<String> queries, List<List<ByteBuffer>> values, QueryOptions options, QueryState state, long queryTime, Message.Response response) voidDisables AuditLog, designed to be invoked only via JMX/ Nodetool, not from anywhere else in the codepath.voidenable(AuditLogOptions auditLogOptions) Enables AuditLog, designed to be invoked only via JMX/ Nodetool, not from anywhere else in the codepath.voidexecuteFailure(CQLStatement statement, String query, QueryOptions options, QueryState state, Exception cause) voidexecuteSuccess(CQLStatement statement, String query, QueryOptions options, QueryState state, long queryTime, Message.Response response) Returns the current state of Audit Log framework.voidbooleanvoidprepareFailure(CQLStatement stmt, String query, QueryState state, Exception cause) voidprepareSuccess(CQLStatement statement, String query, QueryState state, long queryTime, ResultMessage.Prepared response) voidqueryFailure(CQLStatement stmt, String query, QueryOptions options, QueryState state, Exception cause) voidquerySuccess(CQLStatement statement, String query, QueryOptions options, QueryState state, long queryTime, Message.Response response)
-
Field Details
-
MBEAN_NAME
- See Also:
-
instance
-
-
Method Details
-
initialize
public void initialize() -
getLogger
-
isEnabled
public boolean isEnabled() -
getAuditLogOptions
-
getAuditLogOptionsData
Description copied from interface:AuditLogManagerMBeanReturns the current state of Audit Log framework.- Specified by:
getAuditLogOptionsDatain interfaceAuditLogManagerMBean
-
disableAuditLog
public void disableAuditLog()Disables AuditLog, designed to be invoked only via JMX/ Nodetool, not from anywhere else in the codepath. -
enable
Enables AuditLog, designed to be invoked only via JMX/ Nodetool, not from anywhere else in the codepath.- Parameters:
auditLogOptions- AuditLogOptions to be used for enabling AuditLog- Throws:
ConfigurationException- It can throw configuration exception when provided logger class does not exist in the classpath
-
querySuccess
public void querySuccess(CQLStatement statement, String query, QueryOptions options, QueryState state, long queryTime, Message.Response response) - Specified by:
querySuccessin interfaceQueryEvents.Listener
-
queryFailure
public void queryFailure(CQLStatement stmt, String query, QueryOptions options, QueryState state, Exception cause) - Specified by:
queryFailurein interfaceQueryEvents.Listener
-
executeSuccess
public void executeSuccess(CQLStatement statement, String query, QueryOptions options, QueryState state, long queryTime, Message.Response response) - Specified by:
executeSuccessin interfaceQueryEvents.Listener
-
executeFailure
public void executeFailure(CQLStatement statement, String query, QueryOptions options, QueryState state, Exception cause) - Specified by:
executeFailurein interfaceQueryEvents.Listener
-
batchSuccess
public void batchSuccess(BatchStatement.Type batchType, List<? extends CQLStatement> statements, List<String> queries, List<List<ByteBuffer>> values, QueryOptions options, QueryState state, long queryTime, Message.Response response) - Specified by:
batchSuccessin interfaceQueryEvents.Listener
-
batchFailure
public void batchFailure(BatchStatement.Type batchType, List<? extends CQLStatement> statements, List<String> queries, List<List<ByteBuffer>> values, QueryOptions options, QueryState state, Exception cause) - Specified by:
batchFailurein interfaceQueryEvents.Listener
-
prepareSuccess
public void prepareSuccess(CQLStatement statement, String query, QueryState state, long queryTime, ResultMessage.Prepared response) - Specified by:
prepareSuccessin interfaceQueryEvents.Listener
-
prepareFailure
public void prepareFailure(@Nullable CQLStatement stmt, @Nullable String query, QueryState state, Exception cause) - Specified by:
prepareFailurein interfaceQueryEvents.Listener
-
authSuccess
- Specified by:
authSuccessin interfaceAuthEvents.Listener
-
authFailure
- Specified by:
authFailurein interfaceAuthEvents.Listener
-