6

I tried to apply an access list to a user, but Mosquitto always takes the highest access level and apply it.

I tried to apply this:

user roger
topic readwrite device/1/#
topic read device/1/name/

I also tried:

user roger
topic read device/1/name/
topic readwrite device/1/#

In both cases it allows read/write to the topic:

device/1/name/

Am I missing something?

1
  • 2
    The man page that covers the ACL format doesn't make any comment on the behaviour of overlapping topic patterns, so this may just be undefined behaviour
    – hardillb
    Commented Jun 4, 2018 at 14:40

1 Answer 1

1

device/1/name/ is part of this "topic readwrite device/1/#" you cant enable access to all subtopics and after that disabling one sub topic is not possible :"topic read device/1/name/"

you can try allow one level subtopic to readwrite access

"topic readwrite device/1/+" "topic read device/1/name/subtopic".

you can write and read

  • "device/1/subtopic"
  • "device/1/anothertopic"
  • "device/1/name"

.

but you can only read

  • "device/1/name/subtopic"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.