Re: Additional role attributes && superuser review

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Adam Brightwell <adam(dot)brightwell(at)crunchydatasolutions(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Additional role attributes && superuser review
Date: 2015-03-16 21:01:43
Message-ID: 8730.1426539703@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:
>> That seems fairly ugly. Why would we need a new, duplicative function
>> here? (Apologies if the reasoning was spelled out upthread, I've not
>> been paying much attention.)

> Currently, those functions allow users to signal backends which are
> owned by them, which means they can be used by anyone. Simply
> REVOKE'ing access to them would remove that capability and an admin who
> then GRANT's access to the function would need to understand that
> they're allowing that user the ability to cancel/terminate any backends
> (except those initiated by superusers, at least if we keep that check as
> discussed upthread).

> If those functions just had simply superuser() checks that prevented
> anyone else from using them then this wouldn't be an issue.

> REVOKE'ing access *without* removing the permissions checks would defeat
> the intent of these changes, which is to allow an administrator to grant
> the ability for a certain set of users to cancel and/or terminate
> backends started by other users, without also granting those users
> superuser rights.

I see: we have two different use-cases and no way for GRANT/REVOKE
to manage both cases using permissions on a single object. Carry
on then.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2015-03-16 21:05:54 Re: get_object_address support for additional object types
Previous Message Dean Rasheed 2015-03-16 20:57:15 Re: Improving RLS qual pushdown