Skip to content

Commit 8ac5fc7

Browse files
Small doc improvements
1 parent 7982d10 commit 8ac5fc7

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

docs/oauth2.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ In chronological order, here is the sequence of events that occur when a client
149149
| `auth_oauth2.preferred_username_claims` | [List of the JWT claims](#preferred-username-claims) to look for the username associated with the token.
150150
| `auth_oauth2.default_key` | ID of the default signing key.
151151
| `auth_oauth2.signing_keys` | Paths to the [signing key files](#signing-key-files).
152-
| `auth_oauth2.issuer` | The [issuer URL](#configure-issuer) of the authorization server that is used to discover endpoints such as `jwks_uri` and others (https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
153-
| `auth_oauth2.discovery_endpoint_path` | The path used for the OpenId discovery endpoint. Default value is `.well-known/openid-configuration`
154-
| `auth_oauth2.discovery_endpoint_params` | [List of HTTP parameters](#discovery-endpoint-params) sent to the OpenId discovery endpoint.
155-
| `auth_oauth2.jwks_url` | The URL of the [JWKS endpoint](#jwks-endpoint). According to the [JWT Specification](https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.2), the endpoint URL must be https. Optional if you set `auth_oauth2.issuer`.
156-
| `auth_oauth2.token_endpoint` | The URL of the OAuth 2.0 token endpoint. Optional if you set `auth_oauth2.issuer`.
157-
| `auth_oauth2.https.cacertfile` | Path to a file containing PEM-encoded CA certificates. The CA certificates are used to connect to any of these endpoints: `jwks_url`, `token_endpoint`, or the `issuer`.
152+
| `auth_oauth2.issuer` | The [issuer URL](#configure-issuer) of the authorization server that is used to either discover endpoints such as `jwks_uri` and/or where to redirect RabbitMQ management users to login and get a token.
153+
| `auth_oauth2.discovery_endpoint_path` | The path used for the [OpenId discovery endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). The endpoint URI is built using `auth_oauth2.issuer`, this path or else the default path `.well-known/openid-configuration` followed by query parameters configured in the following variable
154+
| `auth_oauth2.discovery_endpoint_params` | [List of HTTP query parameters](#discovery-endpoint-params) sent to the OpenId discovery endpoint.
155+
| `auth_oauth2.jwks_url` | The URL of the [JWKS endpoint](#jwks-endpoint). According to the [JWT Specification](https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.2), the endpoint URL must be https. Optional if you set `auth_oauth2.issuer`. If this URL is set, it overrides the `jwks_uri` discovered via the discovery endpoint.
156+
| `auth_oauth2.token_endpoint` | The URL of the OAuth 2.0 token endpoint. Optional if you set `auth_oauth2.issuer`. If this URL is set, it overrides the `token_endpoint` discovered via the discovery endpoint.
157+
| `auth_oauth2.https.cacertfile` | Path to a file containing PEM-encoded CA certificates. The CA certificates are used to connect to any of these endpoints: `jwks_url`, `token_endpoint`, or the discovery endpoint.
158158
| `auth_oauth2.https.depth` | The maximum number of non-self-issued intermediate certificates that may follow the peer certificate in a valid [certification path](ssl#peer-verification-depth). The default value is 10.
159159
| `auth_oauth2.https.peer_verification` | Configures [peer verification](ssl#peer-verification). Available values: `verify_none`, `verify_peer`. The default value is `verify_peer` if there are trusted CA installed in the OS or `auth_oauth2.https.cacertfile` is set. <p/> **Deprecated**: This variable will be soon replaced by `auth_oauth2.https.verify`. Users should stop using this variable.
160160
| `auth_oauth2.https.fail_if_no_peer_cert` | Used together with `auth_oauth2.https.peer_verification = verify_peer`. When set to `true`, TLS connection will be rejected if the client fails to provide a certificate. The default value is `false`.
@@ -236,7 +236,7 @@ Each `auth_oauth2.resource_servers.<id/index>.` entry has the following variable
236236

237237
| Key | Documentation
238238
|------------------------------|-----------
239-
| `id` | The [Resource Server ID](#resource-server-id)
239+
| `id` | The [Resource Server ID](#resource-server-id).
240240
| `resource_server_type` | The Resource Server Type required when using [Rich Authorization Request](#rich-authorization-request) token format.
241241
| `additional_scopes_key` | Configure the plugin to look for scopes in other fields (maps to `additional_rabbitmq_scopes` in the old format).
242242
| `scope_prefix` | [Configure the prefix for all scopes](#scope-prefix). The default value is `auth_oauth2.resource_server_id` followed by the dot `.` character.
@@ -264,9 +264,9 @@ Each `auth_oauth2.oauth_providers.{id/index}` entry has the following sub-keys.
264264

265265
| Key | Documentation
266266
|------------------------------|-----------
267-
| `issuer` | URL of OAuth Provider. RabbitMQ uses this URL to build the OpenId Connect Discovery endpoint by appending the path `.well-known/openid-configuration` to this URL.
267+
| `issuer` | URL of OAuth Provider. It is used to build the discovery endpoint URL and/or to redirect RabbitMQ Management users to login and get a token.
268268
| `discovery_endpoint_path` | The path used for the OpenId discovery endpoint. Default value is `.well-known/openid-configuration`
269-
| `discovery_endpoint_params` | [List of HTTP parameters](#discovery-endpoint-params) sent to the OpenId discovery endpoint.
269+
| `discovery_endpoint_params` | [List of HTTP query parameters](#discovery-endpoint-params) sent to the OpenId discovery endpoint.
270270
| `token_endpoint` | The URL of the OAuth 2.0 token endpoint. Optional if you configured `issuer`.
271271
| `jwks_uri` | The URL of the [JWKS endpoint](#jwks-endpoint). According to the [JWT Specification](https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.2), the endpoint URL must be https. <p/>**Warning**: RabbitMQ uses for each OAuth Provider the variable name `jwks_uri` used by the OpenId Connect Discovery Specification rather than `jwks_url`. This variable is optional if you set `issuer`.
272272
| `https.cacertfile` | Path to a file containing PEM-encoded CA certificates used to connect `issuer` and/or `jwks_uri` URLs.
@@ -312,8 +312,7 @@ It contains the expiration time after which the JWT MUST NOT be accepted for pro
312312
The `aud` ([Audience](https://tools.ietf.org/html/rfc7519#page-9)) identifies the recipients and/or resource_server of the JWT.
313313

314314
By default, **RabbitMQ uses this field to validate the token**. This validation can be disabled by setting the `auth_oauth2.verify_aud` setting set to `false`.
315-
When verification is enabled, this `aud` field must either match the `resource_server_id` value or, in case of a list,
316-
it must contain the `resource_server_id` value.
315+
When verification is enabled, this `aud` field must either match the `resource_server_id` value or, in case of a list, it must contain the `resource_server_id` value.
317316

318317
### Token expiration and refresh {#token-expiration}
319318

@@ -413,9 +412,9 @@ the `monitoring` tag will be `my_rabbit.tag:monitoring`.
413412

414413
### Configure OAuth 2.0 provider's issuer {#configure-issuer}
415414

416-
Before RabbitMQ 3.13, users had to either configure the JWKS endpoint (that is `auth_oauth2.jwks_url` variable) or statically [configure the signing keys](#configure-signing-keys). Now, users only need to configure the OpenID Provider's **issuer** URL and from this URL RabbitMQ downloads the OpenID Provider configuration which includes the JWKS endpoint in addition to other endpoints which will be useful in other contexts.
415+
Before RabbitMQ 3.13, users had to either configure the JWKS endpoint (that is `auth_oauth2.jwks_url` variable) or statically [configure the signing keys](#configure-signing-keys). Now, users only need to configure the OpenID Provider's **issuer** URL and from this URL RabbitMQ downloads the OpenID Provider configuration which includes the JWKS endpoint in addition to other endpoints which will be useful in other contexts.
417416

418-
Usually, this **issuer** URL is the same URL configured in the management plugin (`management.oauth_provider_url`). From now on, you only need to configure a single URL, specified by the `auth_oauth2.issuer` variable. Except in edge cases where the **issuer** URL does not host the login page. In that cases, the user configures the login page in the `management.oauth_provider_url` variable.
417+
Usually, this **issuer** URL is the same URL configured in the management plugin (`management.oauth_provider_url`). From now on, you only need to configure a single URL, specified by the `auth_oauth2.issuer` variable. Except in edge cases where the **issuer** URL does not host the login page. In those cases, the user configures the login page in the `management.oauth_provider_url` variable.
419418

420419
Sample configuration using issuer:
421420
```ini
@@ -443,7 +442,6 @@ auth_oauth2.https.cacertfile = /opts/certs/cacert.pem
443442
...
444443
```
445444
446-
447445
**VERY IMPORTANT**: Since RabbitMQ 3.13, if `auth_oauth2.https.peer_verification` variable is not set, RabbitMQ sets it to `verify_peer` as long as there are trusted certificates installed in the OS or the user configured `auth_oauth2.https.cacertfile`.
448446
449447
### Configure signing keys {#configure-signing-keys}
@@ -548,21 +546,23 @@ In the example configuration, RabbitMQ searches for the `user_name` claim first
548546
549547
### Discovery endpoint parameters {#discovery-endpoint-params}
550548
551-
Some OAuth 2.0 providers requires certain query parameters in the OpenId Discovery endpoint. For instance, Microsoft Entra ID requires a query parameter called `appid` when the application uses custom signing keys. The endpoint returns an OpenId configuration tailored for the application's id specified in the parameter.
552-
For instance, the `jkws_uri` endpoint returned in the OpenId configuration has built-in the query parameter.
549+
Some OAuth 2.0 providers requires certain query parameters in the OpenId Discovery endpoint. For instance, Microsoft Entra ID requires a query parameter called `appid` when the application uses custom signing keys. The discovery endpoint returns an OpenId configuration tailored for the application that matches the `appid`.
550+
For instance, the `jkws_uri` endpoint returned in the OpenId configuration has already the query parameters sent to the discovery endpoint.
553551
554-
Here is an example of setting these parameters.
552+
Here is an example of setting these parameters including the rest of the variables used to build the OpenId discovery endpoint URL.
555553
556554
``` ini
557555
# ...
556+
auth_oauth2.issuer = https://myissuer.com/v2
557+
auth_oauth2.discovery_endpoint_path = .well-known/authorization-server
558558
auth_oauth2.discovery_endpoint_params.param1 = value1
559-
auth_oauth2.preferred_username_claims.param2 = value2
559+
auth_oauth2.discovery_endpoint_params.param2 = value2
560560
# ...
561561
```
562562
563-
RabbitMQ adds the following query string to the discovery endpoint:
563+
This is the URL built to access the OpenId Discovery endpoint:
564564
```
565-
?param1=value1&param2=value2
565+
https://myissuer.com/v2/.well-known/authorization-server?param1=value1&param2=value2
566566
```
567567
568568
### Rich Authorization Request {#rich-authorization-request}

0 commit comments

Comments
 (0)