Re: Obfuscated stored procedures (was Re: Oracle and Postgresql)

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: glynastill(at)yahoo(dot)co(dot)uk
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Bill Moran" <wmoran(at)collaborativefusion(dot)com>, "David Fetter" <david(at)fetter(dot)org>, "Greg Smith" <gsmith(at)gregsmith(dot)com>, "Jonathan Bond-Caron" <jbondc(at)openmv(dot)com>, "Postgres General List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Obfuscated stored procedures (was Re: Oracle and Postgresql)
Date: 2008-09-16 13:31:24
Message-ID: b42b73150809160631yf272c25oc7f93453e2469d48@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-www

On Tue, Sep 16, 2008 at 9:15 AM, Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk> wrote:
>
> As much as I'm impressed with the "we do it properly or not at all" attitude, it'd be nice if there was an option to stop the casual user from viewing code.
>
> I'll admit to obfusicating bits and pieces using C, even though the function and everything it acts on are tied down with permissions. I understand in reality it provides no real extra security but somehow users being able to easily view something they don't have access to execute beyond it's name just feels wrong.

This is one of those threads that reappears like magic every six
months or so. The last round of discussion went longer than normal
including a couple of routes to implementation.

One big reason why nothing hasn't been done is that there is a decent
'low tech' obfuscation tactic already: remove select access from
pg_proc to the user accounts in question and 'public'. This will
essentially disable casual browsing of procedure code from user
accounts.

Any real solution should focus on:
*) key management (any serious discussion with encryption starts here)
*) other things you can do with function source besides encryption

for example, take a look at one idea I had (not at all vetted, but a start):
http://archives.postgresql.org/pgsql-performance/2007-12/msg00337.php

merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Glyn Astill 2008-09-16 13:34:30 Re: Index order
Previous Message Tom Lane 2008-09-16 13:26:31 Re: Index order

Browse pgsql-www by date

  From Date Subject
Next Message Gregory Williamson 2008-09-16 13:38:35 Re: Obfuscated stored procedures (was Re: Oracle and Postgresql)
Previous Message Glyn Astill 2008-09-16 13:15:00 Re: Obfuscated stored procedures (was Re: Oracle and Postgresql)