From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Allow SSL configuration to be updated at SIGHUP.
Date: Tue, 03 Jan 2017 02:37:35 +0000
Message-ID: <E1cOEyl-0003oZ-GJ@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Allow SSL configuration to be updated at SIGHUP.
It is no longer necessary to restart the server to enable, disable,
or reconfigure SSL. Instead, we just create a new SSL_CTX struct
(by re-reading all relevant files) whenever we get SIGHUP. Testing
shows that this is fast enough that it shouldn't be a problem.
In conjunction with that, downgrade the logic that complains about
pg_hba.conf "hostssl" lines when SSL isn't active: now that's just
a warning condition not an error.
An issue that still needs to be addressed is what shall we do with
passphrase-protected server keys? As this stands, the server would
demand the passphrase again on every SIGHUP, which is certainly
impractical. But the case was only barely supported before, so that
does not seem a sufficient reason to hold up committing this patch.
Andreas Karlsson, reviewed by Michael Banck and Michael Paquier
Discussion: https://postgr.es/m/556A6E8A.9030400@proxel.se
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/de41869b64d57160f58852eab20a27f248188135
Modified Files
--------------
doc/src/sgml/client-auth.sgml | 4 +-
doc/src/sgml/config.sgml | 84 ++++---
doc/src/sgml/runtime.sgml | 19 +-
src/backend/libpq/auth.c | 22 +-
src/backend/libpq/be-secure-openssl.c | 315 +++++++++++++++++---------
src/backend/libpq/be-secure.c | 23 +-
src/backend/libpq/hba.c | 29 +--
src/backend/postmaster/postmaster.c | 45 +++-
src/backend/utils/misc/guc.c | 18 +-
src/backend/utils/misc/postgresql.conf.sample | 15 +-
src/include/libpq/libpq-be.h | 3 +-
src/include/libpq/libpq.h | 2 +-
src/test/ssl/ServerSetup.pm | 58 +++--
13 files changed, 400 insertions(+), 237 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: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Allow SSL configuration to be updated at SIGHUP.
In-Reply-To: <E1cOEyl-0003oZ-GJ@gemulon.postgresql.org>
References: <E1cOEyl-0003oZ-GJ@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