Re: crypting prosrc in pg_proc - Mailing list pgsql-hackers

From Sergiy Vyshnevetskiy
Subject Re: crypting prosrc in pg_proc
Date
Msg-id Pine.LNX.4.64.0708102253150.28860@uanet.vostok.net
Whole thread Raw
In response to Re: crypting prosrc in pg_proc  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
On Fri, 10 Aug 2007, Gregory Stark wrote:

> "Jonah H. Harris" <jonah.harris@gmail.com> writes:
>
>> Obfuscation doesn't really work, it just makes big wigs in companies
>> *think* it's not easily reversible.
>>
>> There is no real security.  With enough time and experience, anything
>> can be broken.
>
> But that said, I wonder if having something may be useful legally for some
> users.
>
> If someone just went and did "select * from pg_proc" they could claim they
> weren't violating their EULA or any protection you had put in place. If they
> went through the trouble having to de-obfuscate it then you would have a
> strong DMCA claim in the US.

We can split pg_proc into pg_procinfo and pg_procsrc.

pg_procinfo contains all information about function except source code and 
is readable to all.

pg_procsrc has the source and readable only to system and superusers.

pg_proc is a view that joins the two. If database developer wants to limit 
user access, they add conditions to the view as necessary, e.g.

proowner in ('postgres',current_user)

or whatever they want.


pgsql-hackers by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: Unexpected VACUUM FULL failure
Next
From: Andrew Dunstan
Date:
Subject: Re: change name of redirect_stderr?