Guest User

Untitled

a guest
May 30th, 2017
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. ##--------------------------------------------------------------------
  2. ## PostgreSQL Auth/ACL Plugin
  3. ##--------------------------------------------------------------------
  4.  
  5. ## Postgre Server: 5432, , localhost:5432
  6. ## connection string (used in NodeJs) postgres://myusername:mypassword@somename.cppj8b9hmnpe.us-west-2.rds.amazonaws.com:5432/mydatabase
  7.  
  8. auth.pgsql.server = postgres://somename.cppj8b9hmnpe.us-west-2.rds.amazonaws.com:5432
  9.  
  10. auth.pgsql.pool = 8
  11.  
  12. auth.pgsql.username = myusername
  13.  
  14. auth.pgsql.password = mypassword
  15.  
  16. auth.pgsql.database = mydatabase
  17.  
  18. auth.pgsql.encoding = utf8
  19.  
  20. auth.pgsql.ssl = false
  21.  
  22. ##auth.pgsql.ssl_opts.keyfile =
  23.  
  24. ##auth.pgsql.ssl_opts.certfile =
  25.  
  26. ##auth.pgsql.ssl_opts.cacertfile =
  27.  
  28. ## Variables: %u = username, %c = clientid, %a = ipaddress
  29.  
  30. ## Authentication Query: select password only
  31. auth.pgsql.auth_query = select id from users where some_id = '%u' limit 1
  32.  
  33. ## Password hash: plain, md5, sha, sha256
  34. auth.pgsql.password_hash = plain
  35.  
  36. ## sha256 with salt prefix
  37. ## auth.pgsql.password_hash = salt sha256
  38.  
  39. ## sha256 with salt suffix
  40. ## auth.pgsql.password_hash = sha256 salt
  41.  
  42. ## pbkdf2 with macfun iterations dklen
  43. ## macfun: md4, md5, ripemd160, sha, sha224, sha256, sha384, sha512
  44. ## auth.pgsql.password_hash = pbkdf2 sha256 1000 20
  45.  
  46. ## Superuser Query
  47. auth.pgsql.super_query = select is_superuser from mqtt_user where username = '%u' limit 1
  48.  
  49. ## ACL Query. Comment this query, the acl will be disabled.
  50. ## 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'
  51.  
  52. ## If no rules matched, return...
  53. auth.pgsql.acl_nomatch = deny
Add Comment
Please, Sign In to add comment