C
C
cjitkul332017-03-06 12:59:54
linux
cjitkul33, 2017-03-06 12:59:54

How to make permission delimitation in mosquitto?

I can't set up authorization in mosquitto
How to do it:
user admin - writes everything, reads everything
user writer - write only, but in any topic, reading is prohibited for the
rest - no access
using mosquitto_passwd created users
added to the config

allow_anonymous false
password_file /etc/mosquitto/passwd
acl_file /etc/mosquitto/mosquitto.acl

in mosquitto.acl
wrote:
user admin
topic readwrite #

user writer
topic write #

restarted mosquitto
as a result,
connection without login and password - accepted (but should not), you can subscribe to any topic and receive messages
connection with a non-existent login - accepted (but should not), but messages do not come to the topic
mosquitto version 1.4.11 (build date Fri, 03 Mar 2017 15:11:39
run under ubuntu server 14.04
In general, it's not clear - how to do it right?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question