I want to ensure that all users on my RabbitMQ clusters only have the rights they need for their intended purpose.
I'm using Exchange Federation between 2 RabbitMQ clusters and I want to restrict the rights of the user on the upstream cluster so that it can only federate messages from one Exchange. This is to ensure that the user used by the downstream cluster is not able to publish/subscribe/configure anything beyond it's intended purpose (or at least as much as is possible).
I understand that the permissions may be complex, as a worker queue and bindings must be dynamically created on the upstream cluster so this may not be straightforward.
All examples I've found specify to set the user's permissions as:
Configure regexp | Write regexp | Read regexp |
---|---|---|
.* | .* | .* |
The federation works fine when the user has these settings but this is an all powerful user and I'm not comfortable with this. If I try to reconfigure it to anything more specific then I end up an error like the below:
{server_initiated_close,403,
<<"ACCESS_REFUSED - access to exchange 'exchange-a' in vhost 'vhost-a' refused for user 'user-a'">>}
How can I restrict these permissions to prevent the federation user having more access than it needs?