You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2022/07/22 15:37:55 UTC

[activemq-artemis] branch main updated: Revert "ARTEMIS-3902 Adding reason to Audit Security Message"

This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new 55865ab4b4 Revert "ARTEMIS-3902 Adding reason to Audit Security Message"
55865ab4b4 is described below

commit 55865ab4b45db4bc6854ebf1f185ed12201036a5
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Fri Jul 22 11:37:46 2022 -0400

    Revert "ARTEMIS-3902 Adding reason to Audit Security Message"
    
    This reverts commit db8f530256dd374f14c3dce1adcf35f0e761113c.
---
 .../main/java/org/apache/activemq/artemis/logs/AuditLogger.java   | 8 ++++----
 .../activemq/artemis/core/security/impl/SecurityStoreImpl.java    | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java
index 7b9cdec1ff..5633997375 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java
@@ -2267,13 +2267,13 @@ public interface AuditLogger extends BasicLogger {
    void handleManagementMessage2(String user, Object source, Object... args);
 
 
-   static void securityFailure(Exception cause, String reason) {
-      BASE_LOGGER.securityFailure(getCaller(), reason, cause);
+   static void securityFailure(Exception cause) {
+      BASE_LOGGER.securityFailure(getCaller(), cause);
    }
 
    @LogMessage(level = Logger.Level.INFO)
-   @Message(id = 601264, value = "User {0} gets security check failure, reason={1}", format = Message.Format.MESSAGE_FORMAT)
-   void securityFailure(String user, String reason, @Cause Throwable cause);
+   @Message(id = 601264, value = "User {0} gets security check failure", format = Message.Format.MESSAGE_FORMAT)
+   void securityFailure(String user, @Cause Throwable cause);
 
 
    static void createCoreConsumer(Object source, Subject user, String remoteAddress, Object... args) {
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/security/impl/SecurityStoreImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/security/impl/SecurityStoreImpl.java
index 4971e091b0..67613fe8fe 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/security/impl/SecurityStoreImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/security/impl/SecurityStoreImpl.java
@@ -290,7 +290,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC
             } else {
                ex = ActiveMQMessageBundle.BUNDLE.userNoPermissionsQueue(session.getUsername(), checkType, bareQueue, bareAddress);
             }
-            AuditLogger.securityFailure(ex, ex.getMessage());
+            AuditLogger.securityFailure(ex);
             throw ex;
          }