Authentication Methods
Version coverage matrixDefinitions for PostgreSQL 18
Reading PG 18·Select a recorded version
Authenticate using the BSD Authentication service provided by the operating system. See Section 20.14 for details.
Authenticate using SSL client certificates. See Section 20.12 for details.
Use GSSAPI to authenticate the user. This is only available for TCP/IP connections. See Section 20.6 for details. It can be used in conjunction with GSSAPI encryption.
Obtain the operating system user name of the client by contacting the ident server on the client and check if it matches the requested database user name. Ident authentication can only be used on TCP/IP connections. When specified for local connections, peer authentication will be used instead. See Section 20.8 for details.
Authenticate using an LDAP server. See Section 20.10 for details.
Perform SCRAM-SHA-256 or MD5 authentication to verify the user's password. See Section 20.5 for details. Warning Support for MD5-encrypted passwords is deprecated and will be removed in a future release of PostgreSQL . Refer to Section 20.5 for details about migrating to another password type.
Authorize and optionally authenticate using a third-party OAuth 2.0 identity provider. See Section 20.15 for details.
Authenticate using the Pluggable Authentication Modules (PAM) service provided by the operating system. See Section 20.13 for details.
Require the client to supply an unencrypted password for authentication. Since the password is sent in clear text over the network, this should not be used on untrusted networks. See Section 20.5 for details.
Obtain the client's operating system user name from the operating system and check if it matches the requested database user name. This is only available for local connections. See Section 20.9 for details.
Authenticate using a RADIUS server. See Section 20.11 for details.
Reject the connection unconditionally. This is useful for “ filtering out ” certain hosts from a group, for example a reject line could block a specific host from connecting, while a later line allows the remaining hosts in a specific network to connect.
Perform SCRAM-SHA-256 authentication to verify the user's password. See Section 20.5 for details.
Use SSPI to authenticate the user. This is only available on Windows. See Section 20.7 for details.
Allow the connection unconditionally. This method allows anyone that can connect to the PostgreSQL database server to login as any PostgreSQL user they wish, without the need for a password or any other authentication. See Section 20.4 for details.