Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
RabbitMQ OAuth2 plugin uses the
resource_server_id
:audience
(https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3)resource
parameter to authorize a user and get an access token (https://datatracker.ietf.org/doc/html/draft-ietf-oauth-resource-indicators-05#page-3)Scopes do not necessarily must have a prefix. Prefixes are necessary, at least, in this situations:
api://<app_id>.
.Clearly, the scopes' prefix does not necessarily match either the
audience
claim or theresource
parameter.Proposed Changes
Therefore, there is a new setting called
scope_prefix
. It can be an empty string meaning that the scopes are the raw RabbitMQ scopes, e.g.configure:*/*
or it can be any prefix. But it is very important to know that the final scope follows the format: <scope_prefix><rabbitmq_scope> . See that there are no separator character.In order to keep existing configuration working without making further changes, RabbitMQ defaults
scope_prefix
to<resource_server_id>.
. See that RabbitMQ maintains the dot character in the prefix.Types of Changes
What types of changes does your code introduce to this project?
Put an
x
in the boxes that applyThis PR is accompanied by a doc's PR