Skip to content

Auto-configure Rabbit connection factory with CredentialsProvider and CredentialsRefreshService when available #22016

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

Closed
garyrussell opened this issue Jun 18, 2020 · 2 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@garyrussell
Copy link
Contributor

Consider adding support for OAUTH2 by auto-configuring CredentialsProvider and CredentialsRefreshService beans (if present and unique) into the RabbitConnectionFactoryBean.

2.4.x only; requires this PR to be merged: spring-projects/spring-amqp#1212

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 18, 2020
@mbhave
Copy link
Contributor

mbhave commented Jun 19, 2020

@garyrussell Does that mean Spring Boot would autoconfigure the CredentialsProvider and CredentialsRefreshService beans or are you suggesting we set them on the RabbitConnectionFactoryBean only if a user provides them?

@mbhave mbhave added the status: waiting-for-feedback We need additional information before we can continue label Jun 19, 2020
@garyrussell
Copy link
Contributor Author

@mbhave I was just thinking that Boot should detect the presence of the @Beans and wire them in.

That said, there is only one (non-standard) implementation OAuth2ClientCredentialsGrantCredentialsProvider provided by RabbitMQ (and a DefaultCredentialsRefreshService) so I suppose we could configure them.

But I think it would be more flexible just to detect the beans - that way, the user can provide his/her own implementation.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Jun 19, 2020
@wilkinsona wilkinsona removed status: feedback-provided Feedback has been provided status: waiting-for-triage An issue we've not yet triaged labels Jul 7, 2020
@wilkinsona wilkinsona changed the title RabbitMQ Auto Configuration Improvement Auto-configure Rabbit connection factory with CredentialsProvider and CredentialsRefreshService when available Jul 7, 2020
@wilkinsona wilkinsona added this to the 2.4.x milestone Jul 7, 2020
@wilkinsona wilkinsona added the type: enhancement A general enhancement label Jul 7, 2020
@wilkinsona wilkinsona self-assigned this Jul 7, 2020
@wilkinsona wilkinsona modified the milestones: 2.4.x, 2.4.0-M2 Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants