Re: [GENERAL] PG and database encryption - Mailing list pgsql-general

From Scott Marlowe
Subject Re: [GENERAL] PG and database encryption
Date
Msg-id CAOR=d=2TD+_cTezH-t9mOnEaCO=n3RTbUQ-MaLLuox3oK3tonQ@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] PG and database encryption  (PT <wmoran@potentialtech.com>)
List pgsql-general
On Tue, Aug 22, 2017 at 3:13 PM, PT <wmoran@potentialtech.com> wrote:
> On Tue, 22 Aug 2017 12:48:13 -0700 (MST)
> rakeshkumar464 <rakeshkumar464@outlook.com> wrote:
>
>> We have a requirement to encrypt the entire database.  What is the best tool
>> to accomplish this. Our primary goal is that it should be transparent to the
>> application, with no change in the application, as compared to un-encrypted
>> database. Reading about pgcrypto module, it seems it is good for few columns
>> only and using it to encrypt entire database is not a good use-case.
>>
>> Is this which can be done best by file level encryption?  What are the good
>> tools on Linux (RHES), preferably open-source.
>
> "encrypt the database" is bullshit wank terminology for "we're a government
> agency and don't know what we're talking about"
>
> On multiple occasions, I demonstrated that an unecrypted database was the
> least likely disclosure vector for sensative data, and that we shouldn't
> waste any time on it until we had ensured that all other breach vectors had
> been fixed.  Over the course of 4 years at that job, we never managed to get
> all the other (more likely) breach vectors secured.
>
> While it's possible that you've already fixed all other breach
> vectors, I'd be willing to bet actual money that you have not.
> The very fact that you ask for something that "is transparent to the
> application" tells me that you're not going to actually implement it
> effectively anyway.
>
> As a result, my opinion would be that you use filesystem encryption. It's
> very efficient, low management overhead, and proven technology that doesn't
> interfere with anything else you're doing. You can then check that box on
> whatever form you have to fill out and the beaurocrats will leave you alone.
> On top of that, it effectivley protects againts possible breach vectors that
> don't require changing the application.
>
> Real security will require changing the application. But take my word for it,
> nobody wants to hear the list of breach vectors that can only be fixed by
> modifying the application. Because people aren't interested in real security,
> they're just interested in checking boxes on a form.

This. Without a much stricter definition of the attack vectors you're
trying to defeat "encrypt the whole database" is a very hand-wavy
proposition. Are you protecting against people getting into the data
center and stealing your hard drives? Rogue applications getting
access to the db? Someone sniffing the passwords or unencrypting them
on the servers etc etc.

OP: It's just generic a requirement to take seriously. Sit down, come
up with possible attack vectors and possible ways to thwart them.
Security isn't something you do one time and you're done, it's a
constant process of design, review, updates, and education.


pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: [GENERAL] make postgresql 9.5 default on centos 7
Next
From: Jeff Janes
Date:
Subject: Re: [GENERAL] install the oracle data wrapper extension