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 1l34zg-0005CT-Fk for pgsql-general@arkaria.postgresql.org; Fri, 22 Jan 2021 22:33:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l34zf-0007mY-EY for pgsql-general@arkaria.postgresql.org; Fri, 22 Jan 2021 22:33:27 +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 1l34zd-0007ky-U0 for pgsql-general@lists.postgresql.org; Fri, 22 Jan 2021 22:33:27 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l34za-0003tX-4M for pgsql-general@lists.postgresql.org; Fri, 22 Jan 2021 22:33:25 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id B0F0417A7; Fri, 22 Jan 2021 17:33:18 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 22 Jan 2021 17:33:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=h +H7nmYwiyFg04+sXMcVPTyv4iKk9g6LVYf0d4SLW0Q=; b=n3llpiJsM6xthxFf4 K29GExxGkvKGIVqO/x8WF1D65wDjylZiFXHAQxoQo+PHPWFf/fthU94iPMhuUCyl njTf+DD6l3zuenenP9QTGiYzLbabEk7unEY+MRoyxOriJw5TVyRxk3uuAvLhtCFp 5gxii8wWK6Zg0aTv6uMhRL1KyWpsiYo0xyBSByTa7JpQgTWLrwZ7zBPk79jRByqs iiU1k43tqUFUG8SevnWFXgTfZzntqBe5VDGe3UFlh1qvu6OVUhrazKpsWDzwNS4c lArd39o3DmQJDRt09oZYNqGVjc86nPrEOS/FIvE+pdZyEbawQRL3AzC9mvs7XVs1 fpj5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm1; bh=h+H7nmYwiyFg04+sXMcVPTyv4iKk9g6LVYf0d4SLW 0Q=; b=mdwGbOmm3N7fSw2jo4z+Qh1xkBlcMqn8slb3M///z7b/sJiz1OHy+yTIH OeBW+d+iK78kpbOZJ5nRmPPqRs/kpAmajE0Q1jpnVJz1bpnIxoImgd2SjatuAOcr slNZpB1zTx5IdVLcSYpR/FhqFuOU/l6Ov+bPejYQnyX4iKo7O4EofShTYyK/eTVZ qtWIWy+yP0K1V7gml7btcWR0WWk9j8QAt09z3B7DKKsQMMt9mWPJ7yhtZXJXTtU2 L2yDYvmjBbzLX2NoXsyduy16luWp4W7Uf/Wf52fkePdPY2FLknhYFu0kkzdzXwBw Ew37X0ozwqgvFX1GLrYLInEtSreUA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeigdduieelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeevteejtdeikeetfefhhffhteelvdekffevudegjeeu kefhgfdvieeliedtkeevhfenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgne cukfhppeejhedrudejvddrudegrddujeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrd gtohhm X-ME-Proxy: Received: from [192.168.1.4] (75-172-14-17.tukw.qwest.net [75.172.14.17]) by mail.messagingengine.com (Postfix) with ESMTPA id A02E2240065; Fri, 22 Jan 2021 17:33:17 -0500 (EST) Subject: Re: localhost ssl To: Rob Sargent , "pgsql-generallists.postgresql.org" References: <1ca17e3b-14de-69ff-5f0b-4082376571ca@aklaver.com> <73ae4494-3b65-6ecd-b610-9a9ac5c9cce1@gmail.com> <5f8db865-2f0e-6764-f2f0-b344feb42368@aklaver.com> <2f653f6c-5f27-13fd-49be-90845a45ef43@gmail.com> From: Adrian Klaver Message-ID: <4665f2de-d2a2-4623-8c61-0f42c899e8a3@aklaver.com> Date: Fri, 22 Jan 2021 14:33:16 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <2f653f6c-5f27-13fd-49be-90845a45ef43@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 1/22/21 1:11 PM, Rob Sargent wrote: > > Just prior to that quote is > "The cn (Common Name) attribute of the certificate will be compared to > the requested database user name, and if they match the login will be > allowed." > which leads to me to believe I would need a cert per role. > >> which leads to this: >> >> https://www.postgresql.org/docs/12/auth-username-maps.html > I don't think the mapping tricks help me, but happy to be convinced > otherwise. Check out this section: https://www.postgresql.org/docs/12/ssl-tcp.html#SSL-CLIENT-CERTIFICATES "... the cn (Common Name) in the certificate matches the user name or an applicable mapping." This section spells out what is needed for the various forms of client cert SSL authentication. > > I have specific roles accessing specific schemas via sql which is not > schema qualified. > I'm assuming this is some sort of security. Just wondering if there is provision made for people who know how to do SET search_path or \dn or schema qualify objects? -- Adrian Klaver adrian.klaver@aklaver.com