-
Notifications
You must be signed in to change notification settings - Fork 1
/
auth-plugin.conf
27 lines (25 loc) · 966 Bytes
/
auth-plugin.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# jpmens/mosquitto-auth-plug sample configuration
# auth_plugin /usr/local/lib/auth-plug.so
# auth_opt_backends redis,http
# auth_opt_superusers admin
# auth_opt_redis_userquery GET %s
# auth_opt_redis_aclquery GET %s-%s
# auth_opt_redis_host redis-mosq
# auth_opt_redis_port 6379
auth_plugin /usr/local/lib/auth-plug.so
auth_opt_backends postgres,http
auth_opt_superusers admin
auth_opt_user mosq_user
auth_opt_pass 12345678
auth_opt_superquery SELECT COALESCE(COUNT(*),0) FROM account WHERE username = $1 AND super = 1
auth_opt_userquery SELECT password FROM account WHERE username = $1 limit 1
auth_opt_dbname broker_data
auth_opt_host postgres-mosq
auth_opt_port 5432
auth_opt_http_ip 127.0.0.1
auth_opt_http_getuser_uri /auth
auth_opt_http_superuser_uri /superuser
auth_opt_http_aclcheck_uri /acl
auth_opt_http_getuser_params domain=DOMAIN,port=PORT
auth_opt_http_superuser_params domain=DOMAIN,port=PORT
auth_opt_http_aclcheck_params domain=DOMAIN,port=PORT