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 1o4Hrf-0007vH-4D for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Jun 2022 08:06:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o4Hre-0008Bv-0C for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Jun 2022 08:06:58 +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 1o4Hrd-0008Ba-MW for pgsql-hackers@lists.postgresql.org; Thu, 23 Jun 2022 08:06:57 +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 1o4Hra-0006zq-Rm for pgsql-hackers@lists.postgresql.org; Thu, 23 Jun 2022 08:06:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1655971614; x=1687507614; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=M1HPtBk8AKI1nv4QZ+SmltLnf7pCVgevlfBhNlJM0Sw=; b=o3zNj7iotpOPxAW/Mu7aw0QfryK3ahIuWOXpTXxSyNkGmNdM4+AgIDgV ON/9pdDrFNeydOj7/2Ksi+iqRbKKlGjgauzJm+oP+/FeEcJUyci/IezpT 99FGIDpwWsttHB5y0THRMF2+yUqtIfLAC9LdDVrGXKNkDgOZhHEELcNvI 4=; X-IronPort-AV: E=Sophos;i="5.92,215,1650931200"; d="scan'208";a="1027383887" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-pdx-2a-1801e169.us-west-2.amazon.com) ([10.25.36.210]) by smtp-border-fw-9103.sea19.amazon.com with ESMTP; 23 Jun 2022 08:06:51 +0000 Received: from EX13D03EUC003.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-pdx-2a-1801e169.us-west-2.amazon.com (Postfix) with ESMTPS id BE41BC09A5; Thu, 23 Jun 2022 08:06:50 +0000 (UTC) Received: from [192.168.18.164] (10.43.162.140) by EX13D03EUC003.ant.amazon.com (10.43.164.192) with Microsoft SMTP Server (TLS) id 15.0.1497.36; Thu, 23 Jun 2022 08:06:47 +0000 Message-ID: Date: Thu, 23 Jun 2022 10:06:43 +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: Jacob Champion , Joe Conway CC: Tom Lane , 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> From: "Drouvot, Bertrand" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.43.162.140] X-ClientProxiedBy: EX13D34UWC004.ant.amazon.com (10.43.162.155) 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 5:35 PM, Jacob Champion wrote: > On Wed, Jun 22, 2022 at 8:10 AM Joe Conway wrote: >> On the contrary, I would argue that not having the identifier for the >> external "user" available is a security concern. Ideally you want to be >> able to trace actions inside Postgres to the actual user that invoked them. > If auditing is also the use case for SYSTEM_USER, you'll probably want > to review the arguments for making it available to parallel workers > that were made in the other thread [1]. Thanks Jacob for your feedback. I did some testing initially around the parallel workers and did not see any issues at that time. I just had another look and I agree that the parallel workers case needs to be addressed. I'll have a closer look to what you have done in [1]. Thanks Bertrand [1]https://www.postgresql.org/message-id/flat/793d990837ae5c06a558d58d62de9378ab525d83.camel%40vmware.com