Skip to content
Management

Management

www.rabbitmq.com • November 30, 2026

The RabbitMQ management plugin provides an HTTP-based API for management and monitoring of RabbitMQ nodes and clusters, along with a browser-based UI and a command line tool, rabbitmqadmin .

It periodically collects and aggregates data many aspects of the system. Those metrics are exposed to human operators in the UI. The API it provides can be used by monitoring systems , however, Prometheus is the recommended option for long term storage, alerting, visualisation, chart analysis and so on.

The plugin also provides tools for analysing memory usage of the node, and other features related to monitoring, metrics, user, permission, and topology management. Previously it also provided definition export and import functionality . Those are now core RabbitMQ features and do not require or rely on this plugin.

Basic usage of management UI

The HTTP API provided by the management plugin

General plugin configuration

Reverse proxy (Nginx or Apache) in front of the HTTP API

How to enable HTTPS for management UI and its underlying API

How this plugin operates in multi-node clusters

How to disable metric collection to use Prometheus exclusively for monitoring

How to create a user with limited permissions for monitoring purposes only

How to encrypt HTTP Basic credentials stored by the management UI

Authenticating with OAuth 2

Strict transport security , Content security policy , cross-origin resource sharing , and other security-related headers including hiding the Allow response header

Statistics collection interval

Message rate mode (rate fidelity) and data retention intervals

HTTP API request logging

How to set a management UI login session timeout

How to reset statistics database used by this plugin

The plugin also provides extension points that other plugins, such as rabbitmq-top or rabbitmq-shovel-management , use to extend the UI.

Management UI and External Monitoring Systems ​

Prefer external monitoring options where possible. Infrastructure and kernel-level monitoring is also crucially important to have in any production system.

The management UI and its HTTP API is a built-in monitoring option for RabbitMQ. This is a convenient option for development and in environments where external monitoring is difficult or impossible to introduce.

However, the management UI has a number of limitations:

The monitoring system is intertwined with the system being monitored

A certain amount of overhead

It only stores recent data (think hours, not days or months)

It has a basic user interface

Its design emphasizes ease of use over best possible availability .

Management UI access is controlled via the RabbitMQ permission tags system (or a convention on JWT token scopes)

Long term metric storage and visualisation services such as Prometheus and Grafana or the ELK stack are more suitable options for production systems. They offer:

Decoupling of the monitoring system from the system being monitored

Long term metric storage

Access to additional related metrics such as those of the Erlang runtime ones

More powerful and customizable user interface

Ease of metric data sharing: both metric state and dashboards

Metric access permissions are not specific to RabbitMQ

Collection and aggregation of node-specific metrics which is more resilient to individual node failures

RabbitMQ provides first class support for Prometheus and Grafana as of 3.8. It is recommended for production environments.

The management plugin is included in the RabbitMQ distribution. Like any other plugin , it must be enabled before it can be used. That's done using rabbitmq-plugins :

Node restart is not required after plugin activation.

During automated deployments, the plugin can be enabled via enabled plugin file .

Management UI Access ​

The management UI can be accessed using a Web browser at http:// node-hostname :15672/ .

For example, for a node running on a machine with the hostname of warp10.local , it can be accessed by users with sufficient privileges at either or (provided that localhost resolves correctly).

Note that the UI and HTTP API port — typically 15672 — does not support AMQP 0-9-1, AMQP 1.0, STOMP or MQTT connections. Separate ports should be used by those clients.

Users must be granted permissions for management UI access.

The management UI is implemented as a single page application which relies on the HTTP API . Some of the features include:

Declare, list and delete exchanges, queues , bindings, users, virtual hosts and user permissions . Monitor queue length, message rates (globally and per queue, exchange or channel), resource usage of queue, node GC activity, data rates of client connections, and more. Monitor node resource use: sockets and file descriptors , memory usage breakdown , available disk space and bandwidth usage on inter-node communication links. Manage users (provided administrative permissions of the current user). Manage policies and runtime parameters (provided sufficient permissions of the current user). Export schema (vhosts, users, permissions, queues, exchanges, bindings, parameters, policies) and import it on node start . This can be used for recovery purposes or setup automation of new nodes and clusters. Force close client connections, purge queues. Send and receive messages (useful in development environments and for troubleshooting).

Declare, list and delete exchanges, queues , bindings, users, virtual hosts and user permissions . Monitor queue length, message rates (globally and per queue, exchange or channel), resource usage of queue, node GC activity, data rates of client connections, and more. Monitor node resource use: sockets and file descriptors , memory usage breakdown , available disk space and bandwidth usage on inter-node communication links. Manage users (provided administrative permissions of the current user). Manage policies and runtime parameters (provided sufficient permissions of the current user). Export schema (vhosts, users, permissions, queues, exchanges, bindings, parameters, policies) and import it on node start . This can be used for recovery purposes or setup automation of new nodes and clusters. Force close client connections, purge queues. Send and receive messages (useful in development environments and for troubleshooting).

