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 1jgZuN-0008An-Fm for pgsql-general@arkaria.postgresql.org; Wed, 03 Jun 2020 20:22:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jgZuL-0003YI-Gf for pgsql-general@arkaria.postgresql.org; Wed, 03 Jun 2020 20:22:41 +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 1jgZuJ-0003XT-Uq for pgsql-general@lists.postgresql.org; Wed, 03 Jun 2020 20:22:41 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jgZuA-0004BX-Tq for pgsql-general@lists.postgresql.org; Wed, 03 Jun 2020 20:22:39 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 8B2D0823; Wed, 3 Jun 2020 16:22:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 03 Jun 2020 16:22:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=D 72Qw/ORU9k4LrBeG9KbTiFbSXGNtE63Gu+N8I11hK0=; b=rLwLJyhC36nikZyk7 iggySMgvx6Ny8yQZ1FmqnUHDIcoH1W6Ky0Fv4j/lPY5tWnAPvoYqRNbsw4AT6DtL MZ93Hpi3AvwYi6rI+PRa3RZcSi8CAMxnmACDEiqMnn4y84YxE2oWiLrXXkfrKlln weBIjAOx3EMLYHEg7zHlFRSW1XYzWL8xuVXAk9W/zSbzM5BxKvawUiefdoVQFkyt rSKwC4L/Kw3Q0dRdqPjKPc2rrFbIO3bEqDMgs/UL2DEOpcpjy349BIPesDRC3SQi 4vV7xZVecAhBXeQ4OdcBnNqFPRn0UzYdvbllemwL+nWElELFyO1KvuCJtT5mazz5 EmeQw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=D72Qw/ORU9k4LrBeG9KbTiFbSXGNtE63Gu+N8I11h K0=; b=z4yVLgk857oAW4+H7U46AkNSsK6mmFtKl5ERoZatOPrCUeh3ghNS3CcLZ hdaL7no22/Z5PcWxdc2np3mmM3NY8/KaYSy6un1R7+6uyNewk2occ20eGll0ZBOI JNylC0flFlnM3eQaza4jLrVrGpdLSuIblOnCUoODgGPn4PTa1Yv7+3JrcenljNNt hfxpevN5pbCi5NBCeNiPvpgbnaVhv/TZKfIwredL+DPgpQDphHKhN+8oIPRadybd G+00AKuxQVzwRF76vs3HguZ78UmLH8spVeEfXNHwS0ijCRVL5T3AXgwCHtfqfpCW tZQUi0e3EAaj9iU+edZRur1pTWQ8A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudefledguddvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepuddufeejteevffehgfduhedthfdvteekieeuheef veevudetkeelueehgeduhefhnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrgh enucfkphepjeehrddujedvrdehrddvfedunecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrh drtghomh X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 23066328005E; Wed, 3 Jun 2020 16:22:26 -0400 (EDT) Subject: Re: Fine grained permissions on User Mapping To: Paul Bonaud , Tom Lane Cc: pgsql-general@lists.postgresql.org References: <539939.1591106906@sss.pgh.pa.us> From: Adrian Klaver Message-ID: Date: Wed, 3 Jun 2020 13:22:25 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 6/3/20 4:11 AM, Paul Bonaud wrote: > Hi Tom, > > Thank you very much for your answer. > > I was worried to get this kind of solution, i.e. “don't be so miserly as > not to create a separate one for each privilege level you need.”, > however in the case of a remote database **you have no control over**it > sounds pretty impossible to do. > > If I understand correctly, my initial question doesn't have a solution > within postgres, does this sound right? As it stands now I can't think of one. You might reach out to the postgres_fdw folks and see if they could get it to use a service file: https://www.postgresql.org/docs/12/libpq-pgservice.html Then the user mapping could use information the end user can't see unless they had permissions on the file system. > > Thanks again ! > Paul > ** -- Adrian Klaver adrian.klaver@aklaver.com