mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-24 03:06:08 +00:00
Using a ThreadLocal for the audit user information works in most cases, but it can fail when dispatching messages to consumers because threads are taken out of a pool to do the dispatching and those threads may not be associated with the proper credentials. This commit fixes that problem with the following changes: - Passes the Subject explicitly when logging audit info during dispatch - Relocates security audit logging from the SecurityManager implementation(s) to the SecurityStore implementation - Associates the Subject with the connection properly with the new security caching