rest api for rabbitmq

208 views
Skip to first unread message

g. sp.

unread,
Jan 26, 2022, 6:44:27 AM1/26/22
to rabbitmq-users
i found and can use the rabbitmq's admin rest api which requires the user to be an admin user. this is not always possible and i wonder if it's possible to use this/another rest-api as an ordenary user with read/write access for a vhost/exchange/queue.

is there any hint (i did not find any) on how to do this or should i implement my own rest-api?

thanks in advance for any answer.

g.sp.

Wes Peng

unread,
Jan 26, 2022, 7:28:51 AM1/26/22
to rabbitm...@googlegroups.com
The rest api user must have admin privilege for creating vhosts and granting privileges to other users.
 
Regards 

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/72db8779-8d11-4632-9af5-781509bd5d1bn%40googlegroups.com.

g. sp.

unread,
Jan 26, 2022, 8:21:47 AM1/26/22
to rabbitmq-users
that's obvious but i feel an ordinary might wish to call services like api/exchanges/<vhost>/<exchange>/publish, api/exchanges/<vhost>/<exchange>/get and/or bind which do/should not require admin privilege. how can an ordinary user use such calls?

Luke Bakken

unread,
Jan 26, 2022, 10:58:34 AM1/26/22
to rabbitmq-users
Hello -

On Wednesday, January 26, 2022 at 3:44:27 AM UTC-8 s...@softing.com wrote:
i found and can use the rabbitmq's admin rest api which requires the user to be an admin user. this is not always possible and i wonder if it's possible to use this/another rest-api as an ordenary user with read/write access for a vhost/exchange/queue

Are you sure of that? What exactly have you tried? The documentation contradicts your statement:


My guess is that you have not given your user the correct tag (management) and permissions to the vhost.

The only way I can assist is if you provide exact instructions for what you have tried and what you expect. In other words -
  • How did you create the user(s)?
  • How did you create additional vhosts, if any?
  • How did you grant the user permissions?
  • What HTTP API calls have you tried? Provide full curl commands.
Thanks,
Luke

g. sp.

unread,
Jan 27, 2022, 2:43:10 AM1/27/22
to rabbitmq-users
you are right, the questionable user does not have management permission.

my error: because when using the direct api it is enough to give the user read and/or write permission on the vhost/exchange/queue. when using the rest-api it seems to be necessary for the user to have at least management privilege which i feel is too dangerous if a service is to be accessed by a publisher somewhere in the internet. so i feel, i'm going to implement my own publish-only rest-api.

thanks for clarification, g.

Reply all
Reply to author
Forward
0 new messages