2 ################################################
3 ### Managed by someone's ansible provisioner ###
4 ################################################
5 # Part of: https://git.somenet.org/root/pub/somesible.git
6 # 2017-2024 by someone <someone@somenet.org>
8 # PostgreSQL Client Authentication Configuration File
9 # ===================================================
11 # Refer to the "Client Authentication" section in the PostgreSQL
12 # documentation for a complete description of this file. A short
15 # This file controls: which hosts are allowed to connect, how clients
16 # are authenticated, which PostgreSQL user names they can use, which
17 # databases they can access. Records take one of these forms:
19 # local DATABASE USER METHOD [OPTIONS]
20 # host DATABASE USER ADDRESS METHOD [OPTIONS]
21 # hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
22 # hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
23 # hostgssenc DATABASE USER ADDRESS METHOD [OPTIONS]
24 # hostnogssenc DATABASE USER ADDRESS METHOD [OPTIONS]
26 # (The uppercase items must be replaced by actual values.)
28 # The first field is the connection type:
29 # - "local" is a Unix-domain socket
30 # - "host" is a TCP/IP socket (encrypted or not)
31 # - "hostssl" is a TCP/IP socket that is SSL-encrypted
32 # - "hostnossl" is a TCP/IP socket that is not SSL-encrypted
33 # - "hostgssenc" is a TCP/IP socket that is GSSAPI-encrypted
34 # - "hostnogssenc" is a TCP/IP socket that is not GSSAPI-encrypted
36 # DATABASE can be "all", "sameuser", "samerole", "replication", a
37 # database name, or a comma-separated list thereof. The "all"
38 # keyword does not match "replication". Access to replication
39 # must be enabled in a separate record (see example below).
41 # USER can be "all", a user name, a group name prefixed with "+", or a
42 # comma-separated list thereof. In both the DATABASE and USER fields
43 # you can also write a file name prefixed with "@" to include names
44 # from a separate file.
46 # ADDRESS specifies the set of hosts the record matches. It can be a
47 # host name, or it is made up of an IP address and a CIDR mask that is
48 # an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
49 # specifies the number of significant bits in the mask. A host name
50 # that starts with a dot (.) matches a suffix of the actual host name.
51 # Alternatively, you can write an IP address and netmask in separate
52 # columns to specify the set of hosts. Instead of a CIDR-address, you
53 # can write "samehost" to match any of the server's own IP addresses,
54 # or "samenet" to match any address in any subnet that the server is
55 # directly connected to.
57 # METHOD can be "trust", "reject", "md5", "password", "scram-sha-256",
58 # "gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert".
59 # Note that "password" sends passwords in clear text; "md5" or
60 # "scram-sha-256" are preferred since they send encrypted passwords.
62 # OPTIONS are a set of options for the authentication in the format
63 # NAME=VALUE. The available options depend on the different
64 # authentication methods -- refer to the "Client Authentication"
65 # section in the documentation for a list of which options are
66 # available for which authentication methods.
68 # Database and user names containing spaces, commas, quotes and other
69 # special characters must be quoted. Quoting one of the keywords
70 # "all", "sameuser", "samerole" or "replication" makes the name lose
71 # its special character, and just match a database or username with
74 # This file is read on server startup and when the server receives a
75 # SIGHUP signal. If you edit the file on a running system, you have to
76 # SIGHUP the server for the changes to take effect, run "pg_ctl reload",
77 # or execute "SELECT pg_reload_conf()".
79 # Put your actual configuration here
80 # ----------------------------------
82 # If you want to allow non-local connections, you need to add more
83 # "host" records. In that case you will also need to make PostgreSQL
84 # listen on a non-local interface via the listen_addresses
85 # configuration parameter, or via the -i or -h command line switches.
91 # If you change this first entry you will need to make sure that the
92 # database superuser can access the database using some other method.
93 # Noninteractive access to all databases is required during automatic
94 # maintenance (custom daily cronjobs, replication, and similar tasks).
96 # Database administrative login by Unix domain socket
97 local all postgres peer
99 # TYPE DATABASE USER ADDRESS METHOD
101 host all all 0.0.0.0/0 md5
102 host all all ::/0 md5
104 # Allow replication connections from localhost, by a user with the
105 # replication privilege.
106 #local replication all peer
107 #host replication all 127.0.0.1/32 md5
108 #host replication all ::1/128 md5