acl.conf 819 B

1234567891011121314151617181920212223242526
  1. %%--------------------------------------------------------------------
  2. %% [ACL](https://docs.emqx.io/broker/v3/en/config.html)
  3. %%
  4. %% -type(who() :: all | binary() |
  5. %% {ipaddr, esockd_access:cidr()} |
  6. %% {client, binary()} |
  7. %% {user, binary()}).
  8. %%
  9. %% -type(access() :: subscribe | publish | pubsub).
  10. %%
  11. %% -type(topic() :: binary()).
  12. %%
  13. %% -type(rule() :: {allow, all} |
  14. %% {allow, who(), access(), list(topic())} |
  15. %% {deny, all} |
  16. %% {deny, who(), access(), list(topic())}).
  17. %%--------------------------------------------------------------------
  18. {allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}.
  19. {allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}.
  20. {deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.
  21. {allow, all}.