Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntrsF-0007Q8-7O for pgsql-general@arkaria.postgresql.org; Wed, 25 May 2022 14:20:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ntrsD-0006Ym-QP for pgsql-general@arkaria.postgresql.org; Wed, 25 May 2022 14:20:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntrsD-0006Yc-FF for pgsql-general@lists.postgresql.org; Wed, 25 May 2022 14:20:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntrsA-0004Qg-6i for pgsql-general@lists.postgresql.org; Wed, 25 May 2022 14:20:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 24PEKN5N1920550; Wed, 25 May 2022 10:20:23 -0400 From: Tom Lane To: Rob Sargent cc: "pgsql-generallists.postgresql.org" Subject: Re: connect permission based on database name In-reply-to: <3659d499-9a98-6362-7c33-d8f2947474b4@gmail.com> References: <3659d499-9a98-6362-7c33-d8f2947474b4@gmail.com> Comments: In-reply-to Rob Sargent message dated "Wed, 25 May 2022 08:09:50 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1920548.1653488423.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Wed, 25 May 2022 10:20:23 -0400 Message-ID: <1920549.1653488423@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Rob Sargent writes: > Just wondering if I've bumped into some security issue. > I'm somewhat surprised that "grant connect to database   to > " 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