Monitor queue length, message rates (globally and per queue, exchange or channel), resource usage of queue, node GC activity, data rates of client connections, and more. Monitor node resource use: sockets and file descriptors , memory usage breakdown , available disk space and bandwidth usage on inter-node communication links. Manage users (provided administrative permissions of the current user). Manage policies and runtime parameters (provided sufficient permissions of the current user). Export schema (vhosts, users, permissions, queues, exchanges, bindings, parameters, policies) and import it on node start . This can be used for recovery purposes or setup automation of new nodes and clusters. Force close client connections, purge queues. Send and receive messages (useful in development environments and for troubleshooting).

Monitor queue length, message rates (globally and per queue, exchange or channel), resource usage of queue, node GC activity, data rates of client connections, and more. Monitor node resource use: sockets and file descriptors , memory usage breakdown , available disk space and bandwidth usage on inter-node communication links. Manage users (provided administrative permissions of the current user). Manage policies and runtime parameters (provided sufficient permissions of the current user). Export schema (vhosts, users, permissions, queues, exchanges, bindings, parameters, policies) and import it on node start . This can be used for recovery purposes or setup automation of new nodes and clusters. Force close client connections, purge queues. Send and receive messages (useful in development environments and for troubleshooting).

Monitor node resource use: sockets and file descriptors , memory usage breakdown , available disk space and bandwidth usage on inter-node communication links. Manage users (provided administrative permissions of the current user). Manage policies and runtime parameters (provided sufficient permissions of the current user). Export schema (vhosts, users, permissions, queues, exchanges, bindings, parameters, policies) and import it on node start . This can be used for recovery purposes or setup automation of new nodes and clusters. Force close client connections, purge queues. Send and receive messages (useful in development environments and for troubleshooting).

Monitor node resource use: sockets and file descriptors , memory usage breakdown , available disk space and bandwidth usage on inter-node communication links. Manage users (provided administrative permissions of the current user). Manage policies and runtime parameters (provided sufficient permissions of the current user). Export schema (vhosts, users, permissions, queues, exchanges, bindings, parameters, policies) and import it on node start . This can be used for recovery purposes or setup automation of new nodes and clusters. Force close client connections, purge queues. Send and receive messages (useful in development environments and for troubleshooting).

Manage users (provided administrative permissions of the current user). Manage policies and runtime parameters (provided sufficient permissions of the current user). Export schema (vhosts, users, permissions, queues, exchanges, bindings, parameters, policies) and import it on node start . This can be used for recovery purposes or setup automation of new nodes and clusters. Force close client connections, purge queues. Send and receive messages (useful in development environments and for troubleshooting).

Manage users (provided administrative permissions of the current user). Manage policies and runtime parameters (provided sufficient permissions of the current user). Export schema (vhosts, users, permissions, queues, exchanges, bindings, parameters, policies) and import it on node start . This can be used for recovery purposes or setup automation of new nodes and clusters. Force close client connections, purge queues. Send and receive messages (useful in development environments and for troubleshooting).

Manage policies and runtime parameters (provided sufficient permissions of the current user). Export schema (vhosts, users, permissions, queues, exchanges, bindings, parameters, policies) and import it on node start . This can be used for recovery purposes or setup automation of new nodes and clusters. Force close client connections, purge queues. Send and receive messages (useful in development environments and for troubleshooting).

Manage policies and runtime parameters (provided sufficient permissions of the current user). Export schema (vhosts, users, permissions, queues, exchanges, bindings, parameters, policies) and import it on node start . This can be used for recovery purposes or setup automation of new nodes and clusters. Force close client connections, purge queues. Send and receive messages (useful in development environments and for troubleshooting).

Export schema (vhosts, users, permissions, queues, exchanges, bindings, parameters, policies) and import it on node start . This can be used for recovery purposes or setup automation of new nodes and clusters. Force close client connections, purge queues. Send and receive messages (useful in development environments and for troubleshooting).

Export schema (vhosts, users, permissions, queues, exchanges, bindings, parameters, policies) and import it on node start . This can be used for recovery purposes or setup automation of new nodes and clusters. Force close client connections, purge queues. Send and receive messages (useful in development environments and for troubleshooting).

Force close client connections, purge queues. Send and receive messages (useful in development environments and for troubleshooting).

Force close client connections, purge queues. Send and receive messages (useful in development environments and for troubleshooting).

Send and receive messages (useful in development environments and for troubleshooting).

Send and receive messages (useful in development environments and for troubleshooting).

The UI application supports recent versions of Google Chrome, Safari, Firefox, and Microsoft Edge browsers.

Management UI Access in Clusters ​

Any cluster node with rabbitmq_management plugin enabled can be used for management UI access or data collection by monitoring tools. It will reach out to other nodes and collect their stats, then aggregate and return a response to the client.

To access management UI the user has to authenticate and have certain permissions (be authorised). This is covered in the following section .

Access and Permissions ​

The management UI requires authentication and authorisation , much like RabbitMQ requires it from connecting clients. In addition to successful authentication, management UI access is controlled by user tags. The tags are managed using rabbitmqctl . Newly created users do not have any tags set on them by default.

See Deployment Guidelines for general recommendations on user and credential management.

