Question about the ACL rules
I would like to prevent access to $SYS/#. I therefore also need to prevent access to #. Otherwise, $SYS can be subscribed to again by subscribing to the topic #. But if I work with this set of rules, then no more topics can be subscribed to at all.
rules = [ {"permit": "allow", "username": "dashboard", "action": "subscribe", "topics": ["$SYS/#"]} {"permit": "deny", "username": "#", "action": "subscribe", "topics": ["$SYS/#", "#"]} {"permit": "allow"} ]
I assume that all subscriptions are rejected by specifying #.
Your guess is correct. # stands for wildcard filter here, not symbol itself.
For now, there is no way to specify # only, you have to add single topic in allow first to avoid #.
Sorry for the late reply
I added a new configure method for you to specify wildcard only.
just add @ before your topic with wild card. For example
if you add
{"permit": "deny", "username": "#", "action": "subscribe", "topics": ["$SYS/#", "@#"]}
then it only takes effect on # only, not all topics. but it forbids your to use @ at the beginning of your topic.
will come with the next release 0.23.3
already done so.