activemq-artemis/examples/features/standard
Justin Bertram 90853409a0 ARTEMIS-2886 optimize security auth
Both authentication and authorization will hit the underlying security
repository (e.g. files, LDAP, etc.). For example, creating a JMS
connection and a consumer will result in 2 hits with the *same*
authentication request. This can cause unwanted (and unnecessary)
resource utilization, especially in the case of networked configuration
like LDAP.

There is already a rudimentary cache for authorization, but it is
cleared *totally* every 10 seconds by default (controlled via the
security-invalidation-interval setting), and it must be populated
initially which still results in duplicate auth requests.

This commit optimizes authentication and authorization via the following
changes:

 - Replace our home-grown cache with Google Guava's cache. This provides
simple caching with both time-based and size-based LRU eviction. See more
at https://github.com/google/guava/wiki/CachesExplained. I also thought
about using Caffeine, but we already have a dependency on Guava and the
cache implementions look to be negligibly different for this use-case.
 - Add caching for authentication. Both successful and unsuccessful
authentication attempts will be cached to spare the underlying security
repository as much as possible. Authenticated Subjects will be cached
and re-used whenever possible.
 - Authorization will used Subjects cached during authentication. If the
required Subject is not in the cache it will be fetched from the
underlying security repo.
 - Caching can be disabled by setting the security-invalidation-interval
to 0.
 - Cache sizes are configurable.
 - Management operations exist to inspect cache sizes at runtime.
2020-08-26 13:36:24 -05:00
..
auto-closeable [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
broker-plugin [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
browser [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
camel [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
cdi [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
client-kickoff [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
completion-listener [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
consumer-rate-limit [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
context [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
core-bridge [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
database [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
dead-letter [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
delayed-redelivery [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
divert [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
durable-subscription [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
embedded [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
embedded-simple [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
exclusive-queue [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
expiry [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
http-transport [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
instantiate-connection-factory [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
interceptor [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
interceptor-amqp [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
interceptor-client [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
interceptor-mqtt [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
jms-bridge [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
jmx [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
jmx-ssl [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
large-message [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
last-value-queue [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
management [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
management-notifications [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
message-counters [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
message-group [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
message-group2 [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
message-priority [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
netty-openssl [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
no-consumer-buffering [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
paging [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
pre-acknowledge [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
producer-rate-limit [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
queue [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
queue-requestor [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
queue-selector [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
reattach-node [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
request-reply [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
rest [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
scheduled-message [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
security [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
security-ldap [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
security-manager ARTEMIS-2886 optimize security auth 2020-08-26 13:36:24 -05:00
send-acknowledgements [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
shared-consumer [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
slow-consumer [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
spring-boot-integration [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
spring-integration [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
ssl-enabled [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
ssl-enabled-crl-mqtt [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
ssl-enabled-dual-authentication [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
static-selector [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
temp-queue [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
topic [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
topic-hierarchies [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
topic-selector1 [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
topic-selector2 [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
transactional [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
xa-heuristic [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
xa-receive [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
xa-send [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
pom.xml [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00