Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tso7C-005jq1-1y for pgsql-general@arkaria.postgresql.org; Thu, 13 Mar 2025 19:21:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tso7A-003hAU-FG for pgsql-general@arkaria.postgresql.org; Thu, 13 Mar 2025 19:21:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tso3m-003ZsH-LI for pgsql-general@lists.postgresql.org; Thu, 13 Mar 2025 19:17:38 +0000 Received: from mail-il1-x131.google.com ([2607:f8b0:4864:20::131]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tso3k-002f99-1U for pgsql-general@lists.postgresql.org; Thu, 13 Mar 2025 19:17:37 +0000 Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-3d4469b35e4so9411685ab.1 for ; Thu, 13 Mar 2025 12:17:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741893456; x=1742498256; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qyGt6Nbl4NsqfmHyh44QDojuIr/YfVkybPM4zk5ISoU=; b=kU1hKASqbInZnH4WPj5QyN99z2YCsKtqd/64RZo1JmfpffYmdiU/UArSPPv0V63oPX qTOuWjHsJqYROdukMwqIF7GC67/TnYlEKiMgcyhL5pgnJjbqiP9KXwNDHxCb8Mclh1r7 zBpMpMgaj5kSlAnHeAuLtECETpOL20OUEr39+3p3jRqpzwRbICiyN7AkiFED8ipGOhye NWYiusa0Jtqc7qhIzKtnqzJhGBq3ANxbQOvVsLG2Rt2WpdN+j5O8rxuWxRWhck0o6Sew O0pKN4RZ2dq87PQxJHylUgAYpNBGV2ghUJacf2JKuTi/PF3+ekuO+GI929xl197ZINPi ZKJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741893456; x=1742498256; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qyGt6Nbl4NsqfmHyh44QDojuIr/YfVkybPM4zk5ISoU=; b=tCgqFxSx4AcOzVBxZVFTCkfznkKTrz/BC/iqtQtxQ2+wPBn5/hMbrOaMDNkQD/t6wf 2gfgmVC6kRqnUXk2q9e9fSEzLcKjflcnqAj2tVQca1/zOma8RIqg5xp2cqb+3+W4YSNH FR4ZHG+861OPwZ5S+lMkvEq24hPS9UfPZgKI3Lt5XMSXfVtdE/8CzZpvY8qXgDvja93P DabVmtwFXFCnO93Ff5zxr3qnQrnY/0oTTo23LE4onfGq0tmG31nvRtbICAzqMaH/P52Y JjF7q8SoXbanEtsnGbVFenLDo1g4zuLaXUPx0zmVuSXZVIN3PK8dD0HY2+cGlHIs0tec zvrA== X-Gm-Message-State: AOJu0Yxfglbjm/KW+aF2MUtmdWyWyMZIw9Qn8rxgUENVt8eQMX0WGTk0 A3bQJPgTHQWPDdyvNVCmzsuD8XYLLDhg4E+nfQAAOEBZw4+uEtJLpkIfXsdRwgIVkIhu/F6wcYI QBQEMkdp4/tlSR9Cf7lhxgGFCnns= X-Gm-Gg: ASbGnctjtjPaMCgIckhWTeLmlI9t0NH2L5cm+/H4jIKUZ8g2hM/sNK1fIs3LfjVEe15 Vnya7VoGAdF091g+UG6dJ1UiJLnqqNriOZyGMBEaikq0VivOKbkLwgyYQY0QTGh1dyT4KUcWqpg bHV6B2Kgd/WGVWKxZ4UELj7VLRugdYLO7Q8iSHJe2VuRnKOiYuTOdyntEUVlHpmRfs/S6JYpU= X-Google-Smtp-Source: AGHT+IGPuA6Z7N6dtIt2Ewskn7xCEX+E7yTVJlsagBsk05BARsI3iZigGYJUexgrS2WcOFMLSW8gAXm667kNuyqf1nk= X-Received: by 2002:a05:6e02:481:b0:3d4:6dcf:d8f5 with SMTP id e9e14a558f8ab-3d46dcfe600mr83913345ab.1.1741893455635; Thu, 13 Mar 2025 12:17:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Greg Sabino Mullane Date: Thu, 13 Mar 2025 15:17:00 -0400 X-Gm-Features: AQ5f1Jpv-3LOXmi0aYKtTe2tHgrVD89snbCco3gIZ7LUi9nsBJMvEG_VJvDNQqU Message-ID: Subject: Re: hide data from admins To: Siraj G Cc: pgsql-general@lists.postgresql.org, Ron Johnson Content-Type: multipart/alternative; boundary="000000000000a8f0e506303e2cfd" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000a8f0e506303e2cfd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Mar 11, 2025 at 9:48=E2=80=AFPM Siraj G 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 --000000000000a8f0e506303e2cfd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Mar 11, 2025 at 9:48=E2=80=AFPM S= iraj G <tosiraj.g@gmail.com&g= t; wrote:
What are the f= eatures available in Postgresql to hide PII (personal identifiable informat= ion) from the Admin team?

Can y= ou explain your threat model here, and who exactly the "Admin team&quo= t; is and what access they have? As a general rule of thumb, anyone with &q= uot;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 v= ery difficult thing to do.
=C2=A0
Like in Oracle we have data = vault

Nothing equivalent, other= than locking down the superuser account(s) and making sure people always c= onnect as some other account. You can exclude the superusers from logging i= n via pg_hba.conf (which can of course be edited). TDE (transparent data en= cryption) can help for some threats.
=C2=A0
and data redaction=

In addition the aforementioned= =C2=A0pg_sodium project, you can check out pg anonymizer:


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



https://www.postgresql.org/docs/current/sql-createfunction.html<= /div>


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

Cheers,
Greg

--
Enterprise Postgres Software Produc= ts & Tech Support

--000000000000a8f0e506303e2cfd--