1
# PostgreSQL Client Authentication Configuration File
2
# ===================================================
4
# Refer to the "Client Authentication" section in the PostgreSQL
5
# documentation for a complete description of this file. A short
8
# This file controls: which hosts are allowed to connect, how clients
9
# are authenticated, which PostgreSQL user names they can use, which
10
# databases they can access. Records take one of these forms:
12
# local DATABASE USER METHOD [OPTIONS]
13
# host DATABASE USER ADDRESS METHOD [OPTIONS]
14
# hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
15
# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
17
# (The uppercase items must be replaced by actual values.)
19
# The first field is the connection type: "local" is a Unix-domain
20
# socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
21
# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
22
# plain TCP/IP socket.
24
# DATABASE can be "all", "sameuser", "samerole", "replication", a
25
# database name, or a comma-separated list thereof.
27
# USER can be "all", a user name, a group name prefixed with "+", or a
28
# comma-separated list thereof. In both the DATABASE and USER fields
29
# you can also write a file name prefixed with "@" to include names
30
# from a separate file.
32
# ADDRESS specifies the set of hosts the record matches. It can be a
33
# host name, or it is made up of an IP address and a CIDR mask that is
34
# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
35
# specifies the number of significant bits in the mask. A host name
36
# that starts with a dot (.) matches a suffix of the actual host name.
37
# Alternatively, you can write an IP address and netmask in separate
38
# columns to specify the set of hosts. Instead of a CIDR-address, you
39
# can write "samehost" to match any of the server's own IP addresses,
40
# or "samenet" to match any address in any subnet that the server is
41
# directly connected to.
43
# METHOD can be "trust", "reject", "md5", "password", "gss", "sspi",
44
# "krb5", "ident", "peer", "pam", "ldap", "radius" or "cert". Note that
45
# "password" sends passwords in clear text; "md5" is preferred since
46
# it sends encrypted passwords.
48
# OPTIONS are a set of options for the authentication in the format
49
# NAME=VALUE. The available options depend on the different
50
# authentication methods -- refer to the "Client Authentication"
51
# section in the documentation for a list of which options are
52
# available for which authentication methods.
54
# Database and user names containing spaces, commas, quotes and other
55
# special characters must be quoted. Quoting one of the keywords
56
# "all", "sameuser", "samerole" or "replication" makes the name lose
57
# its special character, and just match a database or username with
60
# This file is read on server startup and when the postmaster receives
61
# a SIGHUP signal. If you edit the file on a running system, you have
62
# to SIGHUP the postmaster for the changes to take effect. You can
63
# use "pg_ctl reload" to do that.
65
# Put your actual configuration here
66
# ----------------------------------
68
# If you want to allow non-local connections, you need to add more
69
# "host" records. In that case you will also need to make PostgreSQL
70
# listen on a non-local interface via the listen_addresses
71
# configuration parameter, or via the -i or -h command line switches.
75
# TYPE DATABASE USER ADDRESS METHOD
77
@remove-line-for-nolocal@# "local" is for Unix domain socket connections only
78
@remove-line-for-nolocal@local all all @authmethodlocal@
79
# IPv4 local connections:
80
host all all 127.0.0.1/32 @authmethod@
81
# IPv6 local connections:
82
host all all ::1/128 @authmethod@