Re: hide data from admins

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: Siraj G <tosiraj(dot)g(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org, Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Subject: Re: hide data from admins
Date: 2025-03-13 19:17:00
Message-ID: CAKAnmmJVZOmX8Cjq+xPZd0k9YbXO=TRn78cV0iny7EpbEQefpg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Mar 11, 2025 at 9:48 PM Siraj G <tosiraj(dot)g(at)gmail(dot)com> wrote:

> What are the features available in Postgresql to hide PII (personal
> identifiable information) from the Admin team?
>

Can you explain your threat model here, and who exactly the "Admin team" is
and what access they have? As a general rule of thumb, anyone with "root"
command-line access to the server can get at your data. You can introduce
some speed bumps (e.g. TDE), but truly locking it down is a very difficult
thing to do.

> Like in Oracle we have data vault
>

Nothing equivalent, other than locking down the superuser account(s) and
making sure people always connect as some other account. You can exclude
the superusers from logging in via pg_hba.conf (which can of course be
edited). TDE (transparent data encryption) can help for some threats.

> and data redaction
>

In addition the aforementioned pg_sodium project, you can check out pg
anonymizer:

https://postgresql-anonymizer.readthedocs.io/en/latest/

As far as restricting/masking data, take a look at row-level security,
creative use of views, forcing access through user-defined functions, and
column-level permissions:

https://www.postgresql.org/docs/current/ddl-rowsecurity.html

https://www.postgresql.org/docs/current/sql-createview.html

https://www.postgresql.org/docs/current/sql-createfunction.html

https://www.postgresql.org/docs/current/sql-grant.html

Honestly the best and easiest solution is to keep your servers secure, use
OS-level encryption, and encrypt your backups.

Cheers,
Greg

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2025-03-13 19:17:23 Re: Query optimization
Previous Message Durgamahesh Manne 2025-03-13 19:12:36 Query optimization