Surprising permission checks performed when adding a Shovel #2694
Replies: 4 comments
-
There are two sides to every Shovel: the source and destination ones. As such, both sides are validated, including their respective URIs which for the 2nd user include
It's not clear from your log how the user Whether the acting user should have access to either source or destination depends on who you ask. Such fine-grained user separation is admirable but rare to see: quite often the declaring user is also used to connect to either source or destination. |
Beta Was this translation helpful? Give feedback.
-
@michaelklishin thanks. The 5697bfdf-b663-441e-9078-ae9567c11cb6 user's credentials are provided to Invoke-RestMethod -Method PUT... It's not clear (to me), which user should be used for source and destination queues creation. P.S. |
Beta Was this translation helpful? Give feedback.
-
So Currently, Shovel checks permissions for the acting user as well. This is likely to be more consistent with other endpoints, and because a separate user is rarely used from both source and destinations (e.g. Shovels are very frequently declared on one or the other side). @kjnilsson do you remember what the thinking was during the multi-protocol Shovel redesign? |
Beta Was this translation helpful? Give feedback.
-
Yes,
You mean, you know to check permissions for URI's user, but you do it only for either source or destination, never for both? |
Beta Was this translation helpful? Give feedback.
-
Hi,
Here are the logs we get (RabbitMQ 3.7.24, acting user is 5697bfdf-b663-441e-9078-ae9567c11cb6)
I don't understand why is this access check performed at all.
5697bfdf-b663-441e-9078-ae9567c11cb6 should have access to vhost '/' (to create shovel)
guest should have access to vhost '/' (dest-exchange)
VaronisOwner should have access to vhost 'nasuni' (src-queue)
I'm not sure the last 2 should be validated during PUT, but AFAIU, the failed access check shouldn't be performed.
Beta Was this translation helpful? Give feedback.
All reactions