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 1otUhp-0005qg-DQ for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Nov 2022 14:08:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1otUhn-0001Zd-Fw for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Nov 2022 14:08:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1otUhm-0001ZT-CO for pgsql-hackers@lists.postgresql.org; Fri, 11 Nov 2022 14:08:27 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1otUhh-00067K-9h for pgsql-hackers@lists.postgresql.org; Fri, 11 Nov 2022 14:08:25 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 6B3365C014B; Fri, 11 Nov 2022 09:08:19 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 11 Nov 2022 09:08:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1668175699; x= 1668262099; bh=e1OQJVUiF/tw1FUEGoWiAJP/+fDjaQHr8mr8HyCqI8E=; b=r fTNZugA060I2L5QnA0JmxX7qe/DXbROKpcUoegCD0ZI4IAf5ZfPfUIKoKMWM5B0q fRvqQ1ItuRViFiEbCR36aAPX+SBE35juoX36D3qhoUelm4w484yA2A9c0XfUWwDy Soaqej9M7OrFlZG6wdyyofCXLt/ob3S7T+4UEaQzn99ckdlgQ2X0YJAqplaDVOsC QspshVyF16uT7wYNrFVQl4KiLNBMWqLykdvKFl7kKjnGRICfGkLU4oNCLyczjFGs 60crK9wOUpq1rLOwJJjoe3IuVajCR2FVY43AdYZr6ZV9xt9Lc/poui1dw/AWMHIS 79oWNS1r5/N1WNuzXj+Pw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrfeeigdeitdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepheelffeggedujeetiefh leetuddvieffhfffvdejvdffgeejkeduleduheduieefnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 11 Nov 2022 09:08:17 -0500 (EST) Message-ID: <043c52a4-c001-0201-94fc-305dffb8313e@enterprisedb.com> Date: Fri, 11 Nov 2022 15:08:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: Privileges on PUBLICATION Content-Language: en-US To: Antonin Houska Cc: Euler Taveira , Amit Kapila , PostgreSQL Hackers References: <20330.1652105397@antos> <8a00e0e1-dc4e-422c-9dcf-664b16b18625@www.fastmail.com> <2810.1652171844@antos> <5859.1652423797@antos> <57022.1652867097@antos> <4c420c17-8570-4b52-b7f6-9ce3f53d7ef9@www.fastmail.com> <14292.1655733695@antos.home> <746c9a65-e2cc-2573-a50e-ab5ea884f680@enterprisedb.com> <1537.1667454192@antos> <2497.1667546930@antos> From: Peter Eisentraut In-Reply-To: <2497.1667546930@antos> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 04.11.22 08:28, Antonin Houska wrote: > I thought about the whole concept a bit more and I doubt if the PUBLICATION > privilege is the best approach. In particular, the user specified in CREATE > SUBSCRIPTION ... CONNECTION ... (say "subscription user") needs to have SELECT > privilege on the tables replicated. So if the DBA excludes some columns from > the publication's column list and sets the (publication) privileges in such a > way that the user cannot get the column values via other publications, the > user still can connect to the database directly and get values of the excluded > columns. Why are the SELECT privileges needed? Maybe that's something to think about and maybe change. > As an alternative to the publication privileges, I think that the CREATE > SUBSCRIPTION command could grant ACL_SELECT automatically to the subscription > user on the individual columns contained in the publication column list, and > DROP SUBSCRIPTION would revoke that privilege. I think that approach is weird and unusual. Privileges and object creation should be separate operations.