New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Support OAuth 2.0 for RabbitMQ ConnectionFactory #1211
Comments
The proper place for this is an extension to the If there is not an existing extension, I suggest you discuss this with the RabbitMQ engineers on the rabbitmq-users Google group. |
Hi Gary, thank you for the fast reply. I think the
Essentially the only part missing is getting the JWT from an OAuth backend and passing it to the connection factory as shown above. Do you still think this use case should be handled by |
Yes, this is the code in
Just Google |
Okay thanks that makes it clear. I will address my question / feature request with the RabbitMQ engineers. Should I leave this issue open for a potential pull request of an update of https://github.com/rabbitmq/rabbitmq-java-client once I added an extension or should I close it and open another issue later? |
It depends on which version the feature is added to; we won't be able to bump to a new minor release (e.g. 5.10) until our next release (2.3). Closing this for now. |
@steve1337 You should have a look at the documentation: https://www.rabbitmq.com/api-guide.html#oauth2-support It's a matter of setting a This was introduced in 5.8.0 (December 2019). |
Thanks @acogoluegnes And then @Bean
public ConnectionFactory connectionFactory() {
com.rabbitmq.client.ConnectionFactory connectionFactory = new ...
return new CachingConnectionFactory(connectionFactory);
} |
Reopened - we should add |
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:
The text was updated successfully, but these errors were encountered: