[
https://issues.apache.org/jira/browse/ARTEMIS-3399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17387730#comment-17387730
]
ASF subversion and git services commented on ARTEMIS-3399:
----------------------------------------------------------
Commit 2954829e3efd9ff66ec2048bd5d52f9656da148e in activemq-artemis's branch
refs/heads/main from Justin Bertram
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=2954829 ]
ARTEMIS-3399 fix audit logging for AMQP
Due to the multi-threaded AMQP implementation the ThreadLocal variables
used by the AuditLogger to track the username and remote address don't
work properly. Changes include:
- Passing the audit Subject (set during authentication) and the remote
address explicitly for audit logging on the relevant ServerSession
methods rather than relying on the AuditLogger's ThreadLocal
variables
- Audit logging core session creation *after* successful authentication
so that we have the proper Subject; this is especially important for
the SSL certificate authentication use-case
- Renaming some methods and variables in AuditLogger to more accurately
reflect their intended use
- Adding JavaDoc and refactoring the getCaller methods on AuditLogger
- Refactor audit log testing and add a new test
> Fix audit logging for AMQP
> --------------------------
>
> Key: ARTEMIS-3399
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3399
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Justin Bertram
> Assignee: Justin Bertram
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Due to the multi-threaded AMQP implementation the {{ThreadLocal}} variables
> used by the {{AuditLogger}} to track the username and remote address don't
> work properly.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)