emqx-auth-redis
emqx-auth-redis
auth.redis.type
| Type | Optional Value | Default |
|---|---|---|
| enum | single, sentinel, cluster |
single |
说明
Redis 服务集群类型:
single:单节点服务。sentinel:哨兵模式。cluster:集群模式。
auth.redis.server
| Type | Default |
|---|---|
| string | 127.0.0.1:6379 |
说明
Redis 服务地址,如果有多个则以逗号分隔。例如,192.168.0.1:6379, 192.168.0.2:6379。
auth.redis.sentinel
| Type | Default |
|---|---|
| string | - |
说明
Redis sentinel 模式下的集区名称。如果非 sentinel 模式,则不需要配置。
auth.redis.pool
| Type | Optional Value | Default |
|---|---|---|
| integer | > 0 | 8 |
说明
连接池大小。
auth.redis.database
| Type | Default |
|---|---|
| integer | 0 |
说明
要连接的 Redis 数据库序号。
auth.redis.password
| Type | Default |
|---|---|
| string | - |
说明
Redis 用户密码。
auth.redis.query_timeout
| Type | Default |
|---|---|
| duration | 5s |
说明
Redis 查询超时时间。
auth.redis.auth_cmd
| Type | Default |
|---|---|
| string | HMGET mqtt_user:%u password |
说明
认证查询命令,可用站位符有:
%u:客户端用户名。%c:客户端标识。%C:客户端 SSL 证书的cn。%d:客户端 SSL 证书的dn。
auth.redis.password_hash
| Type | Optional Value | Default |
|---|---|---|
| enum | plain, md5, sha, sha256, bcrypt |
plain |
说明
Redis 存储的 password 字段的编码格式。
auth.redis.super_cmd
| Type | Default |
|---|---|
| string | HGET mqtt_user:%u is_superuser |
说明
超级用户查询命令,可用的占位符有:
%u:客户端用户名。%c:客户端标识。%C:客户端 SSL 证书的cn。%d:客户端 SSL 证书的dn。
auth.redis.acl_cmd
| Type | Default |
|---|---|
| string | HGETALL mqtt_acl:%u |
说明
ACL 查询命令。可用的占位符有:
%u:客户端用户名。%c:客户端标识。
