Skip to content

Commit 40735cf

Browse files
Merge branch 'sasl-anonymous'
2 parents bdc1376 + 67edea1 commit 40735cf

File tree

17 files changed

+86
-49
lines changed

17 files changed

+86
-49
lines changed

docs/access-control.md

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -770,8 +770,8 @@ auth_backends.2 = internal
770770
## Authentication Mechanisms {#mechanisms}
771771

772772
RabbitMQ supports multiple SASL authentication
773-
mechanisms. There are three such mechanisms built into the
774-
server: <code>PLAIN</code>, <code>AMQPLAIN</code>,
773+
mechanisms. There are four such mechanisms built into the
774+
server: <code>PLAIN</code>, <code>AMQPLAIN</code>, <code>ANONYMOUS</code>,
775775
and <code>RABBIT-CR-DEMO</code>, and one — <code>EXTERNAL</code> —
776776
available as a [plugin](https://github.com/rabbitmq/rabbitmq-auth-mechanism-ssl).
777777

@@ -806,6 +806,18 @@ The built-in mechanisms are:
806806
</td>
807807
</tr>
808808

809+
<tr>
810+
<td>ANONYMOUS</td>
811+
<td>
812+
This mechanism is enabled by default allowing anonymous clients to connect without providing
813+
any credentials. RabbitMQ will internally authenticate and authorize the client using the credentials
814+
configured in <code>anonymous_login_user</code> and <code>anonymous_login_pass</code> (both are set to <code>guest</code> by default).
815+
In other words, any unauthenticated client will be able to connect and act as the configured <code>anonymous_login_user</code>.
816+
<strong>For production environments, remove this mechanism.</strong>
817+
See the [Deployment Guidelines](http://localhost:3000/docs/next/production-checklist#anonymous-login) documentation.
818+
</td>
819+
</tr>
820+
809821
<tr>
810822
<td>EXTERNAL</td>
811823
<td>
@@ -826,15 +838,22 @@ The built-in mechanisms are:
826838

827839
### Mechanism Configuration in the Server {#server-mechanism-configuration}
828840

829-
The configuration variable <code>auth_mechanisms</code> in
830-
the <code>rabbit</code> application determines which of the
831-
installed mechanisms are offered to connecting clients. This
832-
variable should be a list of atoms corresponding to
833-
mechanism names, for example
834-
<code>['PLAIN', 'AMQPLAIN']</code> by default. The server-side list is not
835-
considered to be in any particular order. See the
836-
[configuration file](./configure#configuration-files)
837-
documentation.
841+
The <code>auth_mechanisms</code> configuration key determines which of the
842+
installed mechanisms are offered to connecting clients.
843+
844+
This variable should be a list of accepted values corresponding to
845+
mechanism names, for example, the following list
846+
847+
``` ini
848+
auth_mechanisms.1 = PLAIN
849+
auth_mechanisms.2 = AMQPLAIN
850+
auth_mechanisms.3 = ANONYMOUS
851+
```
852+
853+
is used by default.
854+
855+
The server mechanisms are ordered in decreasing level of preference.
856+
See the [configuration file](./configure#configuration-files) documentation.
838857

839858

840859
### Mechanism Configuration in the Client {#client-mechanism-configuration}

docs/configure.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ and more.
4848

4949
Since configuration affects many areas of the system, including plugins, individual [documentation guides](./index.md)
5050
dive deeper into what can be configured. [Runtime Tuning](./runtime) is a companion to this guide that focuses
51-
on the configurable parameters in the runtime. [Production Checklist](./production-checklist) is a related guide
51+
on the configurable parameters in the runtime. [Deployment Guidelines](./production-checklist) is a related guide
5252
that outlines what settings will likely need tuning in most production environments.
5353

5454

@@ -1113,8 +1113,11 @@ management_db_cache_multiplier = 5
11131113
<p>
11141114
Default:
11151115
```ini
1116+
# see the Access Control guide to learn more
11161117
auth_mechanisms.1 = PLAIN
11171118
auth_mechanisms.2 = AMQPLAIN
1119+
# see the Access Control and Deployment Guidelines guides to learn more
1120+
auth_mechanisms.3 = ANONYMOUS
11181121
```
11191122
</p>
11201123
</td>
@@ -2304,7 +2307,7 @@ and more. To Linux users these limits can be known as "ulimit limits".
23042307
23052308
RabbitMQ nodes are most commonly affected by the maximum [open file handle limit](./networking#open-file-handle-limit).
23062309
Default limit value on most Linux distributions is usually 1024, which is very low for a messaging broker (or generally, any data service).
2307-
See [Production Checklist](./production-checklist) for recommended values.
2310+
See [Deployment Guidelines](./production-checklist) for recommended values.
23082311
23092312
### Modifying Limits
23102313

docs/ec2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,5 @@ Several other guides cover topics highly relevant for running RabbitMQ clusters
118118
* [Peer Discovery](./cluster-formation)
119119
* [Configuration](./configure)
120120
* [Monitoring](./monitoring)
121-
* [Production Checklist](./production-checklist)
121+
* [Deployment Guidelines](./production-checklist)
122122
* [File and Directory Locations](./relocate)

docs/install-debian.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ systemctl start rabbitmq-server
892892

893893
On most systems, a node should be able to start and run with all defaults.
894894
Please refer to the [Configuration guide](./configure) to learn more
895-
and [Production Checklist](./production-checklist) for guidelines beyond
895+
and [Deployment Guidelines](./production-checklist) for guidelines beyond
896896
development environments.
897897

898898
Note: the node is set up to run as system user `rabbitmq`.

docs/install-rpm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ systemctl stop rabbitmq-server
520520

521521
On most systems, a node should be able to start and run with all defaults.
522522
Please refer to the [Configuration guide](./configure) to learn more
523-
and [Production Checklist](./production-checklist) for guidelines beyond
523+
and [Deployment Guidelines](./production-checklist) for guidelines beyond
524524
development environments.
525525

526526
Note: the node is set up to run as system user `rabbitmq`.

docs/management/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ it from connecting clients. In addition to successful authentication, management
194194
The tags are managed using [rabbitmqctl](./man/rabbitmqctl.8#set_user_tags).
195195
Newly created users do not have any tags set on them by default.
196196

197-
See [Production Checklist](./production-checklist) for general recommendations on user and credential
197+
See [Deployment Guidelines](./production-checklist) for general recommendations on user and credential
198198
management.
199199

200200
<table>
@@ -355,7 +355,7 @@ rabbitmqctl set_permissions --vhost "vhost-name" "monitoring" "^$" "^$" "^$"
355355

356356
## Authenticating with OAuth 2 {#oauth2-authentication}
357357

358-
You can configure RabbitMQ to use [JWT-encoded OAuth 2.0 access tokens](https://github.com/rabbitmq/rabbitmq-server/tree/main/deps/rabbitmq_auth_backend_oauth2) to authenticate client applications, however, to use OAuth 2.0 authentication in the management UI, you have to configure it separately.
358+
You can configure RabbitMQ to use [JWT-encoded OAuth 2.0 access tokens](https://github.com/rabbitmq/rabbitmq-server/tree/main/deps/rabbitmq_auth_backend_oauth2) to authenticate client applications, however, to use OAuth 2.0 authentication in the management UI, you have to configure it separately.
359359

360360
There are two ways to initiate OAuth 2.0 authentication in the management UI:
361361
- *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](https://datatracker.ietf.org/doc/html/rfc7636) 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:
@@ -403,13 +403,13 @@ management.oauth_scopes = <SPACE-SEPARATED LIST OF SCOPES. See below>
403403
- `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`.
404404

405405
Given above configuration, when a user visits the management UI, the following two events take place:
406-
1. RabbitMQ uses the URL found in `auth_oauth2.issuer` followed by the path `/.well-known/openid-configuration` to download the OpenID Provider configuration. It contains information about other endpoints such as the `jwks_uri` (used to download the keys to validate the token's signature) or the `token_endpoint`.
406+
1. RabbitMQ uses the URL found in `auth_oauth2.issuer` followed by the path `/.well-known/openid-configuration` to download the OpenID Provider configuration. It contains information about other endpoints such as the `jwks_uri` (used to download the keys to validate the token's signature) or the `token_endpoint`.
407407

408408
:::warning
409409
If RabbitMQ cannot download the OpenID provider configuration, it shows an error message and OAuth 2.0 authentication is disabled in the management UI.
410410
:::
411411

412-
2. RabbitMQ displays a button with the label "Click here to login". When the user clicks on the button, the management UI initiates the OAuth 2.0 Authorization Code Flow, which redirects the user to the identity provider to authenticate and get a token.
412+
2. RabbitMQ displays a button with the label "Click here to login". When the user clicks on the button, the management UI initiates the OAuth 2.0 Authorization Code Flow, which redirects the user to the identity provider to authenticate and get a token.
413413

414414
### Configure client secret {#configure-client-secret}
415415

@@ -490,7 +490,7 @@ The management UI shows now a username/password login form for Basic Authenticat
490490
RabbitMQ implements the [OpenID Connect RP-Initiated Logout 1.0](https://openid.net/specs/openid-connect-rpinitiated-1_0.html)
491491
specification to logout users from the management UI and from the OAuth Provider. It works as follows:
492492

493-
1. The user clicks **Logout**.
493+
1. The user clicks **Logout**.
494494
2. If the [OpenId Connect Discovery endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationRequest) 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.
495495
3. If there is no `end_session_endpoint` returned, then the user is only logged out from the management UI.
496496

@@ -499,7 +499,7 @@ If the [OpenId Connect Discovery endpoint](https://openid.net/specs/openid-conne
499499
:::
500500

501501
:::warning
502-
RabbitMQ 3.13.1 and earlier versions require the [OpenId Connect Discovery endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationRequest) `end_session_endpoint` returned for OAuth 2.0 authentication to work.
502+
RabbitMQ 3.13.1 and earlier versions require the [OpenId Connect Discovery endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationRequest) `end_session_endpoint` returned for OAuth 2.0 authentication to work.
503503
:::
504504

505505
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.

docs/memory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ want RabbitMQ to throttle producers when the server is using
252252
above 3GB, set `vm_memory_high_watermark` to 3.
253253

254254
For guidelines on recommended RAM watermark settings,
255-
see [Production Checklist](./production-checklist#resource-limits-ram).
255+
see [Deployment Guidelines](./production-checklist#resource-limits-ram).
256256

257257

258258
## CQv1: Configuring the Paging Threshold {#paging}

docs/production-checklist.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ important to assess system configuration and have a plan for "day two operations
3030
activities such as [upgrades](./upgrade) before going into production.
3131

3232

33-
## Overview {#toc}
33+
## Table of Contents {#toc}
3434

3535
Production systems have concerns that go beyond configuration: system observability,
3636
security, application development practices, resource usage, [release support timeline](/release-information), and more.
@@ -143,6 +143,21 @@ For IoT applications that involve many clients performing the same or similar
143143
function and having fixed IP addresses, it may make sense to [authenticate using x509 certificates](./ssl) or
144144
[source IP address ranges](https://github.com/gotthardp/rabbitmq-auth-backend-ip-range).
145145

146+
### Anonymous Login
147+
148+
For production environments, it is almost always a good idea to disable anonymous logins.
149+
150+
You can disable the `ANONYMOUS` [SASL mechansim](access-control#mechanisms) in [rabbitmq.conf](configure#config-file) as follows:
151+
152+
``` ini
153+
auth_mechanisms.1 = PLAIN
154+
auth_mechanisms.2 = AMQPLAIN
155+
# note: the ANONYMOUS mechanism is not listed
156+
157+
# Value none has a special meaning that no user is configured for anonymous logins.
158+
anonymous_login_user = none
159+
```
160+
146161
## Monitoring and Resource Limits {#monitoring-and-resource-usage}
147162

148163
RabbitMQ nodes are limited by various resources, both physical
@@ -348,17 +363,17 @@ Production environments may require network configuration
348363
tuning, for example, to sustain a high number of concurrent clients.
349364
Please refer to the [Networking Guide](./networking) for details.
350365

351-
### <a id="networking-throughput" class="anchor" href="#networking-throughput">Minimum Available Network Throughput Estimate</a>
366+
### Minimum Available Network Throughput Estimate {#networking-throughput}
352367

353368
With higher message rates and large message payloads, traffic bandwidth available to cluster nodes becomes an important
354369
factor.
355370

356371
The following (intentionally oversimplified) formula can be used to compute the **minimum amount of bandwidth**
357372
that must be available to cluster nodes, in bits per second:
358373

359-
<pre class="lang-ini">
374+
``` ini
360375
MR * MS * 110% * 8
361-
</pre>
376+
```
362377

363378
where
364379

@@ -369,9 +384,9 @@ where
369384

370385
For example, with a message rate (`MR`) of 20K per second and 6 KB message payloads (`MS`):
371386

372-
<pre class="lang-ini">
387+
``` ini
373388
20K * 6 KB * 110% * 8 bit/B = 20000 * 6000 * 1.1 * 8 = 1.056 (gigabit/second)
374-
</pre>
389+
```
375390

376391
With the above inputs, cluster nodes must have network links with throughput of at least 1.056 gigabit per second.
377392

docs/queues.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ via a message property (<code>delivery_mode</code> or, in some clients, <code>pe
372372

373373
Other relevant guides on the topic are [Quorum Queues](./quorum-queues#resource-use), [Streams](./streams#feature-comparison),
374374
[Reasoning About Memory Usage](./memory-use), [Alarms](./alarms), [Memory Alarms](./memory), [Free Disk Space Alarms](./disk-alarms),
375-
[Production Checklist](./production-checklist), and [Message Store Configuration](./persistence-conf).
375+
[Deployment Guidelines](./production-checklist), and [Message Store Configuration](./persistence-conf).
376376

377377

378378
## Priorities {#priorities}

versioned_docs/version-3.13/configure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ and more.
4848

4949
Since configuration affects many areas of the system, including plugins, individual [documentation guides](./index.md)
5050
dive deeper into what can be configured. [Runtime Tuning](./runtime) is a companion to this guide that focuses
51-
on the configurable parameters in the runtime. [Production Checklist](./production-checklist) is a related guide
51+
on the configurable parameters in the runtime. [Deployment Guidelines](./production-checklist) is a related guide
5252
that outlines what settings will likely need tuning in most production environments.
5353

5454

@@ -2320,7 +2320,7 @@ and more. To Linux users these limits can be known as "ulimit limits".
23202320
23212321
RabbitMQ nodes are most commonly affected by the maximum [open file handle limit](./networking#open-file-handle-limit).
23222322
Default limit value on most Linux distributions is usually 1024, which is very low for a messaging broker (or generally, any data service).
2323-
See [Production Checklist](./production-checklist) for recommended values.
2323+
See [Deployment Guidelines](./production-checklist) for recommended values.
23242324
23252325
### Modifying Limits
23262326

versioned_docs/version-3.13/ec2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,5 @@ Several other guides cover topics highly relevant for running RabbitMQ clusters
118118
* [Peer Discovery](./cluster-formation)
119119
* [Configuration](./configure)
120120
* [Monitoring](./monitoring)
121-
* [Production Checklist](./production-checklist)
121+
* [Deployment Guidelines](./production-checklist)
122122
* [File and Directory Locations](./relocate)

versioned_docs/version-3.13/install-debian.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ systemctl start rabbitmq-server
892892

893893
On most systems, a node should be able to start and run with all defaults.
894894
Please refer to the [Configuration guide](./configure) to learn more
895-
and [Production Checklist](./production-checklist) for guidelines beyond
895+
and [Deployment Guidelines](./production-checklist) for guidelines beyond
896896
development environments.
897897

898898
Note: the node is set up to run as system user `rabbitmq`.

versioned_docs/version-3.13/install-rpm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ systemctl stop rabbitmq-server
520520

521521
On most systems, a node should be able to start and run with all defaults.
522522
Please refer to the [Configuration guide](./configure) to learn more
523-
and [Production Checklist](./production-checklist) for guidelines beyond
523+
and [Deployment Guidelines](./production-checklist) for guidelines beyond
524524
development environments.
525525

526526
Note: the node is set up to run as system user `rabbitmq`.

0 commit comments

Comments
 (0)