server icon indicating copy to clipboard operation
server copied to clipboard

How to allow specific username to read/write on a specific topic, and denied enything else?

Open hisamafahri opened this issue 5 months ago • 1 comments

I have the following auth.yml configuration:

auth:
  - username: admin
    password: admin
    allow: true
  - username: client_1
    password: client_1
    allow: true

# 0 = deny, 1 = read only, 2 = write only, 3 = read and write
acl:
  - username: admin
    filters:
      '#': 3
  - username: client_1
    filters:
      '#': 0
      client_1/#: 3

In the config above, the client_1 cannot read or write to any topics (even though I specifically wants set the client_1/#: 3.

If I remove '#': 0 from the client_1's filters, now client_1 filter can read/write to any topics.

Any idea on how to limit specific username to only able to read/write on a specific topic and denied the rest?

hisamafahri avatar Jan 20 '24 08:01 hisamafahri