From: Michael Paquier <michael@paquier.xyz>
To: Joe Conway <mail@joeconway.com>
Cc: Drouvot, Bertrand <bdrouvot@amazon.com>
Cc: Jacob Champion <jchampion@timescale.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: Sun, 7 Aug 2022 16:41:08 +0900
Message-ID: <Yu9slCBp0WWD4Qx1@paquier.xyz> (raw)
In-Reply-To: <af85ae52-de60-6a98-d69e-7d410aee752d@joeconway.com>
References: <CAAWbhmj340fKUMO-a=3BZKw4RfvWroz_V=E_9bowoxeAxFkCSQ@mail.gmail.com>
<CA+Tgmoa2ed6X+qDKvs6NZ=h0hQ2OJjgnmoBF2LwRagE6R5qAAw@mail.gmail.com>
<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>
On Sat, Aug 06, 2022 at 10:59:26AM -0400, Joe Conway wrote:
> I am not sure how else we should interpret SYSTEM_USER -- if it isn't
> port->authn_id what else would you propose it should be?
What you say sounds rather right, but I was wondering mainly what
Oracle and SQL server report when it comes to other authentication
methods like SSPI or a cert, where we don't use a user name but some
data dependent on the auth method. And I have no experience with
these.
Anyway, I was looking at Bertrand's patch, and I can see that it is
doing nothing to move away the connection information that we have in
Port away to a different structure passed down to the parallel
workers, which is what I understand is a cleanup worth on its own
based on the discussion of this thread. Hence, I still see a good
argument for the introduction of ClientConnectionInfo that gets passed
down to the workers. Based on that, I think that we'd better finish
v11-0002 (only ClientConnectionInfo, no SQL interface) as a first step
to build for the next ones, with authn being the first piece of
information given to the workers. With a separate structure, the
auth_method can also be a second member in ClientConnectionInfo,
completing what would be needed to build SYSTEM_USER as the workers
would have access to it.
Am I getting that right?
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
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: michael@paquier.xyz, mail@joeconway.com, bdrouvot@amazon.com, jchampion@timescale.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: <Yu9slCBp0WWD4Qx1@paquier.xyz>
References: <CAAWbhmj340fKUMO-a=3BZKw4RfvWroz_V=E_9bowoxeAxFkCSQ@mail.gmail.com> <CA+Tgmoa2ed6X+qDKvs6NZ=h0hQ2OJjgnmoBF2LwRagE6R5qAAw@mail.gmail.com> <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>
* 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