Re: SECURITY DEFINER not being propagated...

From: Sean Chittenden <sean(at)chittenden(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: SECURITY DEFINER not being propagated...
Date: 2004-04-28 21:46:58
Message-ID: 934421CF-995D-11D8-AA60-000A95C705DC@chittenden.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

>> This one's simple enough to reproduce (see SQL script below), but,
>> there are some comments in src/backend/catalog/namespace.c that seem
>> questionable and incorrect:
>
> The proposed patch reverts a change deliberately applied in namespace.c
> rev 1.15 (4/29/02). I think you need to go back and consult the schema
> privilege discussions that occurred just before that; I'm much too
> tired
> to do so myself right at the moment ...

I can see that it was done in rev 1.15, but I haven't seen any
discussion that suggests that it was deliberate beyond what's in the
comment... but that's lacking rationale, IMHO. The thread that I think
you're referring to begins here:

http://archives.postgresql.org/pgsql-hackers/2002-04/msg01035.php

But here's pretty much the only relevant thread:

http://archives.postgresql.org/pgsql-hackers/2002-04/msg01191.php

But it doesn't have a conclusion, synopsis, or any agreement that comes
close to, "here's why we check the perms for the session user and not
the current user." Having the permissions for CREATE TEMP TABLE check
on the session user defeats the purpose of having functions run as
SECURITY DEFINER.

Without any rationale as to why CREATE TEMP TABLEs checks the session
user in the archives, could we open this up for discussion again? To
me, it seems to fly directly in the face of a function running as
SECURITY DEFINER. At the moment, this behavior cripples the usefulness
of having a TEMP table be used as a trusted cache for data.

-sc

--
Sean Chittenden

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-04-29 04:03:40 Re: SECURITY DEFINER not being propagated...
Previous Message Andrew Dunstan 2004-04-28 17:04:27 Re: Dollar quoting docs, round 1