Commit Graph

2173 Commits

Author SHA1 Message Date
Justin Bertram f5a6189e2d ARTEMIS-2890 FQQN security-settings + JMS not working 2020-09-03 16:52:51 -04:00
Clebert Suconic c3887ed710 ARTEMIS-2887 Adding back Message.toString on audit logger 2020-08-26 21:48:30 -04:00
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
Domenico Francesco Bruscino b85156cc27 NO-JIRA POM on extra-tests to 2.16.0-SNAPSHOT 2020-08-24 16:24:25 +02:00
Domenico Francesco Bruscino 32bf9680f2 [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
Domenico Francesco Bruscino a549fcedde [maven-release-plugin] prepare release 2.15.0 2020-08-24 16:03:12 +02:00
Justin Bertram d86067a65b ARTEMIS-2872 support FQQN syntax for security-settings 2020-08-22 18:24:40 -05:00
Justin Bertram 57b8c22a62 ARTEMIS-2880 support FQQN syntax for JNDI lookup 2020-08-20 15:16:17 -05:00
Justin Bertram 582a430213 ARTEMIS-2882 better support for JMS topics + FQQN
Support FQQN with JMS topics when sending to or consuming from a
specific subscription. This applies to JMS over core, OpenWire,
and AMQP.
2020-08-20 14:32:11 -05:00
Clebert Suconic a2bf85f529 NO-JIRA Fixing java.security location on java11 2020-08-20 11:36:21 -04:00
Michael Pearce 2c506cc52a [ARTEMIS-2863] Add support to pause dispatch when group rebalance
Add test case
Add implementation
Add docs
2020-08-19 12:04:50 -04:00
Clebert Suconic c63c1f40ca NO-JIRA Small improvement on compatibility tests 2020-08-19 11:47:27 -04:00
franz1981 40f20cfe6a ARTEMIS-2877 Fix journal replication scalability
This is allowing journal appends to happen in burst
during replication, by batching replication response
into the network at the end of the append burst.
2020-08-17 13:01:41 -04:00
franz1981 a6bf7d0e04 ARTEMIS-2837 Bursts of open files under high load
This would prevent to push a new opened file if there
is already one available to be consumed
2020-08-17 13:01:41 -04:00
franz1981 851aef1172 Revert "ARTEMIS-2837 Avoiding bursts on writes and pending callbacks"
This reverts commit 1761f763
2020-08-17 13:01:41 -04:00
Justin Bertram fa5b56ef1d ARTEMIS-2881 deadlock when destroying q and depaging
I couldn't reproduce this with a test, but static code analysis led me
to this solution which is similar to the fix done for ARTEMIS-2592 via
e397a17796.
2020-08-17 10:34:20 -05:00
Robbie Gemmell 131b8b22ec NO-JIRA: fix RandomUtilDistributionTest assertion and improve failure message 2020-08-11 10:32:52 -04:00
Clebert Suconic c551df770c ARTEMIS-2868 Protect Topology Updates from Split Brain on broker shutdown as well 2020-08-07 12:39:20 -04:00
Justin Bertram 43e3cd6047 ARTEMIS-2865 make tests more robust 2020-08-06 22:07:42 -05:00
Clebert Suconic 27cb9b37b1 ARTEMIS-2868 Protect Topology Updates from Split Brain 2020-08-06 17:40:57 -04:00
Clebert Suconic 9842f45a49 ARTEMIS-2867 Do not cache IPs on DNS Entries for NetworkHealthCheck
In case of a DNS outage, the pinger should still fail
If we cache the InetAddress this would not be possible
2020-08-06 17:40:41 -04:00
Clebert Suconic df2f48a481 NO-JIRA update RandomUtil.randomInterval to deal with (max==min) 2020-08-06 17:08:54 -04:00
Michael Pearce 486896d99e ARTEMIS-2873 Config-managed queues are auto-deleted
auto-delete-queues and auto-delete-created-queues should only apply to
NON configuration managed queues.
2020-08-06 15:19:57 -05:00
Justin Bertram 8473946646 ARTEMIS-2865 LegacyLDAPSecuritySettingPlugin can change default security match 2020-08-06 15:36:05 -04:00
Francesco Nigro 60e25b763c ARTEMIS-2844 Improve binding query performance by reusing AddressImpl instances 2020-07-30 23:32:10 -04:00
Clebert Suconic c00b210629 ARTEMIS-2858 DNS Tests on reconnects and backups
There are no fixes as part of this test addition.  As I wrote this test as I was debugging DNS issues.
2020-07-29 17:56:55 -04:00
Clebert Suconic 3d86d78828 ARTEMIS-2587 Exposing ActiveMQServer::isActivate through management at ActiveMQServerControl 2020-07-29 11:41:41 -04:00
brusdev 18b8df0f09 ARTEMIS-2855 Define a new broker plugin to track XA transactions 2020-07-29 10:40:55 -04:00
Justin Bertram 52d3ed1c68 ARTEMIS-2848 RA fails w/durable sub w/legacy prefix 2020-07-23 22:27:15 -04:00
Scott Werner e3ed8e815b ARTEMIS-2847 socks5h support
Added 'socksRemoteDNS' transport parameter.
If set to true, remote destination socket is created unresolved
and DNS resolution is disabled.
2020-07-21 16:04:15 -04:00
Clebert Suconic ccc0fa7100 ARTEMIS-2843 non-destructive LVQ not delivering msg to consumer 2020-07-20 12:01:23 -04:00
Clebert Suconic 7be77169c2 NO-JIRA POM on extra-tests to 2.15.0-SNAPSHOT 2020-07-09 13:57:24 -04:00
Clebert Suconic 6690ba1d24 [maven-release-plugin] prepare for next development iteration 2020-07-09 12:49:08 -04:00
Clebert Suconic a76f41a7ed [maven-release-plugin] prepare release 2.14.0 2020-07-09 12:48:54 -04:00
Clebert Suconic 5e69d7c34e NO-JIRA removing verbosing logging from test 2020-07-09 10:36:32 -04:00
Clebert Suconic 1761f76308 ARTEMIS-2837 Avoiding bursts on writes and pending callbacks 2020-07-08 23:08:27 -04:00
Howard Gao 6f8ff55dec ARTEMIS-2835 Porting HORNETQ-1575 and HORNETQ-1578
1 of 2) - Porting of HORNETMQ-1575

