Skip to content

Enhancement: Support OAuth 2.0 for RabbitMQ ConnectionFactory #1211

Closed
@steve1337

Description

@steve1337

Enhancement

I would like to be able to use OAuth 2.0 to authenticate with RabbitMQ.

Background:

RabbitMQ supports OAuth 2.0 via the plugin: https://github.com/rabbitmq/rabbitmq-auth-backend-oauth2

Unfortunately the available implementations for ConnectionFactorties only support username and password authentication: https://docs.spring.io/spring-amqp/api/org/springframework/amqp/rabbit/connection/ConnectionFactory.html

Suggestion:

To add support I would like to implement a subclass of CachingConnectionFactory as Oauth2CachingConnectionFactory which could extend the behavior as follows:

  1. Keep username and password configuration as is and add property for OAuth 2.0 endpoint (e.g. https://oauth-server:8080/auth/openid-connect/jwt)
  2. Use username and password to aquire JWT from OAuth 2.0 backend via HTTP call
  3. User JWT to authenticate with RabbitMQ

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions