Re: [GENERAL] How to hide stored procedure's bodies from specific user

2015-02-14 Thread Berend Tober
Guillaume Lelarge wrote: 2015-02-14 14:07 GMT+01:00 Berend Tober mailto:bto...@broadstripe.net>>: Saimon Lim wrote: Thanks for your help I want to restrict some postgres users as much as possible and allow them to execute a few my own stored procedures only. C

Re: [GENERAL] How to hide stored procedure's bodies from specific user

2015-02-14 Thread Guillaume Lelarge
2015-02-14 14:07 GMT+01:00 Berend Tober : > Saimon Lim wrote: > >> Thanks for your help >> >> I want to restrict some postgres users as much as possible and allow >> them to execute a few my own stored procedures only. >> > > Create the function that you want restrict access to in a separate > 'pr

Re: [GENERAL] How to hide stored procedure's bodies from specific user

2015-02-14 Thread Berend Tober
Saimon Lim wrote: Thanks for your help I want to restrict some postgres users as much as possible and allow them to execute a few my own stored procedures only. Create the function that you want restrict access to in a separate 'private' schema to which usage is not granted. Create the func

Re: [GENERAL] How to hide stored procedure's bodies from specific user

2015-02-13 Thread Merlin Moncure
On Fri, Feb 13, 2015 at 5:17 AM, Saimon Lim wrote: > Thanks for your help > > I want to restrict some postgres users as much as possible and allow them to > execute a few my own stored procedures only. > > If I block access using: > > REVOKE ALL ON pg_catalog.pg_proc FROM PUBLIC; > REVOKE ALL ON F

Re: [GENERAL] How to hide stored procedure's bodies from specific user

2015-02-13 Thread Saimon Lim
Thanks for your help I want to restrict some postgres users as much as possible and allow them to execute a few my own stored procedures only. If I block access using: REVOKE ALL ON pg_catalog.pg_proc FROM PUBLIC; REVOKE ALL ON FUNCTION pg_catalog.pg_get_functiondef(oid) FROM PUBLIC; the user w

Re: [GENERAL] How to hide stored procedure's bodies from specific user

2015-02-12 Thread Alexey Bashtanov
Hello, Saimon, I propose the following (ugly) solution. -- /*as some privileged user: */ begin; create table hidden_function_foo as select $code$ create function pg_temp.foo(p_input text) returns text as $$ select /*nodoby knows we are using md5*/md5('the_salt_nobody_can_see'

Re: [GENERAL] How to hide stored procedure's bodies from specific user

2015-02-12 Thread Pavel Stehule
Hi It is currently impossible on unpatched postgres. I am selling a patch to postgres that does a obfuscation of procedure body Regards Pavel Stehule 2015-02-11 10:54 GMT+01:00 Saimon Lim : > Hi > I want to hide my own stored procedures' bodies from the specific user. > As far as I know, proc

Re: [GENERAL] How to hide stored procedure's bodies from specific user

2015-02-12 Thread John R Pierce
On 2/11/2015 1:54 AM, Saimon Lim wrote: I want to hide my own stored procedures' bodies from the specific user. As far as I know, procedure's body is visible in the pg_catalog.pg_proc table. only good way I know of to do that is to write the procedures in C so they are binary .so/.dll files.

Re: [GENERAL] How to hide stored procedure's bodies from specific user

2015-02-12 Thread Merlin Moncure
On Thu, Feb 12, 2015 at 2:53 AM, Saimon Lim wrote: > For clarification - I run the commands using psql program. > > 2015-02-11 12:54 GMT+03:00 Saimon Lim : >> >> Hi >> I want to hide my own stored procedures' bodies from the specific user. >> As far as I know, procedure's body is visible in the pg

Re: [GENERAL] How to hide stored procedure's bodies from specific user

2015-02-12 Thread Saimon Lim
For clarification - I run the commands using psql program. 2015-02-11 12:54 GMT+03:00 Saimon Lim : > Hi > I want to hide my own stored procedures' bodies from the specific user. > As far as I know, procedure's body is visible in the pg_catalog.pg_proc > table. > > So, I did the following: > REVOK