Re: [PATCH] Expose port->authn_id to extensions and triggers - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PATCH] Expose port->authn_id to extensions and triggers
Date
Msg-id Yh8YPDWBFoM0puXz@paquier.xyz
Whole thread Raw
In response to Re: [PATCH] Expose port->authn_id to extensions and triggers  (Jacob Champion <pchampion@vmware.com>)
List pgsql-hackers
On Tue, Mar 01, 2022 at 10:03:20PM +0000, Jacob Champion wrote:
> Added a first draft in v5, alongside the perltidy fixups mentioned by
> Michael.

+    The authenticated identity is an immutable identifier for the user
+    presented during the connection handshake; the exact format depends on
+    the authentication method in use. (For example, when using the
+    <literal>scram-sha-256</literal> auth method, the authenticated identity
+    is simply the username. When using the <literal>cert</literal> auth
+    method, the authenticated identity is the Distinguished Name of the
+    client certificate.) Even for auth methods which use the username as
+    the authenticated identity, this function differs from
+    <literal>session_user</literal> in that its return value cannot be
+    changed after login.

That looks enough seen from here.  Thanks!

Nit: "auth method" would be a first in the documentation, so this had
better be "authentication method".  (No need to send an updated patch
just for that).

So, any comments and/or opinions from others?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: Add the replication origin name and commit-LSN to logical replication worker errcontext
Next
From: Amit Kapila
Date:
Subject: Re: Design of pg_stat_subscription_workers vs pgstats