Anything the user could do via messaging protocols plus: List virtual hosts to which they can log in via AMQP View all queues, exchanges and bindings in "their" virtual hosts View and close their own channels and connections View "global" statistics covering all their virtual hosts, including activity by other users within them policymaker Everything "management" can plus: View, create and delete policies and parameters for virtual hosts to which they can log in via AMQP monitoring Everything "management" can plus: List all virtual hosts, including ones they could not access using messaging protocols View other users's connections and channels View node-level data such as memory use and clustering View truly global statistics for all virtual hosts administrator Everything "policymaker" and "monitoring" can plus: Create and delete virtual hosts View, create and delete users View, create and delete permissions Close other users's connections

List virtual hosts to which they can log in via AMQP View all queues, exchanges and bindings in "their" virtual hosts View and close their own channels and connections View "global" statistics covering all their virtual hosts, including activity by other users within them

View all queues, exchanges and bindings in "their" virtual hosts View and close their own channels and connections View "global" statistics covering all their virtual hosts, including activity by other users within them

View all queues, exchanges and bindings in "their" virtual hosts View and close their own channels and connections View "global" statistics covering all their virtual hosts, including activity by other users within them

View and close their own channels and connections View "global" statistics covering all their virtual hosts, including activity by other users within them

View "global" statistics covering all their virtual hosts, including activity by other users within them

View "global" statistics covering all their virtual hosts, including activity by other users within them

Everything "management" can plus: View, create and delete policies and parameters for virtual hosts to which they can log in via AMQP monitoring Everything "management" can plus: List all virtual hosts, including ones they could not access using messaging protocols View other users's connections and channels View node-level data such as memory use and clustering View truly global statistics for all virtual hosts administrator Everything "policymaker" and "monitoring" can plus: Create and delete virtual hosts View, create and delete users View, create and delete permissions Close other users's connections

View, create and delete policies and parameters for virtual hosts to which they can log in via AMQP

View, create and delete policies and parameters for virtual hosts to which they can log in via AMQP

Everything "management" can plus: List all virtual hosts, including ones they could not access using messaging protocols View other users's connections and channels View node-level data such as memory use and clustering View truly global statistics for all virtual hosts administrator Everything "policymaker" and "monitoring" can plus: Create and delete virtual hosts View, create and delete users View, create and delete permissions Close other users's connections

List all virtual hosts, including ones they could not access using messaging protocols View other users's connections and channels View node-level data such as memory use and clustering View truly global statistics for all virtual hosts

List all virtual hosts, including ones they could not access using messaging protocols View other users's connections and channels View node-level data such as memory use and clustering View truly global statistics for all virtual hosts

View other users's connections and channels View node-level data such as memory use and clustering View truly global statistics for all virtual hosts

View node-level data such as memory use and clustering View truly global statistics for all virtual hosts

View truly global statistics for all virtual hosts

Everything "policymaker" and "monitoring" can plus: Create and delete virtual hosts View, create and delete users View, create and delete permissions Close other users's connections

Create and delete virtual hosts View, create and delete users View, create and delete permissions Close other users's connections

View, create and delete users View, create and delete permissions Close other users's connections

View, create and delete permissions Close other users's connections

Close other users's connections

Note that since "administrator" does everything "monitoring" does, and "monitoring" does everything "management" does, each user often needs a maximum of one tag.

Normal RabbitMQ permissions to resources still apply to monitors and administrators; just because a user is a monitor or administrator does not grant them full access to exchanges, queues and bindings through the management plugin or other means.

All users can only list objects within the virtual hosts they have any permissions for.

Monitoring-Only (Read-Only) Access ​

Some users are created exclusively for observability purposes . More specifically, such users need to list all objects and inspect their metrics but not have the permissions to add or delete entities ( queues , streams , exchanges, bindings, and so on). Such users also do not need to publish or consume messages.

This can be accomplished by

Creating a user tagged as monitoring

Granting it permissions ( configure , read , write ) that are empty (will match no objects)

Both steps can be accomplished using the management UI or the HTTP API , or, if those options are not available or optimal, using CLI tools :

rabbitmqctl add_user can be used to create the user

rabbitmqctl set_permissions to grant the user the desired permissions and finally,

rabbitmqctl set_user_tags to tag it with monitoring , which will grant them management UI access

Command Line Examples: Create a User with Monitoring-Only Access ​

The following example creates a user with complete access to the management UI/HTTP API (as in, all virtual hosts and management features):

Encrypted HTTP Basic Credentials ​

When management.credentials_encryption_secret is set, the server returns a bearer token upon a successful login whose value is an encrypted form of the username:password pair. The management UI stores that token in localStorage , just as it previously stored the Base64-encoded username:password , and uses it for every subsequent API request.

This feature applies exclusively to HTTP Basic credentials used by the management UI. It has no effect on JWT tokens, OAuth 2.0 access tokens, or any other authentication mechanism.

This feature is opt-in and has no effect unless the setting is configured. When it is configured, the server continues to accept ordinary HTTP Basic authentication, so REST API clients and command-line tools that use Basic auth are unaffected.

The secret must be identical on every node in the cluster, because any node can handle management UI requests. A mismatch between nodes will cause authentication failures for users whose requests are routed to a node with a different secret.

To enable HTTP Basic credential encryption, set the secret to any string value:

To avoid storing the secret in plaintext, use RabbitMQ's configuration value encryption feature. Encrypt the value with rabbitmqctl encrypt_conf_value and use the resulting encrypted: prefix in the configuration file:

Authenticating with OAuth 2 ​

You can configure RabbitMQ to use JWT-encoded OAuth 2.0 access tokens to authenticate client applications, however, to use OAuth 2.0 authentication in the management UI, you have to configure it separately.

There are two ways to initiate OAuth 2.0 authentication in the management UI:

Service-Provided Initiated login . The is the OAuth method and the default way to initiate authentication in the management UI. It uses the OAuth 2.0 Authorization Code Flow with PKCE to redirect users to the configured OAuth 2.0 provider to authenticate. When they are authenticated, users get an access token, and are then returned back to the management UI where they are automatically logged in. The management UI is tested against these OAuth 2.0 providers: UAA Keycloak Auth0 Azure OAuth2 Proxy Okta

Service-Provided Initiated login . The is the OAuth method and the default way to initiate authentication in the management UI. It uses the OAuth 2.0 Authorization Code Flow with PKCE to redirect users to the configured OAuth 2.0 provider to authenticate. When they are authenticated, users get an access token, and are then returned back to the management UI where they are automatically logged in. The management UI is tested against these OAuth 2.0 providers:

Identity-Provider Initiated login . For this type of login, users must come to RabbitMQ with an access token.This type of authentication is typical in portals which offers access to various applications/services to authenticated users. One of those services could be one or many RabbitMQ clusters. When a user requests access to a RabbitMQ cluster, the portal forwards the user to RabbitMQ's management UI with an access token issued for the user and RabbitMQ cluster. This type of authentication is covered in the sub-section Identity-Provider initiated logon .

Identity-Provider Initiated login . For this type of login, users must come to RabbitMQ with an access token.This type of authentication is typical in portals which offers access to various applications/services to authenticated users. One of those services could be one or many RabbitMQ clusters. When a user requests access to a RabbitMQ cluster, the portal forwards the user to RabbitMQ's management UI with an access token issued for the user and RabbitMQ cluster. This type of authentication is covered in the sub-section Identity-Provider initiated logon .

To configure OAuth 2.0 in the management UI you need a minimum configuration . However, you may require additional configuration depending on your use case:

Allow Basic and OAuth 2 authentication for management HTTP API

Allow Basic and OAuth 2 authentication for management UI

Logging out of the management UI

Configure extra parameters for authorization and token endpoints

Special attention to CSP header connect-src

Identity-Provider initiated logon

Logout from Identity-Provider initiated logon

Support multiple OAuth 2.0 resources

Preselect or predetermine authentication mechanism

Minimum configuration ​

The first section is the minimum configuration required to use OAuth 2.0 authentication in the management UI. The following sections explain how to further configure OAuth 2.0 depending of the use cases.

Given the following configuration of the OAuth 2.0 plugin :

To use OAuth 2.0 authentication, apply the following configuration in the management UI:

oauth_enabled is a mandatory field

oauth_enabled is a mandatory field

oauth_client_id is a mandatory field. It is the OAuth Client Id associated with this RabbitMQ cluster in the OAuth Provider, and it is used to request a token on behalf of the user.

oauth_client_id is a mandatory field. It is the OAuth Client Id associated with this RabbitMQ cluster in the OAuth Provider, and it is used to request a token on behalf of the user.

oauth_scopes is a mandatory field which must be set at all times except in the case when OAuth providers automatically grant scopes associated to the oauth_client_id . oauth_scopes is a list of space-separated strings that indicate which permissions the application is requesting. Most OAuth providers only issue tokens with the scopes requested during the user authentication. RabbitMQ sends this field along with its oauth_client_id during the user authentication. If this field is not set, RabbitMQ defaults to openid profile .

oauth_scopes is a mandatory field which must be set at all times except in the case when OAuth providers automatically grant scopes associated to the oauth_client_id . oauth_scopes is a list of space-separated strings that indicate which permissions the application is requesting. Most OAuth providers only issue tokens with the scopes requested during the user authentication. RabbitMQ sends this field along with its oauth_client_id during the user authentication. If this field is not set, RabbitMQ defaults to openid profile .

Given above configuration, when a user visits the management UI, the following two events take place:

If RabbitMQ cannot download the OpenID provider configuration, it shows an error message and the OAuth 2.0 authentication option will be disabled in the management UI

management.oauth_metadata_url and management.oauth_resource_servers.$id.oauth_metadata_url are deprecated. You should configure the OpenId Discovery endpoint's path as it is explained here . These two settings will no longer exist in RabbitMQ 4.2.0. In the meantime, RabbitMQ will support them until you update your configuration.

If you used to configure auth_oauth2.metadata_url because your provider used a slightly different OpenId Discovery endpoint url, since RabbitMQ 4.1 you should instead configure the correct path and/or include any additional parameters. Please read this section of the documentation where it is explained how to do it. auth_oauth2.metadata_url may be deprecated in future versions.

Configure client secret ​

Important : From the OAuth 2.0 point of view, the management UI is a public app which means it cannot securely store credentials such as the client_secret . This means that RabbitMQ should not need to present a client_secret when authenticating users.

However, there could be OAuth Providers which requires a client_secret either for the initial user authentication request or for the token refresh request. For instance, UAA server requires client_secret to refresh the token. For these cases, it is possible to configure oauth_client_secret like shown below:

Allow Basic and OAuth 2 authentication for Management HTTP API ​

When using management.oauth_enabled = true , it is still possible to authenticate with HTTP basic authentication against the HTTP API. This means both of the following examples will work:

To switch to authenticate using OAuth 2 exclusively for management HTTP access, set the management.disable_basic_auth configuration key to true :

When setting management.disable_basic_auth to true , only the Bearer (token-based) authorization method will work, for example:

This is true for all endpoints except GET /definitions and POST /definitions . Those endpoints require the token to be passed in the token query string parameter.

Allow Basic and OAuth 2 authentication for management UI ​

When using management.oauth_enabled = true , it is still possible to authenticate with HTTP basic authentication in the management UI.

To support OAuth 2.0 and Basic Authentication, set the management.oauth_disable_basic_auth configuration key to false :

Logging out of the management UI ​

RabbitMQ implements the OpenID Connect RP-Initiated Logout 1.0 specification to logout users from the management UI and from the OAuth Provider. It works as follows:

The user clicks Logout .

If the OpenId Connect Discovery endpoint returns an end_session_endpoint , the management UI sends a logout request to that endpoint to close the user's session in the OAuth Provider. When the request completes, the user is also logged out from the management ui.

If there is no end_session_endpoint returned, then the user is only logged out from the management UI.

If the OpenId Connect Discovery endpoint does not return an end_session_endpoint , you can configure it in the OAuth 2.0 authentication backend plugin .

RabbitMQ 3.13.1 and earlier versions require the OpenId Connect Discovery endpoint end_session_endpoint returned for OAuth 2.0 authentication to work.

There are other two additional scenarios which can trigger a logout. One scenario occurs when the OAuth Token expires. Although RabbitMQ renews the token in the background before it expires, if the token expires, the user is logged out. The second scenario is when the management UI session exceeds the maximum allowed time configured on the Login Session Timeout .

Configure extra parameters for authorization and token endpoints ​

There are some OAuth 2.0 providers which require extra parameters in the request sent to the authorization endpoint and/or to the token endpoint . These parameters are custom parameters. The Management UI already sends all the parameters required by the OAuth 2.0 Authorization Code flow.

Here is an example of setting an extra parameter called audience for both endpoints, the authorization and token endpoint:

You can configure as many parameters as you need.

Special attention to CSP header connect-src ​

To support the OAuth 2.0 protocol, RabbitMQ makes asynchronous REST calls to the OpenId Connect Discovery endpoint . If you override the default CSP headers , you have to make sure that the connect-src CSP directive whitelists the OpenId Connect Discovery endpoint .

For instance, if you configured the CSP header with the value default-src 'self' , you are, by default, setting connect-src 'self' which means you are denying RabbitMQ access to any external endpoint; hence disabling OAuth 2.0.

In addition to the connect-src CSP header, RabbitMQ also needs the CSP directives unsafe-eval unsafe-inline , otherwise the OAuth 2.0 functionality may not work.

Identity-Provider initiated logon ​

RabbitMQ exposes a setting called management.oauth_initiated_logon_type whose default value sp_initiated . To use an Identity-Provider initiated logon you set it to idp_initiated .

With the settings, the management UI exposes the HTTP endpoint /login which accepts content-type: application/x-www-form-urlencoded and it expects the JWT token in the access_token form field. This is the endpoint where the Web portal will redirect users to the management UI. Additionally, RabbitMQ also accepts a JWT token in the HTTP Authorization header when the user lands on the management UI.

With sp_initiated logon types, there is no need to configure the oauth_provider_url if auth_oauth2.issuer was set. However, for idp_initiated flows the auth_oauth2.issuer url may not necessarily be the url where to send users to authenticate. When this occurs, the management.oauth_provider_url overrides the auth_oauth2.issuer url.

Logout from Identity-Provider logon ​

If end_session_endpoint is configured, on logout the user is redirected to that endpoint. Otherwise, the user is redirected to management.oauth_provider_url . Use end_session_endpoint when the identity provider must close the user's session and perform cleanup before redirecting to the identity provider's root URL.

The following example uses a keycloak identity provider. The end_session_endpoint points to a proxy's sign_out endpoint:

Support multiple OAuth 2.0 resources ​

To configure multiple OAuth 2.0 resources in the management UI, you first configure them in the OAuth 2.0 plugin . Let's say you have the following OAuth 2.0 plugin configuration which consists of four OAuth 2.0 resources:

The sections configure these resources in the management UI.

How OAuth 2.0 resources are presented to users ​

Resources are listed in the order in which they were configured.

You can have some resources configured with sp_initiated log-on and others with idp_initiated log-on. You can disable a resource so that the resource does not appear as an option in the drop-down .

Optionally set common settings for all resources ​

If the majority of resources have in common some configuration values, you set them like shown below:

Here we have configured that all resources, or the majority of them, requires sp_initiated logon type and the scopes claimed to the Authorization Server are openid rabbitmq.tag:management rabbitmq.read:*/* .

sp_initiated is the default value for management.oauth_initiated_logon_type , therefore you would not need to configure it.

Override default oauth_initiated_logon_type for each resource ​

Let's say that the resource rabbit_qa requires idp_initiated logon however the logon type configured for all resources is sp_initiated . The configuration below overrides the logon type and also the URL of the OAuth Provider.

Set oauth_client_id setting, if required, and the label for each resource ​

, configure the oauth_client_id for each resource which uses sp_initiated logon type.

This is the minimum setting required for sp_initiated logon type. The following example that exposes the resource rabbit_prod with its oauth_client_id and its label . If you do not specify the label , the management UI uses the id instead.

With this configuration, when the user chooses to option RabbitMQ Production , RabbitMQ initiates the Authorization Code flow which takes the user to the URL configured in auth_oauth2.issuer with the following settings:

client_id : rabbit_prod_mgt_ui

resource : rabbit_prod

scopes : openid rabbitmq.tag:management rabbitmq.read:*/*

Configure extra parameters for authorization and token endpoints ​

There are some OAuth 2.0 providers which require extra parameters in the request sent to the authorization endpoint and/or to the token endpoint . These parameters are custom parameters and specified per resource. The Management UI already sends all the parameters required by the OAuth 2.0 Authorization Code flow.

Here is an example of setting an extra parameter called audience for both endpoints for the resource some-resource-id :

Optionally do not expose some resources in the management UI ​

You may not want to expose all configured resources in the OAuth 2.0 plugin. For instance, in the following example, you are not exposing the resource rabbit_internal which is left for applications to authenticate via one of the messaging protocols.

Management UI screenshot without Basic Authentication ​

This is the management UI layout for the configuration with basic authentication deactivated in the management UI ( management.oauth_disable_basic_auth = true ).

Management UI screenshot with Basic Authentication ​

And this is the management UI with Basic Authentication activated ( management.oauth_disable_basic_auth = false ).

Preselect or predetermine authentication mechanism ​

To preselect or predetermine the authentication mechanism, users must be sent to the /login endpoint with the appropriate request parameters. The management UI then redirects them back to the page configured according to their preferred authentication mechanism.

The following request parameters control the behaviour:

Preselection Mode ( preferred_auth_mechanism ) ​

Use the preferred_auth_mechanism request parameter to preselect an authentication method while still showing all options.

OAuth 2.0 resource : /login?preferred_auth_mechanism=oauth2:rabbit_dev Expands the OAuth 2.0 section and collapses the basic authentication section in the page Preselects the OAuth 2.0 resource server, such as rabbit_dev

OAuth 2.0 resource : /login?preferred_auth_mechanism=oauth2:rabbit_dev

Expands the OAuth 2.0 section and collapses the basic authentication section in the page

Preselects the OAuth 2.0 resource server, such as rabbit_dev

Basic authentication : /login?preferred_auth_mechanism=basic Expands the basic authentication section and collapses the OAuth 2.0 section

Basic authentication : /login?preferred_auth_mechanism=basic

Expands the basic authentication section and collapses the OAuth 2.0 section

Strict Mode ( strict_auth_mechanism ) ​

Use the strict_auth_mechanism parameter to show only the specified authentication method. Other methods are hidden.

OAuth 2.0 resource only : /login?strict_auth_mechanism=oauth2:rabbit_dev

No other authentication options are displayed

Basic authentication only : /login?strict_auth_mechanism=basic Shows only the basic authentication form No OAuth 2.0 options are displayed

Basic authentication only : /login?strict_auth_mechanism=basic

Shows only the basic authentication form

No OAuth 2.0 options are displayed

Troubleshooting management UI access in OAuth 2-enabled clusters is a companion guide dedicated to common OAuth 2-specific issues.

See HTTP API reference .

HTTP API and Monitoring ​

The API is intended to be used for basic observability tasks. Prometheus and Grafana are recommended for long term metric storage, alerting, anomaly detection, and so on.

Any cluster node with rabbitmq-management plugin activated can be used for management UI access or HTTP API access. It will reach out to other nodes and collect their stats, then aggregate and return a response to the client.

When using the API in a cluster of nodes, there is no need to each node via HTTP API individually. Instead, a random node or a load balancer that sits in front of the cluster.

HTTP API Clients and Tooling ​

rabbitmqadmin v2 is a command-line tool that interacts with the HTTP API.

For HTTP API clients in several languages, see Developer Tools .

Maximum HTTP Request Body Limit ​

A few RabbitMQ HTTP API endpoints can potentially receive large payloads, most notably the endpoint used for definition import .

The default HTTP request body limit is 20 MiB. If such large definition files are not used in a cluster, the limit can be reduced:

When a client issues requests with a body that exceeds the limit, a 400 Bad Request response will be returned.

Using a Reverse Proxy in front of the HTTP API ​

It may be necessary to put a reverse proxy in front of a RabbitMQ cluster. Reverse proxy setup for RabbitMQ may require careful handling of encoded slashes in paths if default virtual host ( / ) is used.

