From c853efffa8b173a3afe1b966456bb77db5a68883 Mon Sep 17 00:00:00 2001 From: Abe Ratnofsky Date: Fri, 6 Dec 2024 13:41:31 -0500 Subject: [PATCH] Support audit logging for JMX operations Patch by Abe Ratnofsky; reviewed by Bernardo Botella, Doug Rohrer, Francisco Guerrero for CASSANDRA-20128 --- CHANGES.txt | 1 + build.xml | 2 +- .../audit/AuditLogEntryCategory.java | 2 +- .../cassandra/audit/AuditLogEntryType.java | 3 +- .../cassandra/audit/AuditLogFilter.java | 16 ++- .../cassandra/audit/AuditLogManager.java | 131 ++++++++++++++++- .../cassandra/auth/CassandraPrincipal.java | 2 +- .../auth/jmx/AuthorizationProxy.java | 58 +++++--- .../cassandra/utils/JMXServerUtils.java | 6 +- .../utils/JmxInvocationListener.java | 50 +++++++ .../cassandra/audit/AuditLoggerTest.java | 136 +++++++++++++++++- .../auth/jmx/AbstractJMXAuthTest.java | 34 +++++ 12 files changed, 411 insertions(+), 30 deletions(-) create mode 100644 src/java/org/apache/cassandra/utils/JmxInvocationListener.java diff --git a/CHANGES.txt b/CHANGES.txt index 797312bf01..cf59421428 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 5.1 + * Support audit logging for JMX operations (CASSANDRA-20128) * Enable sorting of nodetool status output (CASSANDRA-20104) * Support downgrading after CMS is initialized (CASSANDRA-20145) * Deprecate IEndpointSnitch (CASSANDRA-19488) diff --git a/build.xml b/build.xml index 45af046260..ccc38717d2 100644 --- a/build.xml +++ b/build.xml @@ -338,7 +338,7 @@ - +