Commit Graph

909 Commits

Author SHA1 Message Date
Michael Klishin 20188a770e
rabbitmq.conf schema and tests for #13698 2025-04-09 02:02:47 -04:00
Michael Klishin 3756775ebe
Revert "Redirect to end_session_endpoint for idp_initiated logon when it is configured" 2025-03-28 02:31:09 -04:00
Michael Klishin ab8799a739
Redirect to end_session_endpoint for idp-initiated logon
Conflicts:
	selenium/bin/components/fakeportal
2025-03-27 19:01:01 -04:00
Karl Nilsson 4fe96dfd27 Ra 2.16.5 - bug fixes and minor improvements
Ra improvements:

* Don't allow a non-voter to start elections
* Register with ra directory before initialising ra server.
* Trigger tick_timeout immediately after entering leader state.
* Set a configurable segment max size

This commit also includes a change to turn the quorum queue
become leader callback to become a noop and instead rely on
the more promptly tick_handler to handle the meta data store
update after a leader election.

This more prompt tick update means there should be a much shorter
gap between the queue metrics being deleted from the old leader
node to them being available again on the new node resulting
in smoother message count metrics.

Fix test that relied on waiting on too simplistic a property
before asserting.
2025-03-27 17:06:31 +00:00
Michael Klishin e6bd1fea84
HTTP API: tests for the /health/checks/quorum-queues-without-elected* endpoints 2025-03-19 01:57:05 -04:00
Michael Klishin cb81bb944a
HTTP API: add two new health checks, references #13153 2025-01-28 14:38:51 -05:00
David Ansari 579c58603e Support AMQP over WebSocket (OSS part) 2025-01-27 17:50:47 +01:00
Jean-Sébastien Pédron 57ed962ef6
rabbitmq_ct_helpers: Fix how we set `$RABBITMQ_FEATURE_FLAGS` in tests
[Why]
In order to make `khepri_db` the default in the future, the handling of
`$RABBITMQ_FEATURE_FLAGS` had to be adapted to be able to *disable*
Khepri instead.

Unfortunately I broke the behavior with stable feature flags that are
only available in the primary umbrella. In this case, they were
automatically enabled and thus, clustering with an old umbrella that did
not have these feature flags failed with `incompatible_feature_flags`.

[How]
The solution is to always use an absolute list of feature flags, not the
new relative list.

V2: Allow a testsuite to skip the configuration of the metadata store.
    This is needed for the feature_flags_SUITE testsuite because it
    tests the default behavior and the configuration of the metadata
    store changes that behavior.

    While here, fix a ct log message where variables were swapped
    compared to the format strieg expectation.

V3: Enable `rabbitmq_4.0.0` feature flag in rabbit_mgmt_http_SUITE. This
    testsuite apparently requires it and if it's not enabled, it fails.
2025-01-15 20:43:41 +01:00
Michael Klishin faa4f5a025
One more integration test for #13015 2025-01-03 19:33:24 -05:00
Michael Klishin 3f5b13d47f
Merge branch 'main' into mk-virtual-host-protection-from-accidental-deletion 2025-01-02 17:01:54 -05:00
Michael Klishin f62d46c286
Introduce a way to protect a virtual host from deletion
Accidental "fat finger" virtual deletion accidents
would be easier to avoid if there was a protection mechanism
that would apply equally even to CLI tools and external
applications that do not use confirmations for deletion
operations.

This introduce the following changes:

 * Virtual host metadata now supports a new queue,
   'protected_from_deletion', which, when set,
   will be considered by key virtual host deletion function(s)
 * DELETE /api/vhosts/{name} was adapted to handle
   such blocked deletion attempts to respond with
   a 412 Precondition Failed status
 * 'rabbitmqctl list_vhosts' and 'rabbitmqctl delete_vhost'
   were adapted accordingly
 * DELETE /api/vhosts/{name}/deletion/protection
   is a new endpoint that can be used to remove
   the protective seal (the metadata key)
 * POST /api/vhosts/{name}/deletion/protection
   marks the virtual host as protected

In the case of the HTTP API, all operations on
virtual host metadata require administrative
privileges from the target user.

Other considerations:

 * When a virtual host does not exist, the behavior
  remains the same: the original, protection-unaware
  code path is used to preserve backwards compatibility

References #12772.
2025-01-02 16:50:51 -05:00
Michael Klishin 968eefa1bb
Bump (c) line year
There are no functional changes to this massive diff.
2025-01-01 17:54:10 -05:00
Michael Klishin 1cae417dbf
Merge pull request #12821 from rabbitmq/rabbitmq-server-12776
Definition export: inject default queue type into virtual host metadata
2024-11-27 14:53:25 -05:00
Michael Klishin dd408a46d9
Single virtual host definition export: export the entire metadata map 2024-11-27 11:51:26 -05:00
Michael Klishin 48a16600aa
Rework virtual host-specific definition export
1. Add more metadata, see #12835
2. Include DQT

Closes #12835
2024-11-27 11:42:09 -05:00
Diana Parra Corbacho 3a39d8312e Tests: clustering_prop_SUITE retry whole cleanup 2024-11-27 15:45:58 +01:00
Diana Parra Corbacho 83dd52c5fc Tests: clustering_prop_SUITE add logs 2024-11-27 15:45:58 +01:00
Michael Klishin 090d11818f
HTTP API tests for injected default queue type 2024-11-26 18:00:37 -05:00
Michael Klishin 765f3d77ca
Adapt a rabbit_mgmt_http_SUITE test to account for DQT 2024-11-26 12:44:49 -05:00
Diana Parra Corbacho f39f5547e0 Tests: clustering_SUITE retry all GET queries 2024-11-25 09:06:33 +01:00
Diana Parra Corbacho b8cf65a42b Tests: clustering_prop_SUITE retry whole cleanup 2024-11-25 09:06:32 +01:00
Diana Parra Corbacho f295d73a40 tests: clustering_SUITE set small metrics gc interval 2024-11-25 09:06:32 +01:00
Marcial Rosales ce760c688b Insert control-cache headers to every resource and reload index.html 2024-11-21 16:47:48 +01:00
Michael Klishin c888689cca
Merge pull request #12722 from rabbitmq/fix-flakes
Fix flakes
2024-11-14 13:36:17 -05:00
Diana Parra Corbacho 9054b122fd tests: clustering_SUITE wait for stats 2024-11-14 15:02:47 +01:00
Diana Parra Corbacho e9a365b20e tests: clustering_prop_SUITE force stats on every wait 2024-11-14 15:02:47 +01:00
Diana Parra Corbacho 067a54aa40 tests: clustering_SUITE wait for metrics 2024-11-14 15:02:47 +01:00
Simon Unge 3d35416635 Node tags local to broker, add to /api/overview output and ctl status command 2024-11-11 20:49:21 +00:00
Simon Unge eeea517da5 Store tags in global parameters 2024-11-08 21:41:49 +00:00
Simon Unge f5ef64ad06 Add cluster tag config that is exposed via HTTP /api/overview and CTL cluster_status 2024-11-08 21:05:02 +00:00
David Ansari 9d0c851df2 Show session and link details for AMQP 1.0 connection
## What?

On the connection page in the Management UI, display detailed session and
link information including:
* Link names
* Link target and source addresses
* Link flow control state
* Session flow control state
* Number of unconfirmed and unacknowledged messages

 ## How?

A new HTTP API endpoint is added:
```
/connections/:connection_name/sessions
```

The HTTP handler first queries the Erlang connection process to find out about
all session Pids. The handler then queries each Erlang session process
of this connection.

(The table auto-refreshes by default every 5 seconds. The handler querying a single
connection with 60 idle sessions with each 250 links takes ~100 ms.)

For better user experience in the Management UI, this commit also makes the
session process store and expose link names as well as source/target addresses.
2024-11-07 15:11:42 +01:00
Diana Parra Corbacho 3eb2bc4507 Tests: clustering_prop_SUITE set core_metrics_gc_interval to a very low value 2024-11-06 16:59:42 +01:00
David Ansari 3db4a97cfb Expose AMQP connection metrics
Expose the same metrics for AMQP 1.0 connections as for AMQP 0.9.1 connections.

