Skip to content

Support for more general OAuth2 providers #2605

@MirahImage

Description

@MirahImage

When using the rabbitmq-management plugin with the rabbitmq-auth-backen-oauth2, users are redirected to the OAuth server to authenticate following an implicit_grant flow. The plugin makes several assumptions about the structure of the endpoints provided by the OAuth server, not all of which are valid.

  1. The authentication endpoint is assumed to be at the location uaa_location/oauth/authorize. While the use of /authorize is general as specified in RFC 6749, the prefix of /oauth is specific to UAA.
  2. The /info endpoint is not general. RFC 8414 specifies that a generic OAuth2 server should provide the /.well-known/oauth-authorization-server endpoint for such purposes, but also that specific implementations may specify a different endpoint. For example, servers implementing OIDC may instead provide the /.well-known/openid-configuration endpoint.

In regards to the first point above, one solution would be to generalize the uaa_location advanced config to an oauth_location config property. In the specific case of UAA, the oauth_location would correspond to uaa_location/oauth.

Similarly, for the second point, we could provide an optional configuration for the metadata endpoint, with the default value being /.well-known/oauth-authorization-server.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions