Re: Restrict permissions on schema to hide pl/pgsql code - Mailing list pgsql-admin

From Tom Lane
Subject Re: Restrict permissions on schema to hide pl/pgsql code
Date
Msg-id 30893.1563988539@sss.pgh.pa.us
Whole thread Raw
In response to Re: Restrict permissions on schema to hide pl/pgsql code  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Restrict permissions on schema to hide pl/pgsql code  (richard coleman <rcoleman.ascentgl@gmail.com>)
List pgsql-admin
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> You can consider this email to have accomplished both.  Lacking someone
> saying they they are working on it and pointing you to a patch you can
> safely operate under the assumption that this behavior isn’t going to
> change.

It isn't.  We've considered complaints like this before and determined
that we're not going to do anything about it.  For better or worse, the
PG catalogs are readable by any authorized user, with only narrow
exceptions (like password columns).

A sufficiently determined person could perhaps do something like creating
their own PL that stores encrypted function source text in pg_proc, and
just hands it off to an existing PL after decryption.  I'm not exactly
sure where you'd keep the decryption key though.

            regards, tom lane



pgsql-admin by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Restrict permissions on schema to hide pl/pgsql code
Next
From: richard coleman
Date:
Subject: Re: Restrict permissions on schema to hide pl/pgsql code