password在channel里面无法鉴权,把password放外层就可以。是不支持多层结构,还是配置方式有问题?
EMQX版本为4.4
{
"_id": "1714533090114416642",
"name": "1018设备",
"area": "Default",
"channel": {
"brokerType": "INHERITED",
"clientId": "1714533090114416642",
"username": "1714533090114416642",
"password": "1714533090114416642",
"brokerName": "emqx",
"uri": "tcp://localhost:1883"
},
"thingModelId": "1714533090114416642",
"connectionState": "ONLINE",
"visible": false,
"enabled": true,
"deviceType": "GATEWAY",
"deviceSn": "ohc",
"deviceModelId": "1699335088852783106"
}
配置password_field
auth.mongo.auth_query.password_field = channel.password
配置selector
auth.mongo.super_query.selector = channel.username=%u