Spring Security for Spring cloud stream with RabbitMQ as binder

229 Views Asked by At

I have a Spring boot application with Spring cloud stream enabled. This project contains both API endpoints and producer/consumer streams in it. In our case RabbitMQ is the binder. We have enabled Spring security but it works for API endpoints.

I need to know how security can be enforced for stream requests coming from RabbitMQ. Since no user context involved in this and the other services are publishing their requests to queue (our cloud stream has listeners for that queue) and not directly calling the API. So i am not sure how client credentials flow can be used in it.

1

There are 1 best solutions below

0
On

@Vignesh

Now I'm not sure is it possible to share user content from message producer to message consumer.

I created an issue: https://github.com/Azure/azure-sdk-for-java/issues/23323

Please vote for the issue if you think this is necessary for you.

You can click +1 to vote, or you can add comments in the issue.

Further discussion in the issue is welcome.