public schema grants to PUBLIC role

Поиск
Список
Период
Сортировка
От Dominique Devienne
Тема public schema grants to PUBLIC role
Дата
Msg-id CAFCRh--mT14Hj_FcbbrBVMMD7JoCQi29TKymrNXz2TYh_-53HQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: public schema grants to PUBLIC role  (Christoph Moench-Tegeder <cmt@burggraben.net>)
Re: public schema grants to PUBLIC role  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-general
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?

OK, then I'll REVOKE that privilege when creating a new DB.
Like I already revoked the default CONNECT to PUBLIC on the DB.

But I'm wondering about unexpected side-effets.
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?

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?

Thanks, --DD 

```
=> select grantor::regrole::text, case grantee when 0 then 'PUBLIC' else grantee::regrole::text end, privilege_type as priv, is_grantable as adm from pg_namespace, lateral aclexplode(nspacl) where nspname = 'public';
 grantor  | grantee  |  priv  | adm
----------+----------+--------+-----
 postgres | postgres | USAGE  | f
 postgres | postgres | CREATE | f
 postgres | PUBLIC   | USAGE  | f
 postgres | PUBLIC   | CREATE | f
(4 rows)
```

В списке pgsql-general по дате отправления:

Предыдущее
От: "Rosebrock, Uwe (Environment, Hobart)"
Дата:
Сообщение: crosstab
Следующее
От: Christoph Moench-Tegeder
Дата:
Сообщение: Re: public schema grants to PUBLIC role