pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Merlin Moncure <mmoncure@gmail.com>
To: A.M. <agentm@themactionfaction.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: viewing source code
Date: Thu, 20 Dec 2007 13:03:54 -0500
Message-ID: <b42b73150712201003s69b22a35o37868385c4a4f55c@mail.gmail.com> (raw)
In-Reply-To: <5ACACAC2-7171-411A-9DE0-F53FCE98EDBA@themactionfaction.com>
References: <1A6E6D554222284AB25ABE3229A92762112A49@nrtexcus702.int.asurion.com>
	<5ACACAC2-7171-411A-9DE0-F53FCE98EDBA@themactionfaction.com>

On Dec 20, 2007 12:39 PM, A.M. <agentm@themactionfaction.com> wrote:
> On Dec 20, 2007, at 11:30 AM, Roberts, Jon wrote:
> >> On Dec 20, 2007 9:07 AM, Roberts, Jon <Jon.Roberts@asurion.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.
>
> Does everyone in your organization have login access to your
> database? That seems like the main issue. Perhaps you should stick an
> application server in between. The application server could also
> upload functions from the "Finance group" and ensure that no one can
> see stored procedures.

forcing all database access through an app server is a (too) high
price to pay in many scenarios.  while it works great for some things
(web apps), in many companies the db is the 'brain' of the company
that must serve all kinds of different purposes across many
interfaces.

for example, ups provides software that communicates with databases
over odbc for purposes to apply tracking #s to parts.  think about all
the report engines, etc etc that run over those type of interfaces.

merlin



view thread (60+ messages)  latest in thread

Message-ID: <b42b73150712201003s69b22a35o37868385c4a4f55c@mail.gmail.com>
Permalink:  ../b42b73150712201003s69b22a35o37868385c4a4f55c@mail.gmail.com/
Also on:    postgresql.org/message-id/b42b73150712201003s69b22a35o37868385c4a4f55c@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 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-performance@postgresql.org
  Cc: mmoncure@gmail.com, agentm@themactionfaction.com
  Subject: Re: viewing source code
  In-Reply-To: <b42b73150712201003s69b22a35o37868385c4a4f55c@mail.gmail.com>
  References: <1A6E6D554222284AB25ABE3229A92762112A49@nrtexcus702.int.asurion.com> <5ACACAC2-7171-411A-9DE0-F53FCE98EDBA@themactionfaction.com> <b42b73150712201003s69b22a35o37868385c4a4f55c@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