mosquitto-users team mailing list archive
-
mosquitto-users team
-
Mailing list archive
-
Message #00295
Re: mosquitto.conf and "pattern" vs "topic" (ACL)
Hi Stefano,
> (a) only "pattern /clid/%c/data"
I suspect the problem that you're seeing here is that if this is your
only acl, then other clients won't be able to see that topic. This
means your mosquitto_sub instance won't receive the messages, even
though it is subscribed to #.
You could try something like this instead (how you do it depends on
what you're trying to achieve of course)
topic read #
pattern write /clid/%c/data
Or you could add a user line to only allow read access to a specific user.
If you can't do what you want, you can write a plugin to do it -
https://github.com/jpmens/mosquitto-auth-plug is a great example.
Cheers,
Roger
Follow ups
References