From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@postgresql.org
Subject: pgsql: Remove support for password_encryption='off' / 'plain'.
Date: Mon, 08 May 2017 08:27:08 +0000
Message-ID: <E1d7e0a-0006az-Bh@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Remove support for password_encryption='off' / 'plain'.
Storing passwords in plaintext hasn't been a good idea for a very long
time, if ever. Now seems like a good time to finally forbid it, since we're
messing with this in PostgreSQL 10 anyway.
Remove the CREATE/ALTER USER UNENCRYPTED PASSSWORD 'foo' syntax, since
storing passwords unencrypted is no longer supported. ENCRYPTED PASSWORD
'foo' is still accepted, but ENCRYPTED is now just a noise-word, it does
the same as just PASSWORD 'foo'.
Likewise, remove the --unencrypted option from createuser, but accept
--encrypted as a no-op for backward compatibility. AFAICS, --encrypted was
a no-op even before this patch, because createuser encrypted the password
before sending it to the server even if --encrypted was not specified. It
added the ENCRYPTED keyword to the SQL command, but since the password was
already in encrypted form, it didn't make any difference. The documentation
was not clear on whether that was intended or not, but it's moot now.
Also, while password_encryption='on' is still accepted as an alias for
'md5', it is now marked as hidden, so that it is not listed as an accepted
value in error hints, for example. That's not directly related to removing
'plain', but it seems better this way.
Reviewed by Michael Paquier
Discussion: https://www.postgresql.org/message-id/16e9b768-fd78-0b12-cfc1-7b6b7f238fde@iki.fi
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/eb61136dc75a76caef8460fa939244d8593100f2
Modified Files
--------------
contrib/passwordcheck/passwordcheck.c | 4 +-
doc/src/sgml/config.sgml | 18 +++--
doc/src/sgml/ref/alter_role.sgml | 6 +-
doc/src/sgml/ref/alter_user.sgml | 2 +-
doc/src/sgml/ref/create_group.sgml | 2 +-
doc/src/sgml/ref/create_role.sgml | 34 +++-----
doc/src/sgml/ref/create_user.sgml | 2 +-
doc/src/sgml/ref/createuser.sgml | 21 +----
src/backend/commands/user.c | 34 ++------
src/backend/libpq/auth-scram.c | 20 +----
src/backend/libpq/auth.c | 26 ++----
src/backend/libpq/crypt.c | 126 +++++++++---------------------
src/backend/parser/gram.y | 14 +++-
src/backend/utils/misc/guc.c | 10 +--
src/bin/psql/tab-complete.c | 25 ++----
src/bin/scripts/createuser.c | 46 ++++-------
src/include/libpq/crypt.h | 9 ++-
src/interfaces/libpq/fe-auth.c | 3 +-
src/test/authentication/t/001_password.pl | 10 +--
src/test/regress/expected/password.out | 59 +++++++-------
src/test/regress/sql/password.sql | 37 +++++----
21 files changed, 177 insertions(+), 331 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: Remove support for password_encryption='off' / 'plain'.
In-Reply-To: <E1d7e0a-0006az-Bh@gemulon.postgresql.org>
References: <E1d7e0a-0006az-Bh@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