Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##--------------------------------------------------------------------
- ## PostgreSQL Auth/ACL Plugin
- ##--------------------------------------------------------------------
- ## Postgre Server: 5432, , localhost:5432
- ## connection string (used in NodeJs) postgres://myusername:mypassword@somename.cppj8b9hmnpe.us-west-2.rds.amazonaws.com:5432/mydatabase
- auth.pgsql.server = postgres://somename.cppj8b9hmnpe.us-west-2.rds.amazonaws.com:5432
- auth.pgsql.pool = 8
- auth.pgsql.username = myusername
- auth.pgsql.password = mypassword
- auth.pgsql.database = mydatabase
- auth.pgsql.encoding = utf8
- auth.pgsql.ssl = false
- ##auth.pgsql.ssl_opts.keyfile =
- ##auth.pgsql.ssl_opts.certfile =
- ##auth.pgsql.ssl_opts.cacertfile =
- ## Variables: %u = username, %c = clientid, %a = ipaddress
- ## Authentication Query: select password only
- auth.pgsql.auth_query = select id from users where some_id = '%u' limit 1
- ## Password hash: plain, md5, sha, sha256
- auth.pgsql.password_hash = plain
- ## sha256 with salt prefix
- ## auth.pgsql.password_hash = salt sha256
- ## sha256 with salt suffix
- ## auth.pgsql.password_hash = sha256 salt
- ## pbkdf2 with macfun iterations dklen
- ## macfun: md4, md5, ripemd160, sha, sha224, sha256, sha384, sha512
- ## auth.pgsql.password_hash = pbkdf2 sha256 1000 20
- ## Superuser Query
- auth.pgsql.super_query = select is_superuser from mqtt_user where username = '%u' limit 1
- ## ACL Query. Comment this query, the acl will be disabled.
- ## auth.pgsql.acl_query = select allow, ipaddr, username, clientid, access, topic from mqtt_acl where ipaddr = '%a' or username = '%u' or username = '$all' or clientid = '%c'
- ## If no rules matched, return...
- auth.pgsql.acl_nomatch = deny
Add Comment
Please, Sign In to add comment