From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@postgresql.org
Subject: pgsql: Change the on-disk format of SCRAM verifiers to conform to RFC 5
Date: Fri, 21 Apr 2017 19:54:42 +0000
Message-ID: <E1d1ede-0003vn-49@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Change the on-disk format of SCRAM verifiers to conform to RFC 5803.
It doesn't make any immediate difference to PostgreSQL, but might as well
follow the standard, since one exists. (I looked at RFC 5803 earlier, but
didn't fully understand it back then.)
The new format uses Base64 instead of hex to encode StoredKey and
ServerKey, which makes the verifiers slightly smaller. Using the same
encoding for the salt and the keys also means that you only need one
encoder/decoder instead of two. Although we have code in the backend to
do both, we are talking about teaching libpq how to create SCRAM verifiers
for PQencodePassword(), and libpq doesn't currently have any code for hex
encoding.
Bump catversion, because this renders any existing SCRAM verifiers in
pg_authid invalid.
Discussion: https://www.postgresql.org/message-id/351ba574-85ea-d9b8-9689-8c928dd0955d@iki.fi
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/68e61ee72eb6914f493f08be98363c2f980ee242
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 24 ++++--
src/backend/libpq/auth-scram.c | 142 +++++++++++++++++++++------------
src/backend/libpq/crypt.c | 2 +-
src/include/catalog/catversion.h | 2 +-
src/test/regress/expected/password.out | 14 ++--
src/test/regress/sql/password.sql | 8 +-
6 files changed, 119 insertions(+), 73 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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: heikki.linnakangas@iki.fi
Subject: Re: pgsql: Change the on-disk format of SCRAM verifiers to conform to RFC 5
In-Reply-To: <E1d1ede-0003vn-49@gemulon.postgresql.org>
References: <E1d1ede-0003vn-49@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