From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rob Sargent <robjsargent@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: connect permission based on database name
Date: Wed, 25 May 2022 10:20:23 -0400
Message-ID: <1920549.1653488423@sss.pgh.pa.us> (raw)
In-Reply-To: <3659d499-9a98-6362-7c33-d8f2947474b4@gmail.com>
References: <3659d499-9a98-6362-7c33-d8f2947474b4@gmail.com>
Rob Sargent <robjsargent@gmail.com> writes:
> Just wondering if I've bumped into some security issue.
> I'm somewhat surprised that "grant connect to database <dbname> to
> <role>" appears to be stored "by name"?
I think you are forgetting that databases have a default GRANT CONNECT
TO PUBLIC. You need to revoke that before other grants/revokes will
have any functional effect.
regards, tom lane
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: tgl@sss.pgh.pa.us, robjsargent@gmail.com
Subject: Re: connect permission based on database name
In-Reply-To: <1920549.1653488423@sss.pgh.pa.us>
References: <3659d499-9a98-6362-7c33-d8f2947474b4@gmail.com> <1920549.1653488423@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox