Re: privileges oddity

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: privileges oddity
Date: 2020-08-07 19:08:00
Message-ID: 99994f76-5a45-09a1-c6e3-4021cb4bd385@aklaver.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/7/20 11:56 AM, Scott Ribe wrote:
>> On Aug 7, 2020, at 12:45 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>
>> If I'm reading this correctly, you have set things up so that any
>> session logging in as akanzler will immediately do "SET ROLE
>> confidential_read_only", after which it's the privileges of that
>> role not akanzler that determine what happens.
>
> YES, confidential_read_only has privs on everything *except* individual user's schemas, and rolinherit was accidentally set, that would certainly seem to be the problem. But I turned that off, and it still doesn't work--even in a new connection.
>

https://stream.boxwatch.ru/docs/12/sql-set-role.html

"Using this command, it is possible to either add privileges or restrict
one's privileges. If the session user role has the INHERIT attribute,
then it automatically has all the privileges of every role that it could
SET ROLE to; in this case SET ROLE effectively drops all the privileges
assigned directly to the session user and to the other roles it is a
member of, leaving only the privileges available to the named role. On
the other hand, if the session user role has the NOINHERIT attribute,
SET ROLE drops the privileges assigned directly to the session user and
instead acquires the privileges available to the named role.
"

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Ribe 2020-08-07 19:27:26 Re: privileges oddity
Previous Message Scott Ribe 2020-08-07 18:56:06 Re: privileges oddity