Re: CREATEROLE and role ownership hierarchies - Mailing list pgsql-hackers

From Mark Dilger
Subject Re: CREATEROLE and role ownership hierarchies
Date
Msg-id 388E59DA-303D-4808-945D-43E9338912DD@enterprisedb.com
Whole thread Raw
In response to Re: CREATEROLE and role ownership hierarchies  (Mark Dilger <mark.dilger@enterprisedb.com>)
Responses Re: CREATEROLE and role ownership hierarchies  (Shinya Kato <Shinya11.Kato@oss.nttdata.com>)
Re: CREATEROLE and role ownership hierarchies  (Shinya Kato <Shinya11.Kato@oss.nttdata.com>)
List pgsql-hackers
>> On Oct 25, 2021, at 10:09 PM, Shinya Kato <Shinya11.Kato@oss.nttdata.com> wrote:

>> Hi! Thank you for the patch.
>> I too think that CREATEROLE escalation attack is problem.
>>
>> I have three comments.
>> 1. Is there a function to check the owner of a role, it would be nice to be able to check with \du or pg_roles view.
>
> No, but that is a good idea.

These two ideas are implemented in v2.  Both \du and pg_roles show the owner information.

> The current solution is to run REASSIGN OWNED in each database where the role owns objects before running DROP ROLE.
Atthat point, the CASCADE option (not implemented) won't be needed.  Of course, I need to post the next revision of
thispatch set addressing the deficiencies that Nathan pointed out upthread to make that work.  

REASSIGN OWNED and ALTER ROLE..OWNER TO now work in v2.



—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company




Attachment

pgsql-hackers by date:

Previous
From: Arjan van de Ven
Date:
Subject: Re: [PATCH v2] src/port/snprintf.c: Optimize the common base=10 case in fmtint
Next
From: Chapman Flack
Date:
Subject: Re: [PATCH v2] src/port/snprintf.c: Optimize the common base=10 case in fmtint