postgresql/src/bin
Heikki Linnakangas 818fd4a67d Support SCRAM-SHA-256 authentication (RFC 5802 and 7677).
This introduces a new generic SASL authentication method, similar to the
GSS and SSPI methods. The server first tells the client which SASL
authentication mechanism to use, and then the mechanism-specific SASL
messages are exchanged in AuthenticationSASLcontinue and PasswordMessage
messages. Only SCRAM-SHA-256 is supported at the moment, but this allows
adding more SASL mechanisms in the future, without changing the overall
protocol.

Support for channel binding, aka SCRAM-SHA-256-PLUS is left for later.

The SASLPrep algorithm, for pre-processing the password, is not yet
implemented. That could cause trouble, if you use a password with
non-ASCII characters, and a client library that does implement SASLprep.
That will hopefully be added later.

Authorization identities, as specified in the SCRAM-SHA-256 specification,
are ignored. SET SESSION AUTHORIZATION provides more or less the same
functionality, anyway.

If a user doesn't exist, perform a "mock" authentication, by constructing
an authentic-looking challenge on the fly. The challenge is derived from
a new system-wide random value, "mock authentication nonce", which is
created at initdb, and stored in the control file. We go through these
motions, in order to not give away the information on whether the user
exists, to unauthenticated users.

Bumps PG_CONTROL_VERSION, because of the new field in control file.

Patch by Michael Paquier and Heikki Linnakangas, reviewed at different
stages by Robert Haas, Stephen Frost, David Steele, Aleksander Alekseev,
and many others.

Discussion: https://www.postgresql.org/message-id/CAB7nPqRbR3GmFYdedCAhzukfKrgBLTLtMvENOmPrVWREsZkF8g%40mail.gmail.com
Discussion: https://www.postgresql.org/message-id/CAB7nPqSMXU35g%3DW9X74HVeQp0uvgJxvYOuA4A-A3M%2B0wfEBv-w%40mail.gmail.com
Discussion: https://www.postgresql.org/message-id/55192AFE.6080106@iki.fi
2017-03-07 14:25:40 +02:00
..
initdb Support SCRAM-SHA-256 authentication (RFC 5802 and 7677). 2017-03-07 14:25:40 +02:00
pg_archivecleanup pg_archivecleanup: Add NLS 2016-11-04 10:40:05 -04:00
pg_basebackup Add pg_current_logfile() function. 2017-03-03 11:43:11 +05:30
pg_config Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pg_controldata Support SCRAM-SHA-256 authentication (RFC 5802 and 7677). 2017-03-07 14:25:40 +02:00
pg_ctl Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
pg_dump pg_dump: Properly handle public schema ACLs with --clean 2017-03-06 23:29:02 -05:00
pg_resetwal Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
pg_rewind Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
pg_test_fsync pg_test_fsync: Add NLS 2016-11-04 10:40:05 -04:00
pg_test_timing pg_test_timing: Add NLS 2016-11-04 10:40:05 -04:00
pg_upgrade Move atooid() definition to a central place 2017-03-01 11:55:28 -05:00
pg_waldump Remove now-dead code for !HAVE_INT64_TIMESTAMP. 2017-02-23 14:04:43 -05:00
pgbench Allow backslash line continuations in pgbench's meta commands. 2017-01-20 11:10:22 -05:00
pgevent Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
psql psql: Add tab completion for logical replication 2017-03-03 14:13:48 -05:00
scripts Move atooid() definition to a central place 2017-03-01 11:55:28 -05:00
Makefile Rename user-facing tools with "xlog" in the name to say "wal". 2017-02-09 16:23:46 -05:00