Re: public schema default ACL
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Noah Misch <noah@leadboat.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, "David G. Johnston" <david.g.johnston@gmail.com>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
Stephen Frost <sfrost@snowman.net>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2020-08-03T13:46:23Z
Lists: pgsql-hackers
On Mon, Aug 3, 2020 at 2:30 AM Noah Misch <noah@leadboat.com> wrote: > Between (b)(2)(X) and (b)(3)(X), what are folks' preferences? Does anyone > strongly favor some other option (including the option of changing nothing) > over both of those two? I don't think we have any options here that are secure but do not break backward compatibility. The present situation, with a writable public schema, is equivalent to a UNIX system in which /usr/bin is drwxrwxrwt. Nobody would seriously propose that such a system design is secure, not so much because it's intrinsically broken if everyone is careful not to execute any executables they don't know to have been deposited by people they trust, but because it's quite easy to accidentally execute one that isn't. However, if people are used to being able to deposit stuff in /usr/bin and you tell them that they now can't (because the permissions will henceforth be drwxr-xr-x or the directly won't exist at all) then some of them are going to complain. I don't know what to do about that: it's a straightforward trade-off between security and backward compatibility, and you can't have both. I support the idea of having an automatic schema creation option. I think that would be quite a cool thing to have, whether it's the default (Y) or not (Z). But I don't know how to choose between (1), (2), and (3). -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Revoke PUBLIC CREATE from public schema, now owned by pg_database_owner.
- b073c3ccd06e 15.0 landed
-
Document security implications of search_path and the public schema.
- 5770172cb0c9 11.0 cited