Skip to content

Enable use different identifier of role id and resource id in OAuth flow #7861

@kratkyzobak

Description

@kratkyzobak

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

If you want to create Azure AD application using IaC tools, you are stuck with need to define application roles before creating application itself. Current RabbitMQ implementation forces to name AppRoles by using ClientID in it. This value is not known before creating. For example terraform's azuread_application is unusable here.

If you change resource_server_id to string another than client-id you can prefix role names by this, but there is problem, that this ID is then appended in OAuth request as resource= so it's mandatory to be Client ID.

Describe the solution you'd like

I would propose to enable resource part from OAuth redirect query string in management plugin to differ from rabbitmq_auth_backend_oauth2.resource_server_id in https://github.com/rabbitmq/rabbitmq-server/blob/v3.11.13/deps/rabbitmq_management/src/rabbit_mgmt_wm_auth.erl#L41 for example by creating rabbitmq_management.oauth_resource_id which would default to rabbitmq_auth_backend_oauth2.resource_server_id.

Or alternatively I would propose to create switch which would lead to not excepting roles to be prefixed rabbitmq_management.oauth_resource_id at all.

Describe alternatives you've considered

There are workarounds requiring manual steps. Just do same as in click-ops mentoined in manual - in first step create app, fetch it's ID and then modify the app using this ID.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions