Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
db1d7a9a
Commit
db1d7a9a
authored
Mar 08, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve wording of pg_hba.conf file.
parent
fc701047
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
97 additions
and
86 deletions
+97
-86
src/backend/libpq/pg_hba.conf.sample
src/backend/libpq/pg_hba.conf.sample
+97
-86
No files found.
src/backend/libpq/pg_hba.conf.sample
View file @
db1d7a9a
...
@@ -9,27 +9,28 @@
...
@@ -9,27 +9,28 @@
#
#
# It is read on postmaster startup and when the postmaster receives a SIGHUP.
# It is read on postmaster startup and when the postmaster receives a SIGHUP.
# If you edit the file on a running system, you have to SIGHUP the postmaster
# If you edit the file on a running system, you have to SIGHUP the postmaster
# for the changes to take effect.
# for the changes to take effect
, or use "pg_ctl reload"
.
#
#
# Each line is a new record. Records cannot
be continued across multiple
# Each line is a new record. Records cannot
span multiple lines.
#
lines.
Comments begin with # and continue to the end of the line.
# Comments begin with # and continue to the end of the line.
# Blank lines are ignored. A record consists of tokens separated by
# Blank lines are ignored. A record consists of tokens separated by
#
multiple
spaces or tabs.
# spaces or tabs.
#
#
# Each record specifies the authentication method to be used for connections
# Each record specifies a connection type and authentication method. Most
# of a certain type that match a certain set of IP addresses (if relevant
# records also can restrict based on database name or IP address.
# for the connection type) and a certain database or databases. The
# postmaster finds the first record that matches the connection type,
# client address, and database name, and uses that record to perform client
# authentication. If no record matches, the connection is rejected.
#
#
# The first token of a record indicates its type. The remainder of the
# When reading this file, the postmaster finds the first record that
# record is interpreted based on its type.
# matches the connection type, client address, and database name, and uses
# that record to perform client authentication. If no record matches, the
# connection is rejected.
#
# The first token of a record indicates the connection type. The
# remainder of the record is interpreted based on that type.
#
#
# Record Types
# Record Types
# ============
# ============
#
#
# There are three
types of record
s:
# There are three
record type
s:
# o host
# o host
# o hostssl
# o hostssl
# o local
# o local
...
@@ -37,26 +38,25 @@
...
@@ -37,26 +38,25 @@
# host
# host
# ----
# ----
#
#
# This record identifies networked hosts that are permitted to connect
# This record identifies hosts that are permitted to connect via TCP/IP.
# via IP connections.
#
#
# Format:
# Format:
#
#
# host DBNAME IP_ADDRESS ADDRESS_MASK AUTH_TYPE [AUTH_ARGUMENT]
# host DBNAME IP_ADDRESS ADDRESS_MASK AUTH_TYPE [AUTH_ARGUMENT]
#
#
# DBNAME can be:
# DBNAME can be:
# o
the name of a PostgreSQL databas
e
# o
a database nam
e
# o "all"
to indicate
all databases
# o "all"
, which means the record matches
all databases
#
o "sameuser" to allow access only to databases with the s
ame
#
o "sameuser", which means users can only access databases whose n
ame
#
name as the connecting user
#
is the same as their username
#
#
# The superuser needs access to the 'template1' database because it is used
# by a variety of PostgreSQL utility commands.
#
# IP_ADDRESS and ADDRESS_MASK are standard dotted decimal IP address and
# IP_ADDRESS and ADDRESS_MASK are standard dotted decimal IP address and
# mask values. IP addresses can only be specified numerically, not as
# mask values. IP addresses can only be specified numerically, not as
# domain or host names.
# domain or host names.
#
#
# Do not prevent the superuser from accessing the template1 database.
# Various utility commands need access to template1.
#
# AUTH_TYPE and AUTH_ARGUMENT are described below.
# AUTH_TYPE and AUTH_ARGUMENT are described below.
#
#
#
#
...
@@ -65,42 +65,43 @@
...
@@ -65,42 +65,43 @@
#
#
# The format of this record is identical to "host".
# The format of this record is identical to "host".
#
#
# This record identifies a set of network hosts that are permitted to
#
# connect to databases over secure SSL IP connections. Note that a "host"
#
# record will also allow SSL connections. "hostssl" matches *only*
# It specifies hosts that required connection via secure SSL. "host"
# SSL-secured connections.
# records allow SSL connections too, but "hostssl" only allows SSL-secured
# connections.
#
#
# This keyword is only available if the server was compiled with SSL
# This keyword is only available if the server was compiled with SSL
# support
enabled
.
# support.
#
#
#
#
# local
# local
# -----
# -----
#
#
# This record identifies the authentication to use when connecting to
# This record identifies the authentication for local UNIX domain socket
# the server via a local UNIX domain socket. UNIX-socket connections are
# connections. Without this record, UNIX-socket connections are disallowed
# allowed only if this record type appears.
#
#
# Format:
# Format:
# local DBNAME AUTH_TYPE [AUTH_ARGUMENT]
# local DBNAME AUTH_TYPE [AUTH_ARGUMENT]
#
#
# This format is identical to the "host" record type except the
IP_ADDRESS
# This format is identical to the "host" record type except the
re are no
#
and ADDRESS_MASK fields are omitted
.
#
IP_ADDRESS and ADDRESS_MASK fields
.
#
#
#
#
#
#
# Authentication Types (AUTH_TYPE)
# Authentication Types (AUTH_TYPE)
# ================================
# ================================
#
#
# AUTH_TYPE indicates the method used to authenticate users.
The username
# AUTH_TYPE indicates the method used to authenticate users.
Each record
#
is specified in the connection request. A different AUTH_TYPE can be
#
has an AUTH_TYPE.
#
specified for each record in the file.
#
#
#
trust:
#
trust:
No authentication is done. Any valid username is accepted,
#
No authentication is done. Any valid username is accepted,
# including the PostgreSQL superuser. This option should
# including the PostgreSQL superuser. This option should
# be used only for hosts where all users are trusted.
# be used only for hosts where all users are trusted.
#
#
# password: Authentication is done by matching a password supplied
# password:
# Authentication is done by matching a password supplied
# in clear by the host. If no AUTH_ARGUMENT is used, the
# in clear by the host. If no AUTH_ARGUMENT is used, the
# password is compared with the user's entry in the
# password is compared with the user's entry in the
# pg_shadow table.
# pg_shadow table.
...
@@ -115,48 +116,54 @@
...
@@ -115,48 +116,54 @@
# used in multiple records for easier administration.
# used in multiple records for easier administration.
# Password files can be maintained with the pg_passwd(1)
# Password files can be maintained with the pg_passwd(1)
# utility. Remember, these passwords override pg_shadow
# utility. Remember, these passwords override pg_shadow
# passwords.
# passwords. Also, such passwords are passed over the network
#
# in cleartext, meaning this should not be used on untrusted
# md5: Same as "password", but the password is encrypted while
# networks.
# being sent over the network. This method is preferable to
#
# "password" except for pre-7.2 clients that don't support it.
# md5:
# NOTE: md5 can use usernames stored in secondary password
# Same as "password", except the password is encrypted over the
# files but ignores passwords stored there. The pg_shadow
# network. This method is preferable to "password" and "crypt"
# password will always be used.
# except for pre-7.2 clients that don't support it. NOTE: md5 can
#
# use usernames stored in secondary password files but ignores
# crypt: Same as "md5", but uses crypt for pre-7.2 clients. You can
# passwords stored there. The pg_shadow password will always be
# used.
#
# crypt:
# Same as "md5", but uses crypt for pre-7.2 clients. You can
# not store encrypted passwords in pg_shadow if you use this
# not store encrypted passwords in pg_shadow if you use this
# method.
# method.
#
#
# ident: For TCP/IP connections, authentication is done by contacting
# ident:
# the ident server on the client host. Remember, this is
# For TCP/IP connections, authentication is done by contacting the
# only as secure as the client machine. On machines that
# ident server on the client host. This is only as secure as the
# support unix-domain socket credentials (currently Linux,
# client machine. On machines that support unix-domain socket
# FreeBSD, NetBSD, and BSD/OS), this method also works for
# credentials (currently Linux, FreeBSD, NetBSD, and BSD/OS), this
# "local" connections.
# method also works for "local" connections.
#
#
# AUTH_ARGUMENT is required: it determines how to map
# AUTH_ARGUMENT is required. It determines how to map remote user
# remote user names to Postgres user names. The
# names to PostgreSQL user names. If you use "sameuser", the user
# AUTH_ARGUMENT is a map name found in the
# names are assumed to be the identical. If not, AUTH_ARGUMENT is
# $PGDATA/pg_ident.conf file. The connection is accepted
# assumed to be a map name found in the $PGDATA/pg_ident.conf
# if that file contains an entry for this map name with
# file. The connection is accepted if that file contains an entry
# the ident-supplied username and the requested Postgres
# for this map name with the ident-supplied username and the
# username. The special map name "sameuser" indicates an
# requested PostgreSQL username.
# implied map (not in pg_ident.conf) that maps each ident
#
# username to the identical PostgreSQL username.
# krb4:
#
# Kerberos V4 authentication is used. Allowed only for
# krb4: Kerberos V4 authentication is used. Allowed only for
# TCP/IP connections, not for local UNIX-domain sockets.
# TCP/IP connections, not for local UNIX-domain sockets.
#
#
# krb5: Kerberos V5 authentication is used. Allowed only for
# krb5:
# Kerberos V5 authentication is used. Allowed only for
# TCP/IP connections, not for local UNIX-domain sockets.
# TCP/IP connections, not for local UNIX-domain sockets.
#
#
# pam: Authentication is passed off to PAM (PostgreSQL must be
# pam:
# configured --with-pam), using the default service name
# Authentication is passed off to PAM (PostgreSQL must be
# "postgresql" - you can specify your own service name, by
# configured --with-pam), using the default service name
# setting AUTH_ARGUMENT to the desired service name.
# "postgresql" - you can specify your own service name by
# setting AUTH_ARGUMENT to the desired service name.
#
#
# reject: Reject the connection. This is used to reject certain hosts
# reject:
# Reject the connection. This is used to reject certain hosts
# that are part of a network specified later in the file.
# that are part of a network specified later in the file.
# To be effective, "reject" must appear before the later
# To be effective, "reject" must appear before the later
# entries.
# entries.
...
@@ -169,10 +176,12 @@
...
@@ -169,10 +176,12 @@
#
#
# Allow any user on the local system to connect to any database under any
# Allow any user on the local system to connect to any database under any
# username using Unix-domain sockets (the default for local connections):
# username using Unix-domain sockets (the default for local connections):
#
# TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE AUTH_ARGUMENT
# TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE AUTH_ARGUMENT
# local all trust
# local all trust
#
#
# The same using local loopback IP connections:
# The same using local loopback TCP/IP connections:
#
# TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE AUTH_ARGUMENT
# TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE AUTH_ARGUMENT
# host all 127.0.0.1 255.255.255.255 trust
# host all 127.0.0.1 255.255.255.255 trust
#
#
...
@@ -191,9 +200,9 @@
...
@@ -191,9 +200,9 @@
#
#
# In the absence of preceding "host" lines, these two lines will reject
# In the absence of preceding "host" lines, these two lines will reject
# all connection from 192.168.54.1 (since that entry will be matched
# all connection from 192.168.54.1 (since that entry will be matched
# first), but allow Kerberos V5
-validated connections from anywhere els
e
# first), but allow Kerberos V5
connections from anywhere else on th
e
#
on the Internet. The zero mask means that no bits of the host IP address
#
Internet. The zero mask means that no bits of the host IP address are
#
are
considered, so it matches any host:
# considered, so it matches any host:
#
#
#
#
# TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE AUTH_ARGUMENT
# TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE AUTH_ARGUMENT
...
@@ -210,11 +219,11 @@
...
@@ -210,11 +219,11 @@
# host all 192.168.0.0 255.255.0.0 ident phoenix
# host all 192.168.0.0 255.255.0.0 ident phoenix
#
#
# If these are the only two lines for local connections, they will allow
# If these are the only two lines for local connections, they will allow
# local users to connect only to their own databases (database
named
the
# local users to connect only to their own databases (database
s with
the
# same
as the user name), except for administrators who may connect to
# same
name as their user name) except for administrators who may connect
#
all databases.
The file $PGDATA/admins lists the user names who are
#
to all databases.
The file $PGDATA/admins lists the user names who are
# permitted to connect to all databases.
Passwords are required in all
# permitted to connect to all databases. Passwords are required in all
# cases.
(If you prefer to use ident authorization, an ident map can
# cases. (If you prefer to use ident authorization, an ident map can
# serve a parallel purpose to the password list file used here.)
# serve a parallel purpose to the password list file used here.)
#
#
# TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE AUTH_ARGUMENT
# TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE AUTH_ARGUMENT
...
@@ -228,12 +237,14 @@
...
@@ -228,12 +237,14 @@
# Put your actual configuration here
# Put your actual configuration here
# ==================================
# ==================================
#
#
# This default configuration allows any local user to connect with any
# The default configuration allows any local user to connect using any
# PostgreSQL username, over either UNIX domain sockets or IP.
# PostgreSQL username, including the superuser, over either UNIX domain
# sockets or TCP/IP.
#
#
# If you want to allow non-local connections, you will need to add more
# If you want to allow non-local connections, you need to add more "host"
# "host" records. Also, remember IP connections are only enabled if you
# records. Also, remember TCP/IP connections are only enabled if you
# start the postmaster with the -i option.
# start the postmaster with the -i flag, or enable "tcpip_socket" in
# $PGDATA/postgresql.conf.
#
#
# CAUTION: if you are on a multiple-user machine, the default
# CAUTION: if you are on a multiple-user machine, the default
# configuration is probably too liberal for you. Change it to use
# configuration is probably too liberal for you. Change it to use
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment