pool_hba.conf 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # pgpool Client Authentication Configuration File
  2. # ===============================================
  3. #
  4. # The format rule in this file follows the rules in the PostgreSQL
  5. # Administrator's Guide. Refer to chapter "Client Authentication" for a
  6. # complete description. A short synopsis follows.
  7. #
  8. # This file controls: which hosts are allowed to connect, how clients
  9. # are authenticated, which user names they can use, which databases they
  10. # can access. Records take one of these forms:
  11. #
  12. # local DATABASE USER METHOD [OPTION]
  13. # host DATABASE USER CIDR-ADDRESS METHOD [OPTION]
  14. #
  15. # (The uppercase items must be replaced by actual values.)
  16. #
  17. # The first field is the connection type: "local" is a Unix-domain
  18. # socket, "host" is either a plain or SSL-encrypted TCP/IP socket.
  19. #
  20. # DATABASE can be "all", "sameuser", a database name, or a comma-separated
  21. # list thereof. Note that "samegroup" like in PostgreSQL's pg_hba.conf
  22. # file is not supported, since pgpool does not know which group a user
  23. # belongs to. Also note that the database specified here may not exist in
  24. # the backend PostgreSQL. pgpool will authenticate based on the database's
  25. # name, not based on whether it exists or not.
  26. #
  27. # USER can be "all", a user name, or a comma-separated list thereof. In
  28. # both the DATABASE and USER fields you can also write a file name prefixed
  29. # with "@" to include names from a separate file. Note that a group name
  30. # prefixed with "+" like in PostgreSQL's pg_hba.conf file is not supported
  31. # because of the same reason as "samegroup" token. Also note that a user
  32. # name specified here may not exist in the backend PostgreSQL. pgpool will
  33. # authenticate based on the user's name, not based on whether he/she exists.
  34. #
  35. # CIDR-ADDRESS specifies the set of hosts the record matches.
  36. # It is made up of an IP address and a CIDR mask that is an integer
  37. # (between 0 and 32 (IPv4) that specifies the number of significant bits in
  38. # the mask. Alternatively, you can write an IP address and netmask in
  39. # separate columns to specify the set of hosts.
  40. #
  41. # METHOD can be "trust", "reject", "md5" or "pam". Note that "pam" sends passwords
  42. # in clear text.
  43. #
  44. # OPTION is the name of the PAM service. Default service name is "pgpool"
  45. #
  46. # Database and user names containing spaces, commas, quotes and other special
  47. # characters must be quoted. Quoting one of the keywords "all" or "sameuser"
  48. # makes the name lose its special character, and just match a database or
  49. # username with that name.
  50. #
  51. # This file is read on pgpool startup. If you edit the file on a running
  52. # system, you have to restart the pgpool for the changes to take effect.
  53. # Put your actual configuration here
  54. # ----------------------------------
  55. #
  56. # If you want to allow non-local connections, you need to add more
  57. # "host" records. In that case you will also need to make pgpool listen
  58. # on a non-local interface via the listen_addresses configuration parameter.
  59. #
  60. # TYPE DATABASE USER CIDR-ADDRESS METHOD
  61. # "local" is for Unix domain socket connections only
  62. local all all trust
  63. # IPv4 local connections:
  64. host all all 127.0.0.1/32 trust
  65. host all all ::1/128 trust
  66. host all all 172.20.0.0/24 trust