mosquitto-users team mailing list archive
-
mosquitto-users team
-
Mailing list archive
-
Message #00306
Re: mosquitto.conf and "pattern" vs "topic" (ACL)
Il 08/09/2013 23:25, Roger Light ha scritto:
you scrap the leading / it will work now. Generally I'd recommend not
...ok I can confirm this setup without leading slash is now working on
existing version:
(1) mosquitto.conf: mostly default, with line added:
acl_file /etc/mosquitto/mosquitto_acl.conf
(2) mosquitto_acl.conf content:
topic read #
user john
pattern write clid/%u/data
(3) on terminal A:
mosquitto_sub -h localhost -v -t "#"
(4) on terminal B:
mosquitto_sub -h localhost -v -u "john" -P "john" -t "#"
(5) on terminal C:
mosquitto_sub -h localhost -v -u "super" -P "super" -t "#"
(6) on terminal D:
mosquitto_pub -h localhost -u "john" -t "clid/john/data" -m "99"
Result:
A -> shows message
B, C: -> does not show message
--
Stefano Costa, R&D Manager
M +39 335 6565749
Skype stefanocosta.bluewind
Twitter @stefanobluewind
http://www.bluewind.it
References