acl.conf 873 B

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