public inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: Ing. Marijo Kristo <marijo.kristo@icloud.com>
Cc: pgsql-sql@lists.postgresql.org
Subject: Re: Revoke Connect Privilege from Database not working
Date: Tue, 01 Apr 2025 10:13:49 -0400
Message-ID: <346227.1743516829@sss.pgh.pa.us> (raw)
In-Reply-To: <6C13A1CC-3841-4A5E-BC78-C8F9C5B120BB@icloud.com>
References: <18873-c148b32c0e501cc0@postgresql.org>
<6C13A1CC-3841-4A5E-BC78-C8F9C5B120BB@icloud.com>
"Ing. Marijo Kristo" <marijo.kristo@icloud.com> writes:
>> Removing the connect privilege with the Postgres Superuser and with the
>> Vault Admin user does not work.
>> postgres=# revoke connect on database "disp_db" from
>> "dev_oidc-m-kristo-rewe-group-at-2025_02_28T09_06_30+00:00";
>> REVOKE
REVOKE is not being as helpful as it could be here, perhaps:
it is failing to tell you that it's a no-op because there
is no such privilege. You never granted connect on disp_db
to that user so you can't revoke it either.
The privilege that exists by default, per [1], is that
database connect privileges are granted to PUBLIC (the
pseudo-group of all users). If that's not what you want,
you have to do
revoke connect on database "disp_db" from public;
and then grant it out again to the users who should have it.
regards, tom lane
[1] https://www.postgresql.org/docs/current/ddl-priv.html
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, marijo.kristo@icloud.com, pgsql-sql@lists.postgresql.org
Subject: Re: Revoke Connect Privilege from Database not working
In-Reply-To: <346227.1743516829@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox