Re: Possible regression setting GUCs on \connect - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Possible regression setting GUCs on \connect
Date
Msg-id 20230427221443.GA1987000@nathanxps13
Whole thread Raw
In response to Re: Possible regression setting GUCs on \connect  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Possible regression setting GUCs on \connect
List pgsql-hackers
On Thu, Apr 27, 2023 at 03:22:04PM -0400, Tom Lane wrote:
> The right way to do this was not to add some
> poorly-explained option to ALTER ROLE, but to record the role OID that
> issued the ALTER ROLE, and then to check when loading the ALTER ROLE
> setting whether that role (still) has the right to change the
> specified setting.  As implemented, this can't possibly track changes
> in GRANT/REVOKE SET privileges correctly, and I wonder if it's not
> introducing outright security holes like the one fixed by 13d838815.

I generally agree.  At least, I think it would be nice to avoid adding a
new option if possible.  It's not clear to me why we'd need to also check
privileges at login time as opposed to only checking them at ALTER ROLE SET
time.  ISTM that the former approach would introduce some interesting
problems around dropping roles or changing roles' privileges.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Melanie Plageman
Date:
Subject: Re: pg_stat_io for the startup process
Next
From: Andres Freund
Date:
Subject: Re: issue with meson builds on msys2