Rich Tier
Rich Tier

Reputation: 9461

rabbitmq token based authentication

I'm planning on using rabbitmq to achieve push notification in my web app.

Each user will have a queue. I want to prevent unauthorised users from subscribing to other people's queues. Can this be achieved using an auth token that a user must provide?

As a workaround currently I'm thinking about django proxying rabbimq in order to check if the provided auth token is correct, and only pass on request to rabbitmq if authenticated...but this feels less than optimal!

Upvotes: 1

Views: 2786

Answers (1)

Vor
Vor

Reputation: 35149

You can achieve the same functionality by using exclusive queue and RabbitMQ permission.

Exclusive queues may only be accessed by the current connection, and are deleted when that connection closes. Passive declaration of an exclusive queue by other connections are not allowed.

Upvotes: 2

Related Questions