Skip to content

OAuth 2: Variable expansion in resource permissions #13894

Open
@inseroaj

Description

@inseroaj

Is your feature request related to a problem? Please describe.

As described in OAuth2 Topic Exchange Scopes it is possible to use variable expansion in scopes, like rabbitmq.write:*/x-{vhost}-*.
However, it seems this is not working/supported in Scope Aliases.
Addition of this feature would make it easy to apply user-based permissions with a single fixed scope.

Describe the solution you'd like

Consider a token including the scope MYSCOPE.
Using a scope alias, the read permission can be set with
auth_oauth2.scope_aliases.MYSCOPE = rabbitmq.read:*/queueprefix.{sub}.*
This would cause a user with subject MYUSER and scope MYSCOPE to have read access to queues named queueprefix.MYUSER.*.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions