From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Noah Misch <noah@leadboat.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: pgsql: Revoke PUBLIC CREATE from public schema, now owned by pg_databas
Date: Thu, 01 Dec 2022 09:24:43 -0500
Message-ID: <1563756.1669904683@sss.pgh.pa.us> (raw)
In-Reply-To: <20221201111639.t6cabzqlmcl4yjtl@alvherre.pgsql>
References: <20221201111639.t6cabzqlmcl4yjtl@alvherre.pgsql>
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On 2022-Dec-01, Noah Misch wrote:
>> This is free from the problem found in ddl-create-public-reorg-really.patch.
>> However, the word "other" doesn't belong there. (The per-user schemas should
>> not have public CREATE privilege.) I would also move that same sentence up
>> front, like this:
>>
>> Constrain ordinary users to user-private schemas. To implement this
>> pattern, first ensure that no schemas have public CREATE privileges.
>> Then, for every user needing to create non-temporary objects, create a
>> schema with the same name as that user. (Recall that the default search
>> path starts with $user, which resolves to the user name. Therefore, if
>> each user has a separate schema, they access their own schemas by
>> default.) This pattern is a secure schema usage pattern unless an
>> untrusted user is the database owner or holds the CREATEROLE privilege, in
>> which case no secure schema usage pattern exists.
> +1 LGTM
Sounds good. I'll make it so in a bit.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, noah@leadboat.com, robertmhaas@gmail.com, pgsql-hackers@postgresql.org
Subject: Re: pgsql: Revoke PUBLIC CREATE from public schema, now owned by pg_databas
In-Reply-To: <1563756.1669904683@sss.pgh.pa.us>
References: <20221201111639.t6cabzqlmcl4yjtl@alvherre.pgsql> <1563756.1669904683@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox