Re: Encryption with customer provided key in a multi tenant Postgres JSONB DB - Mailing list pgsql-general

From David G. Johnston
Subject Re: Encryption with customer provided key in a multi tenant Postgres JSONB DB
Date
Msg-id CAKFQuwYuXtMJ=VZ-TNuCs4JoVexU5KLv5ccah_mPSNGO+7-QJQ@mail.gmail.com
Whole thread Raw
In response to Encryption with customer provided key in a multi tenant Postgres JSONB DB  (Saurav Sarkar <saurav.sarkar1@gmail.com>)
Responses Re: Encryption with customer provided key in a multi tenant Postgres JSONB DB
List pgsql-general
On Wed, Nov 11, 2020 at 10:49 PM Saurav Sarkar <saurav.sarkar1@gmail.com> wrote:

We have a multi tenant application where for each tenant we create separate tables . So for e.g. if i have 100 tenants then i have 100 tables.

Now we want to have encryption for the data in the tables with the tenant provided key. Is it possible to encrypt tables in the same database with different keys. ?

I learnt that PostgreSQL itself does not support encryption at database level or other finer granular levels . May i please know if in future can this be supported ? or is it not possible technically at all ?

So you answered your own question...though you can encrypt the data being stored within the table by supplying it pre-encrypted and letting the client deal with encryption and decryption - which is probably your best bet anyway.

Almost everything is possible if you throw enough time and effort at it so I'm not sure how to constructively answer the last two questions.  Why do you ask?

David J.

pgsql-general by date:

Previous
From: Saurav Sarkar
Date:
Subject: Encryption with customer provided key in a multi tenant Postgres JSONB DB
Next
From: Tatsuo Ishii
Date:
Subject: Re: Need to place pgpool logs on separate directory