| 123456789101112131415161718192021222324252627 |
- %%--------------------------------------------------------------------
- %%
- %% [ACL](http://emqtt.io/docs/v2/config.html#allow-anonymous-and-acl-file)
- %%
- %% -type who() :: all | binary() |
- %% {ipaddr, esockd_access:cidr()} |
- %% {client, binary()} |
- %% {user, binary()}.
- %%
- %% -type access() :: subscribe | publish | pubsub.
- %%
- %% -type topic() :: binary().
- %%
- %% -type rule() :: {allow, all} |
- %% {allow, who(), access(), list(topic())} |
- %% {deny, all} |
- %% {deny, who(), access(), list(topic())}.
- %%
- %%--------------------------------------------------------------------
- {allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}.
- {allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}.
- {deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.
- {allow, all}.
|