Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RabbitMQ and authorization

One of my projects requires authentication for using RabbitMQ. Only authenticated users can connect to the rabbitmq server and subscribe to queues etc. For example, when a user connects to the server for the first time and sends some auth data (like login, password) - server should check it and, if the user passed authentication, he will be able to subscribe to queues etc. Otherwise, the server would disconnect the user. Is there a solution for this?

Please don't judge too harshly, I'm not really familiar with RabbitMQ and stuff like this.

like image 646
tipugin Avatar asked Dec 16 '11 09:12

tipugin


People also ask

Where does RabbitMQ store credentials?

RabbitMQ supports multiple authentication mechanisms. Some of them use username/password pairs. These credential pairs are then handed over to authentication backends that perform authentication. One of the backends, known as internal or built-in, uses internal RabbitMQ data store to store user credentials.

How do I access RabbitMQ server remotely?

Create new RabbitMQ user and set permissions To create a new RabbitMQ user to access the RabbitMQ server remotely: Open a browser and navigate to http://localhost:15672/. The RabbitMQ Management login screen displays. Log into RabbitMQ using guest as both the username and password.

Can access virtual hosts RabbitMQ?

Different users can be granted access only to specific virtual hosts. Their permissions in each virtual hosts also can be limited. RabbitMQ supports two major authentication mechanisms as well as several authentication and authorisation backends. Password-based authentication has a companion guide.


1 Answers

This is very easy to find out yourself. A simple Google search for the terms, "RabbitMQ Authentication" returns this page as the first entry:

When an AMQP client establishes a connection to an AMQP server, it specifies a virtual host within which it intends to operate. A first level of access control is enforced at this point, with the server checking whether the user has any permissions to access the virtual hosts, and rejecting the connection attempt otherwise.

like image 64
Brian Kelly Avatar answered Oct 17 '22 04:10

Brian Kelly