If default virtual host is not used, the additional settings to support encoded URIs will not be necessary. In other words, both Nginx and Apache configuration will require the standard minimum for any HTTP-based service.

If RabbitMQ HTTP API access is configured for the root location ( / ), the location must not have a slash at the end:

If a different location will be used to proxy requests to the HTTP API, a URI rewrite rule must be used:

To support encoded slashes in URIs, Apache requires users to explicitly enable AllowEncodedSlashes .

for the Apache virtual host. Apache needs both mod_proxy and mod_proxy_http enabled. The location also needs a nocanon setting :

There are several configuration options which affect the management plugin. These are managed through the main RabbitMQ configuration file .

It is possible to configure HTTP API and management UI to use a different port or network interface, enable HTTPS and so on.

While rarely needed, it is possible to configure multiple listeners (ports), for example to both enable HTTPS and retain support for clients that can only use HTTP (without TLS).

The port is configured using the management.tcp.port key:

It is possible to configure what interface the API endpoint will use, similarly to messaging protocol listeners , using the management.tcp.ip key:

To check what interface and port is used by a running node, use rabbitmq-diagnostics :

or tools such as lsof , ss or netstat .

More TLS options can be configured for the HTTPS listener.

Below is the same example in the classic config format .

The classic config format example is provided primarily for completeness sake, using the modern rabbitmq.conf format for configuring this plugin is highly recommended .

Using HTTP and HTTPS Together ​

It is possible to use both HTTP and HTTPS on different ports:

The same configuration keys can be used to configure a single listener (just HTTP or HTTPS) and match those used by the Web STOMP and Web MQTT .

Advanced HTTP Options ​

Cowboy , the embedded Web server used by the management plugin, provides a number of options that can be used to customize the behavior of the server. Most of the options were introduced in RabbitMQ 3.7.9.

Response Compression ​

Response compression is enabled by default. To enable it explicitly, use management.tcp.compress :

Client Inactivity Timeouts ​

Some HTTP API endpoints respond quickly, others may need to return or stream a sizeable data set to the client (for example many thousands of connections) or perform an operation that takes time proportionally to the input (for example import a large definitions file ). In those cases the amount of time it takes to process the request can exceed certain timeouts in the Web server as well as HTTP client.

It is possible to bump Cowboy timeouts using the management.tcp.idle_timeout , management.tcp.inactivity_timeout , management.tcp.request_timeout options.

management.tcp.inactivity_timeout controls HTTP(S) client's TCP connection inactivity timeout. When it is reached, the connection will be closed by the HTTP server.

management.tcp.request_timeout controls the window of time in which the client has to send an HTTP request.

management.tcp.idle_timeout controls the window of time in which the client has to send more data (if any) within the context of an HTTP request.

If a load balancer or proxy is used between HTTP clients and the management HTTP server, the inactivity_timeout and idle_timeout values should be at least as large, and often greater than, the timeout and inactivity values used by the load balancer.

Here are some example configuration snippets that modify the timeouts:

All values are in milliseconds. Their defaults vary:

management.tcp.inactivity_timeout has the default of 300 seconds

management.tcp.request_timeout has the default of 60 seconds

management.tcp.idle_timeout has the default of 5 seconds

It is recommended that if the inactivity or idle timeout need changing, management.tcp.inactivity_timeout value should match or be greater than that of management.tcp.idle_timeout .

management.tcp.request_timeout typically does not need increasing as clients send a request shortly after establishing a TCP connection.

HTTP Request Logging ​

RabbitMQ nodes do not log any HTTP API requests by default.

To enable HTTP API access logging, use the management.http_log_dir key to configure the path of a directory in which the access log log files can be created by the node:

For the change to have an effect, restart the plugin or the node.

Statistics Interval ​

Increasing this value will reduce CPU resource consumption of stats collection in environments with a large number of stats emitting entities such as connections , channels , queues .

In order to do so, set the value of the collect_statistics_interval configuration key to the desired interval in milliseconds and restart the node:

The management plugin by default shows message rates globally, and for each queue, channel, exchange, and vhost. These are known as the basic message rates.

It can also show message rates for all the combinations of channel to exchange, exchange to queue, and queue to channel. These are known as detailed message rates. Detailed message rates are disabled by default as they can have a large memory footprint when there are a large number of combinations of channels, queues and exchanges.

Alternatively, the message rates can be disabled altogether. This can help get reduce CPU resource consumption of the plugin.

The message rate mode is controlled by the management.rates_mode configuration key:

Supported values are basic (the default), detailed , and none .

Sample (Data Point) Retention ​

The management plugin will retain samples of some data such as message rates and queue lengths. Depending on how long the data is retained, some time range options on UI charts may be incomplete or unavailable.

There are three policies:

global : how long to retain data for the overview and virtual host pages

basic : how long to retain data for individual connections, channels, exchanges and queues

detailed : how long to retain data for message rates between pairs of connections, channels, exchanges and queues (as shown under "Message rates breakdown")

Below is a configuration example:

