* MDF [conf] add config of acl rules;
@@ -91,11 +91,6 @@ allow_anonymous=true
## Value: allow | deny
acl_nomatch=allow
-## Default ACL File.
-##
-## Value: File Name
-acl_file=/etc/nanomq_acl.conf
-
## Whether to enable ACL cache.
##
## If enabled, ACLs roles for each client will be cached in the memory
@@ -121,6 +116,21 @@ acl_cache_ttl=1m
## Default: ignore
acl_deny_action=ignore
+## ACL Rules
+## Format:
+## acl.rule.<No>=<Spec>
+
+## Allow MQTT client using username "dashboard" to subscribe to "$SYS/#" topics
+# acl.rule.1={"permit": "allow", "username": "dashboard", "action": "subscribe", "topics": ["$SYS/#"]}
+
+## Allow users with IP address "127.0.0.1" to publish/subscribe to topics "$SYS/#", "#"
+# acl.rule.2={"permit": "allow", "ipaddr": "127.0.0.1", "action": "pubsub", "topics": ["$SYS/#", "#"]}
+
+## Deny "All Users" subscribe to "$SYS/#" "#" Topics
+# acl.rule.3={"permit": "deny", "username": "#", "action": "subscribe", "topics": ["$SYS/#", "#"]}
+
+## Allow any other publish/subscribe operation
+# acl.rule.4={"permit": "allow"}
## -------------------- SQLite Config -------------------- ##
