pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Moench-Tegeder <cmt@burggraben.net>
To: Dominique Devienne <ddevienne@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: public schema grants to PUBLIC role
Date: Thu, 9 Mar 2023 12:35:11 +0100
Message-ID: <ZAnEb0jn09gISJaU@squirrel.exwg.net> (raw)
In-Reply-To: <CAFCRh--mT14Hj_FcbbrBVMMD7JoCQi29TKymrNXz2TYh_-53HQ@mail.gmail.com>
References: <CAFCRh--mT14Hj_FcbbrBVMMD7JoCQi29TKymrNXz2TYh_-53HQ@mail.gmail.com>

## Dominique Devienne (ddevienne@gmail.com):

> Hi. I've recently realized via a post (or article?) from Laurenz that the
> PUBLIC role has CREATE privilege on the 'public' schema by default (see
> query below). I guess it can't be avoided?

You could just use PostgreSQL 15:
https://www.postgresql.org/docs/15/release-15.html#id-1.11.6.7.4

> In particular, we need extensions, which are loaded in public by default.
> Will USAGE of public be enough for LOGIN users having access to the DB to
> use extensions?

Plus any grants on the extension's object.

> More broadly, we want to secure the DB so that all DB access and schema
> access are explicit.
> Anything else to be aware of please, beside the two mentioned above?

Have a look at default privileges and group roles, that will make your
life much easier.
https://www.postgresql.org/docs/15/ddl-priv.html

Regards,
Christoph

-- 
Spare Space.





view thread (4+ messages)  latest in thread

Message-ID: <ZAnEb0jn09gISJaU@squirrel.exwg.net>
Permalink:  ../ZAnEb0jn09gISJaU@squirrel.exwg.net/
Also on:    postgresql.org/message-id/ZAnEb0jn09gISJaU@squirrel.exwg.net

 · 

reply

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-general@postgresql.org
  Cc: cmt@burggraben.net, ddevienne@gmail.com
  Subject: Re: public schema grants to PUBLIC role
  In-Reply-To: <ZAnEb0jn09gISJaU@squirrel.exwg.net>
  References: <CAFCRh--mT14Hj_FcbbrBVMMD7JoCQi29TKymrNXz2TYh_-53HQ@mail.gmail.com> <ZAnEb0jn09gISJaU@squirrel.exwg.net>

* 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