The configuration in the example above retains global data at a 5 second resolution (sampling happens every 5 seconds) for a minute, then at a 1 minute (60 second) resolution for 1 hour, then at a 20 minute resolution for one day. It retains basic data at a 5 second resolution for 1 minute, at a 1 minute (60 second) resolution for 1 hour, and detailed data only for 10 seconds.

All three policies are mandatory, and must contain at least one retention setting (period).

Disable Statistics and Metric Collection ​

It is possible to disable the statistics in the UI and HTTP API in order for these to be used only for operations. This can be a useful feature if external monitoring solutions such as Prometheus and Grafana are being used. If statistics are disabled in any of the following ways, all charts and detailed statistics will be hidden in the UI.

In order to completely disable the internal metrics collection, the disable_metrics_collector flag must be set in the rabbitmq_management_agent plugin. The Prometheus plugin will still work even if collection is disabled.

Disabling the metrics collection is the preferred option if it is being used with an external monitoring system, as this reduced the overhead that statistics collection and aggregation causes in the broker. If the statistics are only temporary disabled, or are not required in some HTTP API queries, the aggregation of the stats can be disabled in the rabbitmq_management plugin. The disable flag can be also passed as part of the query string in the URI.

As at the moment the Prometheus plugin cannot report individual queue totals, there is a configuration option that allows to list messages , messages_ready and messages_unacknowledged in the queues endpoint.

Below is a configuration example that disables the statistics but returns individual queue totals in the queues page:

Content Security Policy (CSP) ​

It is possible to configure what CSP header value is used by HTTP API responses. The default value is script-src 'self' 'unsafe-eval' 'unsafe-inline'; object-src 'self' :

The value can be any valid CSP header string:

Wildcards are also allowed:

A CSP policy frame-ancestors directive can be used to prevent frame embedding of the management UI, mitigating certain types of cross-frame scripting attacks:

Strict Transport Security (HSTS) ​

It is possible to configure what Strict Transport Security header value is used by HTTP API responses:

Cross-origin Resource Sharing (CORS) ​

The management UI application will by default refuse access to websites hosted on origins different from its own using the Cross-Origin Resource Sharing mechanism, also known as CORS. It is possible to white list origins:

It is possible to allow any origin to use the API using a wildcard. This is highly discouraged for deployments where the UI application may be exposed to the public.

The CORS pre-flight requests are cached by the browser. The management plugin defines a timeout of 30 minutes by default. The value can be changed. It is configured in seconds:

Other Security-related Headers ​

It is possible to set a few more security-related headers for management UI and HTTP API responses. Note that some of them have been superseded by CORS and other newer development in the browser security space.

The supported headers are:

X-Content-Type-Options

Referrer-Policy : no-referrer and same-origin prevent the management UI origin from being sent to external sites; without this header, browsers default to strict-origin-when-cross-origin , which does send the origin

They can be combined with the aforementioned CORS, HSTS, CSP headers:

Hiding the Allow Response Header ​

When management.http.hide_allow_header is set to true , the Allow header is removed from all responses except 405 Method Not Allowed , where RFC 9110 requires it to be present:

This setting is disabled ( false ) by default.

Login Session Timeout ​

After the user logs in, the user's web UI login session will expire after 8 hours by default. It is possible to configure a different timeout using the login_session_timeout setting.

The value should be an integer: it controls the length of login session in minutes. When the time is up, the user will be signed out.

The following example sets the session timeout to 1 hour:

Some environments require the use of a custom prefix for all HTTP requests to the management plugin. The management.path_prefix setting allows an arbitrary prefix to be set for all HTTP request handlers in the management...

The full story

This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.

RabbitMQ OAuth2 Proxy Flaw Allows Unauthenticated Admin Token Minting (GHSA-cfvg-5q96-8mhm) RabbitMQ maintainers disclosed GHSA-cfvg-5q96-8mhm, a critical missing-authentication flaw (CWE-306, CVSS v4.0 9.1) in the management plugin's OAuth2 token-endpoint proxy. According to the advisory and reporting, the proxy accepted unauthenticated requests and injected the broker's configured client secret, allowing anonymous callers to obtain signed tokens with attacker-chosen scopes on deployments following the documented OAuth2 management setup. The researcher, credited as shanz0ng, reportedly demonstrated on the RabbitMQ 4.4.0 management Docker image that a minted token granted administrator rights, could create a persistent admin account, and could authenticate over AMQP 0-9-1 to access queues and messages across virtual hosts. Full administrator access depends on the identity provider granting the client administrator scopes. Affected versions listed are 4.4.0, 4.3.3 through 4.3.7, and 4.2.9 through 4.2.12; fixed releases are 4.4.1, 4.3.8, and 4.2.13. Reporting states fixed 4.4.x and 4.3.x releases shipped November 16, eleven days before the November 27 advisory, and that 4.2.13 is available only through Broadcom. No CVE identifier has been assigned in the sources, and no has been reported. Patching does not remove any admin accounts already created through the flaw, and the advisory does not describe how to detect prior token minting. Interim mitigations are removing the management.oauth_client_secret setting (which may break some identity-provider flows) or placing authentication in front of the management port. 5 sources 76

Extracted Entities