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 1o4HfJ-0007Qr-NY for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Jun 2022 07:54:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o4HfI-0005dm-2D for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Jun 2022 07:54:12 +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 1o4HfH-0005dP-DL for pgsql-hackers@lists.postgresql.org; Thu, 23 Jun 2022 07:54:11 +0000 Received: from smtp-fw-9103.amazon.com ([207.171.188.200]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o4HfB-0006tE-Q1 for pgsql-hackers@lists.postgresql.org; Thu, 23 Jun 2022 07:54:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1655970845; x=1687506845; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=k1IhCXoEjyc4uLGNp0fclRojvhwX3dwMku3jKw0n+pg=; b=J49KifAgSP9YN2EmZqkvXT1x82wCA4Hdf0iWqZJRC7wp4eiKOAFv2TsS 35wREWpvxo3lmjNq30TfoBfdcTTFZY1RNtaKGYb45ok6+b4ymWhBfOQJo yPrbSVjLxViW2+CSjICahvvewquRVEM3Y2+c9uboG/yC0ZSXVd5goJo6T g=; X-IronPort-AV: E=Sophos;i="5.92,215,1650931200"; d="scan'208";a="1027380203" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-iad-1a-4ba5c7da.us-east-1.amazon.com) ([10.25.36.210]) by smtp-border-fw-9103.sea19.amazon.com with ESMTP; 23 Jun 2022 07:53:47 +0000 Received: from EX13D03EUC003.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan2.iad.amazon.com [10.40.163.34]) by email-inbound-relay-iad-1a-4ba5c7da.us-east-1.amazon.com (Postfix) with ESMTPS id 5EFC89E0A1; Thu, 23 Jun 2022 07:53:46 +0000 (UTC) Received: from [192.168.18.164] (10.43.162.40) by EX13D03EUC003.ant.amazon.com (10.43.164.192) with Microsoft SMTP Server (TLS) id 15.0.1497.36; Thu, 23 Jun 2022 07:53:43 +0000 Message-ID: <88295ad6-05b1-1d00-9985-6330be2c8a68@amazon.com> Date: Thu, 23 Jun 2022 09:53:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: SYSTEM_USER reserved word implementation Content-Language: en-US To: Joe Conway , Tom Lane CC: Jacob Champion , PostgreSQL Hackers References: <7e692b8c-0b11-45db-1cad-3afc5b57409f@amazon.com> <3338921.1655905757@sss.pgh.pa.us> <28b4a9ef-5103-f117-99e1-99ae5a86a6e8@joeconway.com> <3361134.1655909496@sss.pgh.pa.us> <89d0577e-b9f8-4d8a-224d-b336a5fe08af@joeconway.com> <3484653.1655913147@sss.pgh.pa.us> <3523129.1655915323@sss.pgh.pa.us> <8dd72a01-a76b-8ebf-d9e7-f7d21dab0425@joeconway.com> From: "Drouvot, Bertrand" In-Reply-To: <8dd72a01-a76b-8ebf-d9e7-f7d21dab0425@joeconway.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.43.162.40] X-ClientProxiedBy: EX13D06UWA002.ant.amazon.com (10.43.160.143) To EX13D03EUC003.ant.amazon.com (10.43.164.192) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 6/22/22 6:32 PM, Joe Conway wrote: > CAUTION: This email originated from outside of the organization. Do > not click links or open attachments unless you can confirm the sender > and know the content is safe. > > > > On 6/22/22 12:28, Tom Lane wrote: >> Joe Conway writes: >>> On 6/22/22 11:52, Tom Lane wrote: >>>> I think a case could be made for ONLY returning non-null when authn_id >>>> represents some externally-verified identifier (OS user ID gotten via >>>> peer identification, Kerberos principal, etc). >> >>> But -1 on that. >> >>> I think any time we have a non-null authn_id we should expose it. Are >>> there examples of cases when we have authn_id but for some reason don't >>> trust the value of it? >> >> I'm more concerned about whether we have a consistent story about what >> SYSTEM_USER means (another way of saying "what type is it").  If it's >> just the same as SESSION_USER it doesn't seem like we've added much. >> >> Maybe, instead of just being the raw user identifier, it should be >> something like "auth_method:user_identifier" so that one can tell >> what the identifier actually is and how it was verified. > > Oh, that's an interesting thought -- I like that. > Thanks Joe and Tom for your feedback. I like this idea too and that's also more aligned with what log_connections set to on would report (aka the auth method). Baring any objections, I'll work on that idea. Bertrand