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: deps/rabbitmq_auth_backend_oauth2/README.md
+18-4Lines changed: 18 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,11 +38,12 @@ To use this plugin
38
38
1. UAA should be configured to produce encrypted JWT tokens containing a set of RabbitMQ permission scopes
39
39
2. All RabbitMQ nodes must be [configured to use the `rabbit_auth_backend_oauth2` backend](https://www.rabbitmq.com/access-control.html)
40
40
3. All RabbitMQ nodes must be configure with a resource service ID (`resource_server_id`) that matches the scope prefix (e.g. `rabbitmq` in `rabbitmq.read:*/*`).
41
+
4. The token **must** has a value in`aud` that match `resource_server_id` value.
41
42
42
43
### Authorization Flow
43
44
44
45
1. Client authorize with OAuth 2.0 provider, requesting an `access_token` (using any grant type desired)
45
-
2. Token scope returned by OAuth 2.0 provider must include RabbitMQ resource scopes that follow a convention used by this plugin: `configure:%2F/foo` means "configure permissions for 'foo' in vhost '/'")
46
+
2. Token scope returned by OAuth 2.0 provider must include RabbitMQ resource scopes that follow a convention used by this plugin: `configure:%2F/foo` means "configure permissions for 'foo' in vhost '/'") (`scope` field can be changed using `extra_scopes_source` in **advanced.config** file.
46
47
3. Client passes the token as password when connecting to a RabbitMQ node. **The username field is ignored**.
47
48
4. The translated permissions are stored as part of the authenticated connection state and used the same
48
49
way permissions from RabbitMQ's internal database would be used.
@@ -130,7 +131,7 @@ In that case, the configuration will look like this:
130
131
{rabbitmq_auth_backend_oauth2, [
131
132
{resource_server_id, <<"my_rabbit_server">>},
132
133
{key_config, [
133
-
{jwks_url, "https://my-jwt-issuer/jwks.json"}
134
+
{jwks_url, <<"https://my-jwt-issuer/jwks.json">>}
134
135
]}
135
136
]},
136
137
].
@@ -191,18 +192,31 @@ be `my_rabbit.read:*/*`.
191
192
192
193
### Using a different token field for the Scope
193
194
194
-
By default the plugin will look for the `scope` key in the token, you can configure the plugin to also look in other fields using the `additional_rabbitmq_scopes` setting.
195
+
By default the plugin will look for the `scope` key in the token, you can configure the plugin to also look in other fields using the `extra_scopes_source` setting. Values format accepted are scope as **string** or **list**
0 commit comments