Re: Proposed patch for key managment

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Alastair Turner <minion(at)decodable(dot)me>, Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>
Subject: Re: Proposed patch for key managment
Date: 2020-12-31 10:31:48
Message-ID: alpine.DEB.2.22.394.2012311121300.3573723@pseudo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello,

>> The API to fetch the KEK doesn't care at all about where it's stored or
>> how it's derived or anything like that. There's a relatively small
>> change which could be made to have PG request all of the keys that it'll
>> need on startup, if we want to go there as has been suggested elsewhere,
>> but even if we do that, PG needs to be able to do that itself too,
>> otherwise it's not a complete capability and there seems little point in
>> doing something that's just a pass-thru to something else and isn't able
>> to really be used.
>
> Right now, the script returns a cluster key (KEK), and during initdb the
> server generates data encryption keys and wraps them with the KEK.
> During server start, the server validates the KEK and decrypts the data
> keys. pg_alterckey allows changing the KEK.
>
> I think Fabien is saying this all should _only_ be done using external
> tools --- that's what I don't agree with.

Yep.

I could compromise on "could be done using an external tool", but that
requires designing the API and thinking about where and how things are
done before everything is hardwired. Designing afterwards is too late.
ISTM that the current patch does not separate API design and cryptographic
design, so both are deeply entwined, and would be difficult to
disentangle.

--
Fabien.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2020-12-31 11:05:02 Re: Dependency isn't created between extension and schema
Previous Message Fabien COELHO 2020-12-31 10:21:12 Re: Proposed patch for key managment