pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Support channel binding 'tls-unique' in SCRAM
Date: Sat, 18 Nov 2017 15:52:59 +0000
Message-ID: <E1eG5QR-0001UU-4a@gemulon.postgresql.org> (raw)

Support channel binding 'tls-unique' in SCRAM

This is the basic feature set using OpenSSL to support the feature.  In
order to allow the frontend and the backend to fetch the sent and
expected TLS Finished messages, a PG-like API is added to be able to
make the interface pluggable for other SSL implementations.

This commit also adds a infrastructure to facilitate the addition of
future channel binding types as well as libpq parameters to control the
SASL mechanism names and channel binding names.  Those will be added by
upcoming commits.

Some tests are added to the SSL test suite to test SCRAM authentication
with channel binding.

Author: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9288d62bb4b6f302bf13bb2fed3783b61385f315

Modified Files
--------------
doc/src/sgml/protocol.sgml               |  31 ++++--
src/backend/libpq/auth-scram.c           | 181 ++++++++++++++++++++++++++-----
src/backend/libpq/auth.c                 |  54 +++++++--
src/backend/libpq/be-secure-openssl.c    |  24 ++++
src/include/libpq/libpq-be.h             |   1 +
src/include/libpq/scram.h                |  10 +-
src/interfaces/libpq/fe-auth-scram.c     | 170 +++++++++++++++++++++++++----
src/interfaces/libpq/fe-auth.c           |  90 ++++++++++-----
src/interfaces/libpq/fe-auth.h           |   7 +-
src/interfaces/libpq/fe-secure-openssl.c |  27 +++++
src/interfaces/libpq/libpq-int.h         |   5 +-
src/test/ssl/ServerSetup.pm              |  27 +++--
src/test/ssl/t/001_ssltests.pl           |   2 +-
src/test/ssl/t/002_scram.pl              |  38 +++++++
14 files changed, 555 insertions(+), 112 deletions(-)



Message-ID: <E1eG5QR-0001UU-4a@gemulon.postgresql.org>
Permalink:  ../E1eG5QR-0001UU-4a@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eG5QR-0001UU-4a@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter_e@gmx.net
  Subject: Re: pgsql: Support channel binding 'tls-unique' in SCRAM
  In-Reply-To: <E1eG5QR-0001UU-4a@gemulon.postgresql.org>
  References: <E1eG5QR-0001UU-4a@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox