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 1oopPa-0003Xn-F0 for pgsql-general@arkaria.postgresql.org; Sat, 29 Oct 2022 17:14:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oopPX-0008TI-L1 for pgsql-general@arkaria.postgresql.org; Sat, 29 Oct 2022 17:14:19 +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 1oopPV-0008Rq-SL for pgsql-general@lists.postgresql.org; Sat, 29 Oct 2022 17:14:19 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oopPP-0002i0-Q2 for pgsql-general@lists.postgresql.org; Sat, 29 Oct 2022 17:14:16 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id D1EC332008C0; Sat, 29 Oct 2022 13:14:06 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 29 Oct 2022 13:14:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1667063646; x= 1667150046; bh=wvnb3G3eTIc+e1KxUcx7ubAgMe0TEmUagqOid7phg4o=; b=K RbwHYOZA3kPSwIU2zksB4NPuiG+uLhl2u4BTKkckk8vWNcoPCdbugWPagdYuQ6IT QYUzyfR0VrtbbpyOZXi7qPox46M8w6cgg8cCBbMgJqW6s0v8If5bKSIbIen3t2vY vYDL7dza99EWQb5LWsDqGxclq0Ox+C4eFCmTcmcAAnRbOAPhfRi0XrHwBmeRYogY X1ZmqEknu2tzBfe1tp2WEf8V+WbPP+8KJ6s8tQIrm8x0/D9NyV/VSlE0a6zSWwtA OOodobLGztiI6j8+yVsddcP50S9Ej1kc2ofZscyVgjqK6nS03D4GbrZZs3o4HEXV cIsKTvPz38bGLDZPI+8yA== 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=fm3; t=1667063646; x= 1667150046; bh=wvnb3G3eTIc+e1KxUcx7ubAgMe0TEmUagqOid7phg4o=; b=o 7Rxumf2VrRJUXqzGS49utf8XDdB0qFxpj2MLh7ncgojAXkPBQaDRMcLwR772aSGz oj/7oDc43HNl8hl2dW/mXBpAq7vovT/qZNOSl5UaHJ/cVoyocbw1H9etlPErAkMS n5LHEPIRUbDSeDDTmIMj1dxVKQAPXI9/gYY6yvoMG+YN+R7WB8V78qjjYyU3Qw5k iUszHjl3BeoKo1XFTJBDimyJF4GayhVpr7tSCs4yK0grORCmddWCbiNDT+OGX9IJ hBbzGnKHM7FYqm/KU1NfWs6vLgi64ERumdiXIXzHgur8PEj2p77pq+eG50mz6Ksf Jr6ib1uXEOvWp+908QKdw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrtdekgdduudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhephfegveekfeelffdvgfdvfefftdeujeehheeuieff hfefiefhvdfhgfetgfdvuefgnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrgh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughr ihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 29 Oct 2022 13:14:05 -0400 (EDT) Message-ID: Date: Sat, 29 Oct 2022 10:14:04 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: "peer" authentication: cannot make "pg_ident.conf" work as I believe that the doc says that it should To: Bryn Llewellyn Cc: "David G. Johnston" , pgsql-general list References: <9801E977-425C-41BF-B024-19BC875940C0@icloud.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: <9801E977-425C-41BF-B024-19BC875940C0@icloud.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/28/22 17:23, Bryn Llewellyn wrote: > Adrian, thank you for your reply to my « Seeking the correct term of art > for the (unique) role that is usually called "postgres"... » thread here: > > It got me in without error. (And, as hoped for, there was no password > challenge.) But "select current_role" showed that the mapping had been > ignored and that I was connected again as "bob". > > *What am I doing wrong?* You skipped over this part of my post and the documentation: Section 21.2 "The map-name is an arbitrary name that will be used to refer to this mapping in pg_hba.conf." This example below id for the ident auth method but the same syntax applies to peer. https://www.postgresql.org/docs/current/auth-pg-hba-conf.html # TYPE DATABASE USER ADDRESS METHOD host all all 192.168.0.0/16 ident map=omicron pg_ident.conf and pg_hba.conf are two separate files and the only way information gets from the former to the latter is if you explicitly include the map name under METHOD for the the auth line. -- Adrian Klaver adrian.klaver@aklaver.com