Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kowvj-0006rT-9k for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Dec 2020 23:06:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kowv9-0003I9-KZ for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Dec 2020 23:06:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kowv9-0003I1-E4 for pgsql-hackers@lists.postgresql.org; Mon, 14 Dec 2020 23:06:23 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kowv2-00018R-Sj for pgsql-hackers@postgresql.org; Mon, 14 Dec 2020 23:06:22 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1kowv1-0008JW-PP; Mon, 14 Dec 2020 18:06:15 -0500 Date: Mon, 14 Dec 2020 18:06:15 -0500 From: Bruce Momjian To: PostgreSQL-development Cc: Masahiko Sawada Subject: Re: Proposed patch for key managment Message-ID: <20201214230615.GA14596@momjian.us> References: <20201202213814.GG20285@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201202213814.GG20285@momjian.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Dec 2, 2020 at 04:38:14PM -0500, Bruce Momjian wrote: > Attached is a patch for key management, which will eventually be part of > cluster file encryption (CFE), called TDE (Transparent Data Encryption) > by Oracle. It is an update of Masahiko Sawada's patch from July 31: > > https://www.postgresql.org/message-id/CA+fd4k6RJwNvZTro3q2f5HSDd8HgyUc4CuY9U3e6Ran4C6TO4g@mail.gmail.com > > Sawada-san did all the hard work, and I just redirected the patch. The > general outline of this CFE feature can be seen here: > > https://wiki.postgresql.org/wiki/Transparent_Data_Encryption > > The currently planned progression for this feature is to allow secure > retrieval of key encryption keys (KEK) outside of the database, then use > those to encrypt data keys that encrypt heap/index/tmpfile files. ... > If most people approve of this general approach, and the design > decisions made, I would like to apply this in the next few weeks, but > this brings complications. The syntax added by this commit might not > provide a useful feature until PG 15, so how do we hide it from users. > I was thinking of not applying the doc changes (or commenting them out) > and commenting out the --help output. I am getting close to applying these patches, probably this week. The patches are cumulative: https://github.com/postgres/postgres/compare/master...bmomjian:key.diff https://github.com/bmomjian/postgres/compare/key...bmomjian:key-alter.diff I do have a few questions: Why is KmgrShmemData a struct, when it only has a single member? Are all shared memory areas structs? Should pg_altercpass be using fsync's for directory renames? Can anyone test this on Windows, particularly -R handling? What testing infrastructure should this have? There are a few shell script I should include to show how to create commands. Where should they be stored? /contrib module? Are people okay with having the feature enabled, but invisible since the docs and --help output are missing? When we enable ssl_passphrase_command to prompt from the terminal, some of the command-line options will be useful. Do people like the command-letter choices? I called the alter passphrase utility pg_altercpass. I could have called it pg_clusterpass, but I wanted to highlight it is only for changing the passphrase, not for creating them. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee