From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default permissisons from schemas |
Date: | 2007-01-23 20:22:47 |
Message-ID: | 4276.1169583767@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Stephen Frost <sfrost(at)snowman(dot)net> writes:
> * Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
>> Before discussing "limitations" you should first justify why we need any
>> such concept at all. It was no part of the original TODO item and I
>> cannot see any good use for it.
> There are permissions which are not grantable but exist as implicitly
> granted to the owner of object. These include drop, truncate, alter.
> Practically, I find myself having to change the owner of objects which I
> create almost as often as I'm defining the ACL for those objects. In
> many of our schemas all the objects should be owned by the same 'admin'
> role so that those who are in that role can perform the actions which
> are only available to object owners, much the same as those objects
> having a certain set of minimum ACLs.
I don't see any argument here for not creating the object as owned by
the creator -- as you note, SET ROLE is the way to cause something to be
owned by a role you have permission to become. The important difference
is that SET ROLE actually checks that you have that permission, whereas
a magical catalog entry saying "create objects as somebody else instead"
wouldn't. Maybe you could make it do so, but that would just be a
surprising behavior IMHO; and surprising security-related behaviors are
seldom a good idea.
BTW, I believe a schema owner can DROP any contained object whether he
owns it or not; without that the owner's ability to DROP the schema
would of course be worthless...
> I had thought it was going to be possible to set up roles/permissions
> such that a newly created object would be owned by the role through
> which the CREATE permission is given but that doesn't seem to be the
> case (or perhaps I'm doing something wrong with it).
Hm, I have some vague recollection that we considered that and rejected
it. Probably because it's ill-defined: what if there is more than one
path through which you've been granted CREATE permission?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Kaltenbrunner | 2007-01-23 20:38:04 | Re: "tupdesc reference is not owned by resource owner Portal" |
Previous Message | Brian Hurt | 2007-01-23 20:20:44 | Re: tripping an assert in 8.1.6 (more info) |