Display the following AMQP 1.0 metrics on the Management UI:
* Network bytes per second from/to client on connections page
* Number of sessions/channels on connections page
* Network bytes per second from/to client graph on connection page
* Reductions graph on connection page
* Garbage colletion info on connection page

Expose the following AMQP 1.0 per-object Prometheus metrics:
* rabbitmq_connection_incoming_bytes_total
* rabbitmq_connection_outgoing_bytes_total
* rabbitmq_connection_process_reductions_total
* rabbitmq_connection_incoming_packets_total
* rabbitmq_connection_outgoing_packets_total
* rabbitmq_connection_pending_packets
* rabbitmq_connection_channels

The rabbit_amqp_writer proc:
* notifies the rabbit_amqp_reader proc if it sent frames
* hibernates eventually if it doesn't send any frames

The rabbit_amqp_reader proc:
* does not emit stats (update ETS tables) if no frames are received
or sent to save resources when there are many idle connections.
2024-11-02 19:08:24 +01:00
Diana Parra Corbacho 7d45609b1a Tests: wait until stats are published, not just collected on the agent 2024-10-10 12:57:14 +02:00
Diana Parra Corbacho 45718fbcf6 Tests: wait until stats are published, not just collected on the agent 2024-10-10 12:34:59 +02:00
Marcial Rosales c9d5ddf89f Deprecate oauth_metadata_url
If oauth_metadata_url is configured, RabbitMQ uses it.
Else it uses the discovery_endpoint url calculated from
issuer and discovery_endpoint_path
2024-10-09 11:01:09 -04:00
Marcial Rosales b21a222abd Remove management.oauth_metadata_url 2024-10-09 11:01:09 -04:00
Marcial Rosales 4b7f8b28e2 Fix schema mapping issues
And location of cert files when running
multioauth test suites locally
2024-10-08 08:17:48 +02:00
Marcial Rosales 6e74d8b60e Always use list() type for urls 2024-10-08 08:17:48 +02:00
Marcial Rosales 6d0e195957 Fix schema issues
And fix selenium script to run
rabbitrmq locally
2024-10-08 08:17:48 +02:00
Marcial Rosales 33da3767a3 Teet extra token parans for additioal resource servers 2024-10-08 08:17:48 +02:00
Marcial Rosales 94a9cf6729 Test authSettings with extra endpoint params 2024-10-08 08:17:48 +02:00
Marcial Rosales 0e80bfb89e Add auth and token endpoint params to authSettings 2024-10-08 08:17:48 +02:00
Marcial Rosales 81342dfbed WIP Elminate defaults and take from config
Add javascript unit tests given that amount of
javascript code it is difficult to get good coverage
with just end-to-end tests
The tests are not running yet because i need to learn
how to use Babel to convert ES5 modules into NodeJs modules
otherwise it is not possible because all the source modules
use ES5 modules whereas tests run from node.js which requires
CommonJS
2024-10-08 08:17:48 +02:00
Marcial Rosales b2532e0c1d Modify management schema
to be able to set extra parameters
for authorize and token endpoints
2024-10-08 08:17:48 +02:00
Michael Klishin d7d1397d4b Update is_quorum_critical_test for #12133
Now the API endpoint can return Khepri as
a "queue" (or "stream") without the necessary
number of replicas online.

So don't expect the list to only have one element.
2024-08-24 21:25:29 -04:00
Michael Klishin 768b2f6925 Update HTTP API tests
This relaxes assert_list/2 assertion to
not require the size of an actually returned list element
to be exactly equal to the size of the expected one.

Sometimes it makes perfect sense to not assert on
every single key but only a subset, and with this
change, it now will be possible.

Individual tests may choose to assert on all
keys by listing them explicitly.
2024-08-24 14:50:37 -04:00
Michael Klishin 1795306f3f HTTP API: make sure virtual host limits are returned as a JSON object
when no limits are set.

This is the classic empty proplist JSON serialization
problem in a relatively new place.
2024-08-21 15:13:53 -04:00
Simon Unge 5189adf144 Add qq status to mgmt api 2024-08-20 23:55:11 -04:00
Michael Klishin 588a1d3a9b rabbit_mgmt_http_SUITE: make users_test less dependent on test execution order 2024-07-03 23:27:27 -04:00