Subject: Re: Enquiry about TDE with PgSQL

From: Greg Sabino Mullane <[email-masked]>
Date: Fri, 17 Oct 2025 09:12:42 -0400

On Fri, Oct 17, 2025 at 12:49 AM Ron Johnson <[email-masked]>
wrote:

But filesystem encryption still means that validly logged-in users see the
> unencrypted data.  That's great for a laptop that might get stolen, or for
> drives that are discarded without being wiped, but are no protection
> against hackers who want to exfiltrate your data.

I stand by my recommendation. If someone is logged in and has access to
your data directory (e.g. is root or postgres user), then they also have
the TDE key or some easy way to bypass it.

TDE was added to SQL Server, with (to us, at least) minimally-noticed
> overhead.  Oracle has it, too, but I don't know the details.
> The bottom line is that requirements for TDE are escalating, whether you
> like it or not

I'm not arguing against putting TDE in Postgres - indeed, I am all for
that. But it's a very tricky thing to do technically, with minimal benefits
other than "checking the box" of some security requirements document.

The bottom line is that requirements for TDE are escalating, whether you
> like it or not, as Yet Another Layer Of Defense against hackers
> exfiltrating data, and then threatening to leak it to the public.
>

I'd love to see a real-world example where TDE would have saved someone but
disk encryption could not.

-- 
Cheers,
Greg

--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support

---

From: [email-masked]
Date: Fri, 17 Oct 2025 16:08:14 +0200

Am 2025-10-17 15:12, schrieb Greg Sabino Mullane:
> On Fri, Oct 17, 2025 at 12:49 AM Ron Johnson
> <[email-masked]> wrote:
> 
>> But filesystem encryption still means that validly logged-in users
>> see the unencrypted data.  That's great for a laptop that might get
>> stolen, or for drives that are discarded without being wiped, but
>> are no protection against hackers who want to exfiltrate your data.
> 
> I stand by my recommendation. If someone is logged in and has access
> to your data directory (e.g. is root or postgres user), then they also
> have the TDE key or some easy way to bypass it.
> 
>> TDE was added to SQL Server, with (to us, at least)
>> minimally-noticed overhead.  Oracle has it, too, but I don't know
>> the details.
>> The bottom line is that requirements for TDE are escalating, whether
>> you like it or not
> 
> that. But it's a very tricky thing to do technically, with minimal
> benefits other than "checking the box" of some security requirements
> document.
> 
>> The bottom line is that requirements for TDE are escalating, whether
>> you like it or not, as Yet Another Layer Of Defense against hackers
> I'd love to see a real-world example where TDE would have saved
> someone but disk encryption could not.

At least with Oracle and TDE, the rman backups are encrypted, too.
So, you cannot just download the dumps from a file-share and import them 
somewhere else (or if you get hold of the tapes, use those to restore 
the files).
It's not really about protecting the files from a hacker but from a 
person inside the organization who wants to sell the data.

TDE really only (IMHO) makes sense when you also have a HSM.

Now, I've seen a case where a customer had Oracle + Dataguard + TDE + 
HSM.

The thing is, you rarely interact with the HSM normally. So, it's 
getting a bit hazy in that department when you have to add a new 
secret...plus, while Oracle and the HSM vendor will happily license you 
the feature, they will happily point their fingers at each other in case 
a problem arrives.

In this case, the HSM was wiped clear of all the keys in there, in an 
attempt to add a new key.
Oracle closed the wallets and the database was offline.

Dang!

Now, you had fix figures worth of hardware doing exactly nothing.

Due to incredibly lucky circumstances, it was possible to recover the 
database without data loss.

So, with TDE, you really need to be sure you actually know what you're 
doing.