postgresql/src/include/access
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
..
amapi.h Add optimizer and executor support for parallel index scans. 2017-02-15 13:53:24 -05:00
amvalidate.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
attnum.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
brin.h Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
brin_internal.h Allow index AMs to cache data across aminsert calls within a SQL command. 2017-02-09 11:52:12 -05:00
brin_page.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
brin_pageops.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
brin_revmap.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
brin_tuple.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
brin_xlog.h Add WAL consistency checking facility. 2017-02-08 15:45:30 -05:00
bufmask.h Minor fixes for WAL consistency checking. 2017-02-14 12:41:01 -05:00
clog.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
commit_ts.h Fix race condition in reading commit timestamps 2017-01-19 18:24:17 -03:00
genam.h Allow index AMs to cache data across aminsert calls within a SQL command. 2017-02-09 11:52:12 -05:00
generic_xlog.h Add WAL consistency checking facility. 2017-02-08 15:45:30 -05:00
gin.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
gin_private.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
ginblock.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
ginxlog.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
gist.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
gist_private.h Allow index AMs to return either HeapTuple or IndexTuple format during IOS. 2017-02-27 17:20:34 -05:00
gistscan.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
gistxlog.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
hash.h hash: Refactor overflow page allocation. 2017-02-27 22:59:55 +05:30
hash_xlog.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
heapam.h Fix interaction of partitioned tables with BulkInsertState. 2017-01-24 08:50:16 -05:00
heapam_xlog.h Add WAL consistency checking facility. 2017-02-08 15:45:30 -05:00
hio.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
htup.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
htup_details.h Change some test macros to return true booleans 2017-01-18 18:06:13 -03:00
itup.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
multixact.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
nbtree.h btree: Support parallel index scans. 2017-02-15 07:41:14 -05:00
nbtxlog.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
parallel.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
printsimple.h Add a new DestReceiver for printing tuples without catalog access. 2017-01-24 16:53:56 -05:00
printtup.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
reloptions.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
relscan.h Allow index AMs to return either HeapTuple or IndexTuple format during IOS. 2017-02-27 17:20:34 -05:00
rewriteheap.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
rmgr.h Add WAL consistency checking facility. 2017-02-08 15:45:30 -05:00
rmgrlist.h Add WAL consistency checking facility. 2017-02-08 15:45:30 -05:00
sdir.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
skey.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
slru.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
spgist.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
spgist_private.h Allow index AMs to return either HeapTuple or IndexTuple format during IOS. 2017-02-27 17:20:34 -05:00
spgxlog.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
stratnum.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
subtrans.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
sysattr.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
timeline.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
transam.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
tsmapi.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
tupconvert.h Fix ALTER TABLE / SET TYPE for irregular inheritance 2017-01-09 19:26:58 -03:00
tupdesc.h Add a SHOW command to the replication command language. 2017-01-24 17:04:12 -05:00
tupmacs.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
tuptoaster.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
twophase.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
twophase_rmgr.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
valid.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
visibilitymap.h Fix typos in comments. 2017-02-06 11:33:58 +02:00
xact.h Fix typos in comments. 2017-02-06 11:33:58 +02:00
xlog.h Support SCRAM-SHA-256 authentication (RFC 5802 and 7677). 2017-03-07 14:25:40 +02:00
xlog_internal.h Rename user-facing tools with "xlog" in the name to say "wal". 2017-02-09 16:23:46 -05:00
xlogdefs.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
xloginsert.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
xlogreader.h Add WAL consistency checking facility. 2017-02-08 15:45:30 -05:00
xlogrecord.h Add WAL consistency checking facility. 2017-02-08 15:45:30 -05:00
xlogutils.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00