Re: pg_maintain and USAGE privilege on schema - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: pg_maintain and USAGE privilege on schema
Date
Msg-id 3f4c6e5ce54d8871ab915dc4f5c270a940f628d6.camel@j-davis.com
Whole thread Raw
In response to Re: pg_maintain and USAGE privilege on schema  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: pg_maintain and USAGE privilege on schema
List pgsql-hackers
On Wed, 2024-07-10 at 17:13 +0900, Fujii Masao wrote:
> ISTM that both
> pg_read_all_data and pg_write_all_data roles are defined similarly,
> with USAGE rights on all schemas.

I'm not so sure that was a great idea to begin with. If you create a
private schema with a SECURITY DEFINER function in it, it's a bit odd
to allow someone with pg_read_all_data to execute it. Granted, that's
documented behavior, but I'm not sure the privileges should be bundled
in that fashion.

> > It might be reasonable to give implicit USAGE privileges on all
> > schemas
> > during maintenance commands to pg_maintain roles.

That's an even more specific exception: having USAGE only in the
context of a maintenance command. I think that's a new concept, right?

Regards,
    Jeff Davis




pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Missed opportunity for bsearch() in TransactionIdIsCurrentTransactionId()?
Next
From: Dean Rasheed
Date:
Subject: Re: Simplifying width_bucket_numeric()