In a live-backup scenario, when live is down and backup becomes live, clients
using HA Connection Factories can failover automatically. However if a
client decides to create a new connection by itself (as in camel jms case)
there is a chance that the new connection is pointing to the dead live
and the connection won't be successful. The reason is that if the old
connection is gone the backup will not get a chance to announce itself
back to client so it fails on initial connection.

The fix is to let CF remember the old topology and use it on any
initial connection attempts.
2020-07-08 11:27:36 -04:00
Justin Bertram 20daf2354c ARTEMIS-2817 Support Stomp subscription with FQQN+multicast 2020-07-07 08:21:22 -04:00
Justin Bertram f5d5710133 ARTEMIS-2834 leaking meters
Move all of the meter registration code into the ManagementServer
implementation to provide better life-cycle management.
2020-07-07 08:18:28 -04:00
Justin Bertram fd207e75b0 ARTEMIS-2829 wrong return type for getDiskStoreUsage
Since getDiskStoreUsage on the ActiveMQServerControl is converting a
double to a long the value is always 0 in the management API. It should
return a double instead.
2020-07-07 08:18:28 -04:00
Justin Bertram cb7cd729d7 ARTEMIS-2828 add addressSize metric
Adding this metric required moving the meter registration code from the
AddressInfo class to the ManagementService in order to get clean access
to both the AddressInfo and AddressControl classes.
2020-07-07 08:18:28 -04:00
Justin Bertram 73c4e399d9 NO-JIRA clarify diskStoreUsage description 2020-07-07 08:18:28 -04:00
Justin Bertram ac8ffedf66 ARTEMIS-2827 add addressMemoryUsagePercentage as metric 2020-07-07 08:18:28 -04:00
Justin Bertram 26091f1907 ARTEMIS-2825 wrong calc for DiskStoreUsagePercentage
The calculation used by
ActiveMQServerControlImpl.getDiskStoreUsagePercentage() is incorrect. It
uses disk space info with global-max-size which is for address memory.
Also, the existing getDiskStoreUsage() method *already* returns a
percentage of total disk store usage so this method seems redundant.
2020-07-07 08:18:28 -04:00
Clebert Suconic 3f99c4b846 ARTEMIS-2797 Fixing updateQueue on filter / fixing ActiveMQServerControlTest 2020-07-06 21:45:27 -04:00
Jan Šmucr 6cc370e169 ARTEMIS-2797 Fixing redeploy mechanism
Queue settings are reset to their default values upon broker.xml reload ONLY.
Regular calls to PostOfficeImpl#updateQueue are no longer affected.
2020-07-06 15:02:03 -04:00
Clebert Suconic 257d353896 ARTEMIS-2797 Logging redeployment errors and speeding RedeployTest 2020-07-01 08:33:01 -04:00
Clebert Suconic 3d746d3b23 NO-JIRA Speeding test and intermittent failure 2020-06-29 21:45:13 -04:00
Clebert Suconic f79a4be4c1 ARTEMIS-2831 Avoiding StackOverFlowException when setDLAOnNoRoute(true) 2020-06-29 16:50:00 -04:00
Clebert Suconic 51d1ed4e11 ARTEMIS-2819 Proper fix (previous fix was breaking the testsuite) 2020-06-29 15:37:55 -04:00