Closed
Description
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:
- 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)
- Use username and password to aquire JWT from OAuth 2.0 backend via HTTP call
- User JWT to authenticate with RabbitMQ