Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is VirtualHost a good pattern in RabbitMQ? [closed]

I have 100 clients. Each client has unique username, password and two channels (users can't connect to different channels apart from their own). Should I create VirtualHost for each user?

How to write proper user permission to the below situation?:

  • my_user can connect only to vahost called user_vhost using username and password
  • my_user can consume only from the user_channel channel
  • my_user can publish only to the user_channel channel
  • my_user can connect remotely

Thank You!

like image 927
User Avatar asked Jan 31 '15 16:01

User


People also ask

What is VirtualHost in RabbitMQ?

Vhosts (Virtual Hosts) in RabbitMQ provides a way to segregate applications using the same RabbitMQ instance. RabbitMQ vhosts creates a logical group of connections, exchanges, queues, bindings, user permissions, etc. within an instance.

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.

How do I get rid of RabbitMQ Vhost?

A virtual host can be deleted using rabbitmqctl's delete_vhost command which accepts virtual host name as the only mandatory argument.

What is V host?

What Does Virtual Host (vhost) Mean? A virtual host is is a type of hosting service provider that focuses on virtual infrastructure solutions, including virtual servers, computers, storage and other hybrid platforms that enable the hosting of data, applications and/or services.


1 Answers

Virutal host in RabbitMQ is more like a logical container where a user connected to a particular virtual host cannot access any resource (exchange, queue...) from another virtual host. I always think about it like a administrative domain kind of thing.

Based on what you have explained, I think having a virtual host per user is a good way to keep things simple and clean. Also, this way you do not need to come up with complicated permissions rules, just grant permissions based on virtual host.

like image 94
hveiga Avatar answered Oct 12 '22 01:10

hveiga