Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RabbitMQ set_permissions syntax noob

I've installed rabbitmq and it's running.

I've successfully add_user as well as add_vhost. But in the next step of the documentation it says to set_permissions and I'm failing.

I get Error: could not recognise command when I enter the following:

$ sudo rabbitmqctl set_permissions -p myvhost myuser ".*" ".*" ".*"

(this is copy and pasted verbatim from the documentation so it seems a bit ridiculous that it doesn't work.. And 'recognise' being misspelled in the error msg isn't helping)

My question is what does ".*" ".*" ".*" mean/stand for?

like image 569
Ryder Brooks Avatar asked Jul 08 '14 18:07

Ryder Brooks


People also ask

How do I start a Vhost in RabbitMQ?

Vhosts are created through the management portal, through the HTTP API or via rabbitmqctl. View vhosts by entering the admin tab and select the Virtual Hosts. Select the Add New Virtual Host options to create a new vhost.

What is the default user of RabbitMQ?

Note: The default user “guest” is an administrative user and its login credentials are published on the official RabbitMQ web site. It is recommended that you update this user or delete it as per your local security policies.


2 Answers

From the documentation

set_permissions [-p vhostpath] {user} {conf} {write} {read}

vhostpath - The name of the virtual host to which to grant the user access, defaulting to /.

user - The name of the user to grant access to the specified virtual host.

conf - A regular expression matching resource names for which the user is granted configure permissions.

write - A regular expression matching resource names for which the user is granted write permissions.

read - A regular expression matching resource names for which the user is granted read permissions.

To answer your question specifically, ".*" ".*" ".*" is a set of three regular expressions (applying to configure, write, and read) which will match all the permissions available (. will match any character, * will match any number of the preceding character)

like image 192
rubayeet Avatar answered Oct 21 '22 22:10

rubayeet


.* means you have full permissions ^$ means you don't have any permissons

like image 40
chen Augustin Avatar answered Oct 21 '22 22:10

chen Augustin