pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Joshua D. Drake <jd@commandprompt.com>
Cc: Trevor Talbot <quension@gmail.com>
Cc: Roberts, Jon <Jon.Roberts@asurion.com>
Cc: Kris Jurka <books@ejurka.com>
Cc: Jonah H. Harris <jonah.harris@gmail.com>
Cc: Bill Moran <wmoran@collaborativefusion.com>
Cc: pgsql performance <pgsql-performance@postgresql.org>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Subject: Re: function body actors (was: viewing source code)
Date: Fri, 21 Dec 2007 15:39:53 +0100
Message-ID: <162867790712210639v44a5e4f6y4640f20fbc02126d@mail.gmail.com> (raw)
In-Reply-To: <b42b73150712210613s1cc85c76p47e6a4bb36257fbe@mail.gmail.com>
References: <b42b73150712202109u26d05d01q4f1b8be8d29f763c@mail.gmail.com>
	<26811.1198215605@sss.pgh.pa.us>
	<b42b73150712202306v58b9f301kbea90bf8e150ddfc@mail.gmail.com>
	<162867790712210018m68117783y791da209a4a97448@mail.gmail.com>
	<b42b73150712210613s1cc85c76p47e6a4bb36257fbe@mail.gmail.com>

On 21/12/2007, Merlin Moncure <mmoncure@gmail.com> wrote:
> On Dec 21, 2007 3:18 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> > I have similar patch and it works. There is two isues:
> >
> > * we missing column in pg_proc about state (not all procedures are
> > obfuscated), I solved it for plpgsl with using probin.
>
> I was hoping to avoid making any catalog or other changes to support
> encryption specifically.  Maybe your patch stands on its own
> merits...I missed the original discussion.  Do you think the code you
> wrote can be adapted to do other things besides encryption?
>

I don't know. It was fast hack that just works. It hat to do
obfuscation, and it do it well.

> > * decrypt is expensive on language handler level. Every session have
> > to do it again and again, better decrypt in system cache or somewhere
> > there.
>
> Doesn't bother me in the least...and caching unencrypted data is
> scary.  Also, aes256 is pretty fast for what it gives you and function
> bodies are normally short.  The real issue as I see it is where to
> keep the key.  How did you handle that?
>
> merlin
>

Simply. I use for password some random plpgsql message text and
compile it. I though  about GUC, and about storing password in
postgresql.conf. It's equal to protection level. We cannot protect
code on 100%. If you have admin or superuser account and if you know
some internal, you can simply get code.

http://blog.pgsql.cz/index.php?/archives/10-Obfuscator-PLpgSQL-procedur.html#extended

sorry for czech desc

Pavel



view thread (8+ messages)  latest in thread

Message-ID: <162867790712210639v44a5e4f6y4640f20fbc02126d@mail.gmail.com>
Permalink:  ../162867790712210639v44a5e4f6y4640f20fbc02126d@mail.gmail.com/
Also on:    postgresql.org/message-id/162867790712210639v44a5e4f6y4640f20fbc02126d@mail.gmail.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: pavel.stehule@gmail.com, mmoncure@gmail.com, tgl@sss.pgh.pa.us, alvherre@commandprompt.com, jd@commandprompt.com, quension@gmail.com, Jon.Roberts@asurion.com, books@ejurka.com, jonah.harris@gmail.com, wmoran@collaborativefusion.com, pgsql-hackers@postgresql.org
  Subject: Re: function body actors (was: viewing source code)
  In-Reply-To: <162867790712210639v44a5e4f6y4640f20fbc02126d@mail.gmail.com>

* 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