Re: viewing source code

From: "Roberts, Jon" <Jon(dot)Roberts(at)asurion(dot)com>
To: 'Merlin Moncure' <mmoncure(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Trevor Talbot <quension(at)gmail(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Kris Jurka <books(at)ejurka(dot)com>, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, Bill Moran <wmoran(at)collaborativefusion(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: viewing source code
Date: 2007-12-20 16:30:43
Message-ID: 1A6E6D554222284AB25ABE3229A92762112A49@nrtexcus702.int.asurion.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> -----Original Message-----
> From: Merlin Moncure [mailto:mmoncure(at)gmail(dot)com]
> Sent: Thursday, December 20, 2007 8:30 AM
> To: Roberts, Jon
> Cc: Alvaro Herrera; Trevor Talbot; Joshua D. Drake; Kris Jurka; Jonah H.
> Harris; Bill Moran; pgsql-performance(at)postgresql(dot)org
> Subject: Re: [PERFORM] viewing source code
>
> On Dec 20, 2007 9:07 AM, Roberts, Jon <Jon(dot)Roberts(at)asurion(dot)com> wrote:
> > So your suggestion is first to come up with a query that dynamically
> checks
> > permissions and create a view for it. Secondly, change pgAdmin to
> reference
> > this view in place of pg_proc. Actually, it should be extended to all
>
> This solution will not work. It requires cooperation from pgAdmin
> which is not going to happen and does nothing about psql or direct
> queries from within pgadmin. Considered from a security/obfuscation
> perspective, its completely ineffective. As I've said many times,
> there are only two solutions to this problem:
>
> 1. disable permissions to pg_proc and deal with the side effects
> (mainly, pgadmin being broken).
>
> 2. wrap procedure languages in encrypted handler (pl/pgsql_s) so that
> the procedure code is encrypted in pg_proc. this is an ideal
> solution, but the most work.
>

I think there is an option 3. Enhance the db to have this feature built in
which is more inline with commercial databases. This feature would drive
adoption of PostgreSQL. It isn't feasible in most companies to allow
everyone with access to the database to view all code written by anyone and
everyone.

For instance, you could have a Finance group writing functions to calculate
your financial earnings. These calculations could be changing frequently
and should only be visible to a small group of people. If the calculations
were visible by anyone with database access, they could figure out earnings
prior to the release and thus have inside information on the stock.

Jon

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Joshua D. Drake 2007-12-20 16:39:59 Re: viewing source code
Previous Message Anton Melser 2007-12-20 16:23:36 Re: Reinitialising stats once only without restarting