|  | 
|  | 1 | +# PostgreSQL Client Authentication Configuration File | 
|  | 2 | +# =================================================== | 
|  | 3 | +# | 
|  | 4 | +# Refer to the "Client Authentication" section in the PostgreSQL | 
|  | 5 | +# documentation for a complete description of this file.  A short | 
|  | 6 | +# synopsis follows. | 
|  | 7 | +# | 
|  | 8 | +# ---------------------- | 
|  | 9 | +# Authentication Records | 
|  | 10 | +# ---------------------- | 
|  | 11 | +# | 
|  | 12 | +# This file controls: which hosts are allowed to connect, how clients | 
|  | 13 | +# are authenticated, which PostgreSQL user names they can use, which | 
|  | 14 | +# databases they can access.  Records take one of these forms: | 
|  | 15 | +# | 
|  | 16 | +# local         DATABASE  USER  METHOD  [OPTIONS] | 
|  | 17 | +# host          DATABASE  USER  ADDRESS  METHOD  [OPTIONS] | 
|  | 18 | +# hostssl       DATABASE  USER  ADDRESS  METHOD  [OPTIONS] | 
|  | 19 | +# hostnossl     DATABASE  USER  ADDRESS  METHOD  [OPTIONS] | 
|  | 20 | +# hostgssenc    DATABASE  USER  ADDRESS  METHOD  [OPTIONS] | 
|  | 21 | +# hostnogssenc  DATABASE  USER  ADDRESS  METHOD  [OPTIONS] | 
|  | 22 | +# | 
|  | 23 | +# (The uppercase items must be replaced by actual values.) | 
|  | 24 | +# | 
|  | 25 | +# The first field is the connection type: | 
|  | 26 | +# - "local" is a Unix-domain socket | 
|  | 27 | +# - "host" is a TCP/IP socket (encrypted or not) | 
|  | 28 | +# - "hostssl" is a TCP/IP socket that is SSL-encrypted | 
|  | 29 | +# - "hostnossl" is a TCP/IP socket that is not SSL-encrypted | 
|  | 30 | +# - "hostgssenc" is a TCP/IP socket that is GSSAPI-encrypted | 
|  | 31 | +# - "hostnogssenc" is a TCP/IP socket that is not GSSAPI-encrypted | 
|  | 32 | +# | 
|  | 33 | +# DATABASE can be "all", "sameuser", "samerole", "replication", a | 
|  | 34 | +# database name, a regular expression (if it starts with a slash (/)) | 
|  | 35 | +# or a comma-separated list thereof.  The "all" keyword does not match | 
|  | 36 | +# "replication".  Access to replication must be enabled in a separate | 
|  | 37 | +# record (see example below). | 
|  | 38 | +# | 
|  | 39 | +# USER can be "all", a user name, a group name prefixed with "+", a | 
|  | 40 | +# regular expression (if it starts with a slash (/)) or a comma-separated | 
|  | 41 | +# list thereof.  In both the DATABASE and USER fields you can also write | 
|  | 42 | +# a file name prefixed with "@" to include names from a separate file. | 
|  | 43 | +# | 
|  | 44 | +# ADDRESS specifies the set of hosts the record matches.  It can be a | 
|  | 45 | +# host name, or it is made up of an IP address and a CIDR mask that is | 
|  | 46 | +# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that | 
|  | 47 | +# specifies the number of significant bits in the mask.  A host name | 
|  | 48 | +# that starts with a dot (.) matches a suffix of the actual host name. | 
|  | 49 | +# Alternatively, you can write an IP address and netmask in separate | 
|  | 50 | +# columns to specify the set of hosts.  Instead of a CIDR-address, you | 
|  | 51 | +# can write "samehost" to match any of the server's own IP addresses, | 
|  | 52 | +# or "samenet" to match any address in any subnet that the server is | 
|  | 53 | +# directly connected to. | 
|  | 54 | +# | 
|  | 55 | +# METHOD can be "trust", "reject", "scram-sha-256", "password", "gss",  | 
|  | 56 | +# "sspi", "ident", "peer", "pam", "ldap", "radius", "cert" or "oauth". | 
|  | 57 | +# Note that "password" sends passwords in clear text; "scram-sha-256" is | 
|  | 58 | +# preferred since it sends encrypted passwords. | 
|  | 59 | +# | 
|  | 60 | +# OPTIONS are a set of options for the authentication in the format | 
|  | 61 | +# NAME=VALUE.  The available options depend on the different | 
|  | 62 | +# authentication methods -- refer to the "Client Authentication" | 
|  | 63 | +# section in the documentation for a list of which options are | 
|  | 64 | +# available for which authentication methods. | 
|  | 65 | +# | 
|  | 66 | +# Database and user names containing spaces, commas, quotes and other | 
|  | 67 | +# special characters must be quoted.  Quoting one of the keywords | 
|  | 68 | +# "all", "sameuser", "samerole" or "replication" makes the name lose | 
|  | 69 | +# its special character, and just match a database or username with | 
|  | 70 | +# that name. | 
|  | 71 | +# | 
|  | 72 | +# --------------- | 
|  | 73 | +# Include Records | 
|  | 74 | +# --------------- | 
|  | 75 | +# | 
|  | 76 | +# This file allows the inclusion of external files or directories holding | 
|  | 77 | +# more records, using the following keywords: | 
|  | 78 | +# | 
|  | 79 | +# include           FILE | 
|  | 80 | +# include_if_exists FILE | 
|  | 81 | +# include_dir       DIRECTORY | 
|  | 82 | +# | 
|  | 83 | +# FILE is the file name to include, and DIR is the directory name containing | 
|  | 84 | +# the file(s) to include.  Any file in a directory will be loaded if suffixed | 
|  | 85 | +# with ".conf".  The files of a directory are ordered by name. | 
|  | 86 | +# include_if_exists ignores missing files.  FILE and DIRECTORY can be | 
|  | 87 | +# specified as a relative or an absolute path, and can be double-quoted if | 
|  | 88 | +# they contain spaces. | 
|  | 89 | +# | 
|  | 90 | +# ------------- | 
|  | 91 | +# Miscellaneous | 
|  | 92 | +# ------------- | 
|  | 93 | +# | 
|  | 94 | +# This file is read on server startup and when the server receives a | 
|  | 95 | +# SIGHUP signal.  If you edit the file on a running system, you have to | 
|  | 96 | +# SIGHUP the server for the changes to take effect, run "pg_ctl reload", | 
|  | 97 | +# or execute "SELECT pg_reload_conf()". | 
|  | 98 | +# | 
|  | 99 | +# ---------------------------------- | 
|  | 100 | +# Put your actual configuration here | 
|  | 101 | +# ---------------------------------- | 
|  | 102 | +# | 
|  | 103 | +# If you want to allow non-local connections, you need to add more | 
|  | 104 | +# "host" records.  In that case you will also need to make PostgreSQL | 
|  | 105 | +# listen on a non-local interface via the listen_addresses | 
|  | 106 | +# configuration parameter, or via the -i or -h command line switches. | 
|  | 107 | + | 
|  | 108 | +# CAUTION: Configuring the system for local "trust" authentication | 
|  | 109 | +# allows any local user to connect as any PostgreSQL user, including | 
|  | 110 | +# the database superuser.  If you do not trust all your local users, | 
|  | 111 | +# use another authentication method. | 
|  | 112 | + | 
|  | 113 | + | 
|  | 114 | +# TYPE  DATABASE        USER            ADDRESS                 METHOD | 
|  | 115 | + | 
|  | 116 | +# "local" is for Unix domain socket connections only | 
|  | 117 | +local   all             all                                     trust | 
|  | 118 | +# IPv4 local connections: | 
|  | 119 | +host    all             all             127.0.0.1/32            trust | 
|  | 120 | +# IPv6 local connections: | 
|  | 121 | +host    all             all             ::1/128                 trust | 
|  | 122 | +# Allow replication connections from localhost, by a user with the | 
|  | 123 | +# replication privilege. | 
|  | 124 | +local   replication     all                                     trust | 
|  | 125 | +host    replication     all             127.0.0.1/32            trust | 
|  | 126 | +host    replication     all             ::1/128                 trust | 
|  | 127 | + | 
|  | 128 | +host all all all scram-sha-256 | 
0 commit comments