default acl config
This commit is contained in:
parent
c49ac06322
commit
78e79f3279
|
@ -1,14 +1,24 @@
|
|||
{allow, {ipaddr, "127.0.0.1"}, subscribe, ["$SYS/#", "#"]}.
|
||||
%%%-----------------------------------------------------------------------------
|
||||
%%
|
||||
%% [ACL Design](https://github.com/emqtt/emqttd/wiki/ACL-Design)
|
||||
%%
|
||||
%% -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, "testuser"}, subscribe, ["a/b/c", "d/e/f/#"]}.
|
||||
|
||||
{allow, {user, "admin"}, pubsub, ["a/b/c", "d/e/f/#"]}.
|
||||
|
||||
{allow, {client, "testClient"}, subscribe, ["testTopics/testClient"]}.
|
||||
|
||||
{allow, all, subscribe, ["clients/$c"]}.
|
||||
|
||||
{allow, all, subscribe, ["users/$u/#"]}.
|
||||
{allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}.
|
||||
|
||||
{deny, all, subscribe, ["$SYS/#", "#"]}.
|
||||
|
||||
|
|
Loading…
Reference in New Issue