You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/oauth2-examples-okta.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,7 +152,7 @@ Once you've added the user to the appropriate groups and apps, they should have
152
152
153
153
The configuration on Okta side is done. You now have to configure RabbitMQ to use the resources you just created.
154
154
155
-
[rabbitmq.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/main/conf/okta/rabbitmq.conf) is a RabbitMQ configuration to **enable okta as OAuth 2.0 authentication backend** for the RabbitMQ OAuth2 and Management plugins. And [advanced.config](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/main/conf/okta/advanced.config) is the RabbitMQ advanced configuration that maps RabbitMQ scopes to the permissions previously configured in Okta.
155
+
[rabbitmq.conf](https://github.com/rabbitmq/rabbitmq-oauth2-tutorial/tree/main/conf/okta/rabbitmq.conf) is a RabbitMQ configuration to **enable okta as OAuth 2.0 authentication backend** for the RabbitMQ OAuth2 and Management plugins.
156
156
157
157
Update it with the following values (you should have noted these in the previous steps):
expectsthe `scope` token's field to carry *custom scopes*. For instance, below you have a sample JWT
581
-
token where the custom scopes are in the `scope` field :
533
+
This example demonstrates how to use custom scopes with RabbitMQ.
534
+
**UAA** identity provider has been configured with two clients (`producer_with_roles`
535
+
and `consumer_with_roles`) with the following custom scopes:
536
+
`producer_with_roles` with
537
+
- `api://rabbitmq:producer`.
538
+
539
+
`consumer_with_roles` with
540
+
- `api://rabbitmq:Read.All`.
541
+
- `api://rabbitmq:Write.All`.
542
+
- `api://rabbitmq:Configure.All`.
543
+
- `api://rabbitmq:Administrator`.
544
+
545
+
For more information about scope aliases, check out
546
+
the [section](./oauth2#scope-aliases) that explains it in more detail.
547
+
548
+
#### How to Configure Scope Aliases
549
+
550
+
This is the configuration required to map those custom scopes to RabbitMQ scopes.
551
+
552
+
:::tip
553
+
Since RabbitMQ 4.1, it is possible to configure **scope aliases** using the [ini-like](./configure#config-file) configuration style. Earlier versions only supported
Copy file name to clipboardExpand all lines: docs/oauth2.md
+41-2Lines changed: 41 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -138,7 +138,8 @@ In chronological order, here is the sequence of events that occur when a client
138
138
| `auth_oauth2.resource_server_id` | The [Resource Server ID](#resource-server-id)
139
139
| `auth_oauth2.resource_server_type` | The Resource Server Type required when using [Rich Authorization Request](#rich-authorization-request) token format
140
140
|`auth_oauth2.additional_scopes_key`| Configure the plugin to look for scopes in other fields (maps to `additional_rabbitmq_scopes` in the old format). |
141
-
|`auth_oauth2.scope_prefix`|[Configure the prefix for all scopes](#scope-prefix). The default value is `auth_oauth2.resource_server_id` followed by the dot `.` character. |
141
+
| `auth_oauth2.scope_prefix` | [Configure the prefix for all scopes](#scope-prefix). The default value is `auth_oauth2.resource_server_id` followed by the dot `.` character.
The following configuration declares two signing keys and configures the kid of the default signing key. For more information check the section [Configure Signing keys](#configure-signing-keys).
@@ -230,12 +268,13 @@ Each `auth_oauth2.resource_servers.<id/index>.` entry has the following variable
230
268
| `resource_server_type` | The Resource Server Type required when using [Rich Authorization Request](#rich-authorization-request) token format.
231
269
| `additional_scopes_key` | Configure the plugin to look for scopes in other fields (maps to `additional_rabbitmq_scopes` in the old format).
232
270
| `scope_prefix` | [Configure the prefix for all scopes](#scope-prefix). The default value is `auth_oauth2.resource_server_id` followed by the dot `.` character.
| `preferred_username_claims` | [List of the JWT claims](#preferred-username-claims) to look for the username associated with the token separated by commas.
234
273
| `oauth_provider_id` | The identifier of the OAuth Provider associated to this resource. RabbitMQ uses the signing keys issued by this OAuth Provider to validate tokens whose audience matches this resource's id.
235
274
236
275
All available configurable parameters for each OAuth 2 provider is documented [in a separate section](#multiple-oauth-providers-configuration).
237
276
238
-
Usually, a numeric value is used as `index`, for example `auth_oauth2.resource_servers.1.id = rabbit_prod`. However, it can be any string, for example `auth_oauth2.resource_servers.rabbit_prod.jwks_url = http://some_url`. By default, the `index` is the resource server's id. However, you can override it via the `id` variable like in `auth_oauth2.resource_servers.1.id = rabbit_prod`.
277
+
Usually, a numeric value is used as `index`, for example `auth_oauth2.resource_servers.1.id = rabbit_prod`. However, it can be any string, for example `auth_oauth2.resource_servers.rabbit_prod.issuer = http://some_url`. By default, the `index` is the resource server's id. However, you can override it via the `id` variable like in `auth_oauth2.resource_servers.1.id = rabbit_prod`.
239
278
240
279
Here is an example which configures two resources (`prod` and `dev`) which are used by the users and clients managed by
241
280
the same identity provider whose issuer url is `https://my-idp.com/`:
0 commit comments