pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add pg_alterckey utility to change the cluster key
Date: Sun, 27 Dec 2020 10:11:17 +0900
Message-ID: <X+ffNR3fahsEogYb@paquier.xyz> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2012260543130.2006135@pseudo>
References: <E1ksyKP-000471-AI@gemulon.postgresql.org>
	<1252111.1608953815@sss.pgh.pa.us>
	<X+ay5orW8bgwWqI1@paquier.xyz>
	<alpine.DEB.2.22.394.2012260543130.2006135@pseudo>

On Sat, Dec 26, 2020 at 06:03:00AM -0400, Fabien COELHO wrote:
> The feeling I expressed early in the thread is that the design should be
> extendable, so that it does not fit only one particular use-case but fail at
> any other that were not the author's, and a large reimplementation would be
> needed to get them in. I was thinking of having a closer look with that in
> mind. In particular and IMHO, the "master key" should not (necessarily) be
> hold by a postgres process, not sure what the current status is, but that is
> an example.

Hmm.  That sounds like a fair concern to me.  Based on the information
given by the docs, three keys are actually created/used at initdb
time:
- One for the relation files, that does not have to be shared across
the nodes in the cluster.
- One for the WAL files, that has to be shared across the nodes of the
cluster or no physical replication could happen.
- One to encrypt the first two ones.

The first two keys are stored in pg_cryptokeys/ in the data directory,
while the third one is retrieved using a GUC for validation at server
startup for the other two.  Do we necessarily have to store the first
level keys within the data directory?  I guess that this choice has
been made for performance, but is that really something that a user
would want all the time?  AES256 is the only option available for the
data keys.  What if somebody wants to roll in their own encryption?
Companies can have many requirements in terms of accepting the use of
one option or another.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (25+ messages)  latest in thread

Message-ID: <X+ffNR3fahsEogYb@paquier.xyz>
Permalink:  ../X+ffNR3fahsEogYb@paquier.xyz/
Also on:    postgresql.org/message-id/X+ffNR3fahsEogYb@paquier.xyz

 · 

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: michael@paquier.xyz, coelho@cri.ensmp.fr, bruce@momjian.us, tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Add pg_alterckey utility to change the cluster key
  In-Reply-To: <X+ffNR3fahsEogYb@paquier.xyz>
  References: <E1ksyKP-000471-AI@gemulon.postgresql.org> <1252111.1608953815@sss.pgh.pa.us> <X+ay5orW8bgwWqI1@paquier.xyz> <alpine.DEB.2.22.394.2012260543130.2006135@pseudo> <X+ffNR3fahsEogYb@paquier.xyz>

* 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