From: | Dominique Devienne <ddevienne(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Igor Korot <ikorot01(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Fwd: Identify system databases |
Date: | 2025-04-16 15:06:57 |
Message-ID: | CAFCRh--z-BzUJ3C9qj=YPHQYA-zwNdTm2wGC7D74-j2vdK1mOA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Apr 16, 2025 at 4:39 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> writes:
> > On Wed, 2025-04-16 at 10:09 +0200, Dominique Devienne wrote:
So in a way, you guys are saying one should never REVOKE CONNECT ON
DATABASE FROM PUBLIC?
All my DBs are not PUBLIC-accessible.
And inside my DBs, I try to revoke everything from PUBLIC
(USAGE ON TYPES, EXECUTE ON ROUTINES).
Nor do I use the public schema.
And I never use the "built-in" postgres database.
Basically I want all GRANTs to be explicit.
Given the above, I'd want to not provide access to the postgres DB too.
Yet have a way to discover which DBs I can connect to, from the "cluster only".
Naively.
Sounds like you are saying use the "postgres" DB for that, and move on. --DD
D:\>ppg -c acme -d postgres database_ --acls
Connected OK (postgresql://ddevienne(at)acme/postgres); with SSL
|----------|----------|-----------|-----------|
| Grantor | Grantee | Privilege | Grantable |
|----------|----------|-----------|-----------|
| postgres | PUBLIC | TEMPORARY | NO |
| postgres | PUBLIC | CONNECT | NO |
| postgres | postgres | CREATE | NO |
| postgres | postgres | TEMPORARY | NO |
| postgres | postgres | CONNECT | NO |
|----------|----------|-----------|-----------|
5 ACLs to 2 Grantees from 1 Grantor
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2025-04-16 15:11:11 | Re: Cannot turn track_counts on |
Previous Message | Daniel Gustafsson | 2025-04-16 15:03:46 | Re: Cannot turn track_counts on |