emqx-auth-pgsql (opens new window)

emqx-auth-pgsql emqx-auth-pgsql (opens new window) - 图1 (opens new window)

auth.pgsql.server

Type Default
ip 127.0.0.1:5432
说明

PostgreSQL 服务器地址。

auth.pgsql.pool

Type Default
integer 8
说明

数据库连接线程池大小。

auth.pgsql.username

Type Default
string root
说明

PostgreSQL 用户名。

auth.pgsql.password

Type Default
string -
说明

PostgreSQL 密码。

auth.pgsql.database

Type Default
string mqtt
说明

PostgreSQL 数据库名称。

auth.pgsql.encoding

Type Default
string utf8
说明

PostgreSQL 数据库字符编码格式。

auth.pgsql.ssl

Type Optional Value Default
enum true, false false
说明

是否启用 TLS 连接。

auth.pgsql.ssl_opts.keyfile

Type Default
string -
说明

客户端私钥文件路径。

auth.pgsql.ssl_opts.certfile

Type Default
string -
说明

客户端证书文件路径。

auth.pgsql.ssl_opts.cacertfile

Type Default
string -
说明

客户端 CA 证书文件路径。

auth.pgsql.auth_query

Type Default
string select password from mqtt_user where username = ‘%u’ limit 1
说明

认证时使用的 SQL 选取语句,同 auth.mysql.auth_query。

auth.pgsql.password_hash

Type Default
string sh256
说明

存储在数据库的密码所使用的加密方式,同 auth.mysql.password_hash。

auth.pgsql.super_query

Type Default
string select is_superuser from mqtt_user where username = ‘%u’ limit 1
说明

超级用户认证时使用的 SQL 选取语句,同 auth.mysql.super_query。

auth.pgsql.acl_query

Type Default
string select allow, ipaddr, username, clientid, access, topic from mqtt_acl where ipaddr = ‘%a’ or username = ‘%u’ or username = ‘$all’ or clientid = ‘%c’
说明

ACL 校验时使用的 SQL 选取语句,同 auth.mysql.acl_query。