-
Notifications
You must be signed in to change notification settings - Fork 2
/
acl.conf
34 lines (27 loc) · 1011 Bytes
/
acl.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
%%--------------------------------------------------------------------
%%
%% [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, {user, "nodice"}, pubsub, ["$SYS/#", "#"]}.
{allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}.
%%{deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.
{deny, all, publish, ["clients"]}.
{deny, all, publish, ["clients/#"]}.
{deny, all, publish, ["table/#/clients"]}.
{allow, all}.