pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Erik Aronesty <erik@q32.com>
Cc: pgsql-general@postgresql.org
Subject: Re: pgcrypto question
Date: Mon, 7 Oct 2019 21:49:51 +0200
Message-ID: <20191007194951.jxdmeiqobifx4ja4@development> (raw)
In-Reply-To: <CAJowKg+CX5wiQ2cPd1yq4BmHJY1bAs+XXiRkEFd_EyMzk3cQZg@mail.gmail.com>
References: <CAJowKgKYktmF2kJVeL2YRbC62+92tFgucCJ1HD4rM05ntFW30Q@mail.gmail.com>
	<20191007180842.j6jqgcirhsnbqp2x@development>
	<CAJowKg+CX5wiQ2cPd1yq4BmHJY1bAs+XXiRkEFd_EyMzk3cQZg@mail.gmail.com>

On Mon, Oct 07, 2019 at 02:51:30PM -0400, Erik Aronesty wrote:
>Good idea for "psycopg".  It would be easy for a POC, but I think the
>only meaningful layer to operate at would be a libpq drop-in
>replacement that intercepts PQgetvalue, PQprepare, PQexecParams,
>PQexecPrepared ... etc.   That way odbc, python, node, etc would "just
>work".... as long as you used LD_PRELOAD appropriately.
>

It's not clear to me how would that know which columns are encrypted,
with what key, etc. Because those encrypted columns are essentially just
regular bytea columns, so there's no easy way to distinguish them.

I'm no psycopg2 expert, but it does have some infrastructure for casting
PostgreSQL types to Python types, and I guess that could be used for the
encryption.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (5+ messages)  latest in thread

Message-ID: <20191007194951.jxdmeiqobifx4ja4@development>
Permalink:  ../20191007194951.jxdmeiqobifx4ja4@development/
Also on:    postgresql.org/message-id/20191007194951.jxdmeiqobifx4ja4@development

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com, erik@q32.com
  Subject: Re: pgcrypto question
  In-Reply-To: <20191007194951.jxdmeiqobifx4ja4@development>
  References: <CAJowKgKYktmF2kJVeL2YRbC62+92tFgucCJ1HD4rM05ntFW30Q@mail.gmail.com> <20191007180842.j6jqgcirhsnbqp2x@development> <CAJowKg+CX5wiQ2cPd1yq4BmHJY1bAs+XXiRkEFd_EyMzk3cQZg@mail.gmail.com> <20191007194951.jxdmeiqobifx4ja4@development>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox