Re: Internal key management system

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Internal key management system
Дата
Msg-id CAGRY4nxotdT48u_i0WZ9YcfYsA6Zug6-4bUpw0Npy5hhWmTuwg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Internal key management system  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Internal key management system  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers


On Tue, 27 Oct 2020, 19:15 Bruce Momjian, <bruce@momjian.us> wrote:
We could implement a 'command:' prefix now, and maybe
a 'pass:' one, and allow other methods like 'pkcs11' later.

We don't need to do anything except provide a way to tell OpenSSL where to get the KEK from, for situations where having Pg generate it internally undesirable. 

I proposed a simple GUC that we could supply to OpenSSL as a key path because it's simple. It's definitely not best.

In my prior mail I outlined what I think is a better way. Abstract key key initialisation -  passphrase fetching KEK/HMAC loading and all of it - behind a pluggable interface. Looking at the patch, it's mostly there already. We just need a way to hook the key loading and setup so it can be overridden to use whatever method is required. Then KEK operations to encrypt and decrypt the heap and WAL keys happen via that abstraction.

That way Pg does not have to care about the details of hardware key management, PKCS#11 or OpenSSL engines, etc.

A little thought is needed to make key rotation work well. Especially when you want to switch from cluster passphrase to a plugin that supports use of a HVM escrowed key, or vice versa.

But most of what's needed looks like it's there already. It's just down to making sure the key loading and initialisation is overrideable.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: duplicate function oid symbols
Следующее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Re: Add important info about ANALYZE after create Functional Index