Listeners with mountpoints and authorization


I’m just trying to use listeners and mountpoints and try to “isolate” the different clients on the listeners per authorization rules in EMQX 5.1

What I’ve done :
I created a new listener with Mountpoint “mountpoint/”.
I created a new client “user1” which connects to this listeners
I changed the authorization file to allow subscription on mountpoint/# and deny the rest with
{allow, all, subscribe, [“mountpoint/#”]}.
{deny, all}.

The client can connect to the listener but is not able to subscribe to a topic like “test” what normally should be mapped to mountpoint/test because of the given mountpoint of the listener
If I subscribe to “mountpoint/test” the subscription is successfully, but this leads to a mapped topic “mountpoint/mountpoint/test”

I assumed that the mountpoint is mapped to the topic before the authorization will be done.
How can this be configured in EMQX to work like this?

Thanks in advance

Hi, Chris.

This is because the authorization happens before the topuc is mounted, and we want to make sure that the client has the original topic’s authority.