48 lines
1.4 KiB
Plaintext
48 lines
1.4 KiB
Plaintext
authz:{
|
|
rules: [
|
|
# {
|
|
# type: mysql
|
|
# config: {
|
|
# server: "127.0.0.1:3306"
|
|
# database: mqtt
|
|
# pool_size: 1
|
|
# username: root
|
|
# password: public
|
|
# auto_reconnect: true
|
|
# ssl: false
|
|
# }
|
|
# sql: "select ipaddress, username, clientid, action, permission, topic from mqtt_acl where ipaddr = '%a' or username = '%u' or clientid = '%c'"
|
|
# },
|
|
# {
|
|
# type: pgsql
|
|
# config: {
|
|
# server: "127.0.0.1:5432"
|
|
# database: mqtt
|
|
# pool_size: 1
|
|
# username: root
|
|
# password: public
|
|
# auto_reconnect: true
|
|
# ssl: false
|
|
# }
|
|
# sql: "select ipaddress, username, clientid, action, permission, topic from mqtt_acl where ipaddr = '%a' or username = '%u' or username = '$all' or clientid = '%c'"
|
|
# },
|
|
# {
|
|
# type: redis
|
|
# config: {
|
|
# server: "127.0.0.1:6379"
|
|
# database: 0
|
|
# pool_size: 1
|
|
# password: public
|
|
# auto_reconnect: true
|
|
# ssl: false
|
|
# }
|
|
# cmd: "HGETALL mqtt_acl:%u"
|
|
# },
|
|
{
|
|
permission: allow
|
|
action: all
|
|
topics: ["#"]
|
|
}
|
|
]
|
|
}
|