pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Drouvot, Bertrand <bdrouvot@amazon.com>
To: Jacob Champion <jchampion@timescale.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Joe Conway <mail@joeconway.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: sfrost@snowman.net <sfrost@snowman.net>
Cc: rjuju123@gmail.com <rjuju123@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: andres@anarazel.de <andres@anarazel.de>
Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers
Date: Thu, 11 Aug 2022 07:47:39 +0200
Message-ID: <2a1e2717-8c68-3f9e-1e02-32da71deb327@amazon.com> (raw)
In-Reply-To: <CAAWbhmi4OHmk0EVBuQrYcwbotF8uFayDVgkL-H-gqrK0XmeSeg@mail.gmail.com>
References: <CAAWbhmhfzt+hYiTXi3f0V_E5E+E_mmzd_x+p9zjs_NvBpJ36pA@mail.gmail.com>
	<CA+TgmoZmRAkOgNzSqRxzJ=Kok_NYHZ57X2ZKRh=cfoCukp4f_Q@mail.gmail.com>
	<CAAWbhmjPu2VNS8MhwDp=+hu61EsJ3zf_rTRtyZ8Qw08eAhg_pA@mail.gmail.com>
	<f98e0b81-96cb-b0d8-c483-e99563cc44b4@amazon.com>
	<3b678314-054a-6119-b373-4574067f404e@timescale.com>
	<cc8aaffb-1008-eaf6-090e-2461cbe6e1cf@amazon.com>
	<Yu4JhEvh1V0sGWXv@paquier.xyz>
	<af85ae52-de60-6a98-d69e-7d410aee752d@joeconway.com>
	<Yu9slCBp0WWD4Qx1@paquier.xyz>
	<d25a412e-9686-d37f-3bd1-63b821f67a51@amazon.com>
	<YvImQ0sl1dV4TBNg@paquier.xyz>
	<34308245-ea21-82ee-b1fd-00b4766f3527@amazon.com>
	<CAAWbhmi4OHmk0EVBuQrYcwbotF8uFayDVgkL-H-gqrK0XmeSeg@mail.gmail.com>

Hi,

On 8/10/22 5:09 PM, Jacob Champion wrote:
> On Tue, Aug 9, 2022 at 3:39 AM Drouvot, Bertrand <bdrouvot@amazon.com> wrote:
>> Agree that it makes sense to work on those patches in this particular
>> order then.
> Sounds good. The ClientConnectionInfo patch (previously 0002) is
> attached, with the SQL function removed.

Thanks for the patch!

Looking at:

+typedef struct
+{
+    /*
+     * Authenticated identity.  The meaning of this identifier is 
dependent on
+     * hba->auth_method; it is the identity (if any) that the user 
presented
+     * during the authentication cycle, before they were assigned a 
database
+     * role.  (It is effectively the "SYSTEM-USERNAME" of a pg_ident 
usermap
+     * -- though the exact string in use may be different, depending on 
pg_hba
+     * options.)
+     *
+     * authn_id is NULL if the user has not actually been 
authenticated, for
+     * example if the "trust" auth method is in use.
+     */
+    const char *authn_id;
+} ClientConnectionInfo;

What do you think about adding a second field in ClientConnectionInfo 
for the auth method (as suggested by Michael upthread)?

That will be needed by the SYSTEM_USER patch (that its current version 
implements as "auth_method:identity").

Thanks,

-- 
Bertrand Drouvot
Amazon Web Services: https://aws.amazon.com






view thread (89+ messages)  latest in thread

Message-ID: <2a1e2717-8c68-3f9e-1e02-32da71deb327@amazon.com>
Permalink:  ../2a1e2717-8c68-3f9e-1e02-32da71deb327@amazon.com/
Also on:    postgresql.org/message-id/2a1e2717-8c68-3f9e-1e02-32da71deb327@amazon.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: bdrouvot@amazon.com, jchampion@timescale.com, michael@paquier.xyz, mail@joeconway.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, sfrost@snowman.net, rjuju123@gmail.com, andres@anarazel.de
  Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers
  In-Reply-To: <2a1e2717-8c68-3f9e-1e02-32da71deb327@amazon.com>
  References: <CAAWbhmhfzt+hYiTXi3f0V_E5E+E_mmzd_x+p9zjs_NvBpJ36pA@mail.gmail.com> <CA+TgmoZmRAkOgNzSqRxzJ=Kok_NYHZ57X2ZKRh=cfoCukp4f_Q@mail.gmail.com> <CAAWbhmjPu2VNS8MhwDp=+hu61EsJ3zf_rTRtyZ8Qw08eAhg_pA@mail.gmail.com> <f98e0b81-96cb-b0d8-c483-e99563cc44b4@amazon.com> <3b678314-054a-6119-b373-4574067f404e@timescale.com> <cc8aaffb-1008-eaf6-090e-2461cbe6e1cf@amazon.com> <Yu4JhEvh1V0sGWXv@paquier.xyz> <af85ae52-de60-6a98-d69e-7d410aee752d@joeconway.com> <Yu9slCBp0WWD4Qx1@paquier.xyz> <d25a412e-9686-d37f-3bd1-63b821f67a51@amazon.com> <YvImQ0sl1dV4TBNg@paquier.xyz> <34308245-ea21-82ee-b1fd-00b4766f3527@amazon.com> <CAAWbhmi4OHmk0EVBuQrYcwbotF8uFayDVgkL-H-gqrK0XmeSeg@mail.gmail.com> <2a1e2717-8c68-3f9e-1e02-32da71deb327@amazon.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox