pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Introduce SYSTEM_USER
Date: Thu, 29 Sep 2022 06:07:30 +0000
Message-ID: <E1odmhl-00060i-FC@gemulon.postgresql.org> (raw)

Introduce SYSTEM_USER

SYSTEM_USER is a reserved keyword of the SQL specification that,
roughly described, is aimed at reporting some information about the
system user who has connected to the database server.  It may include
implementation-specific information about the means by the user
connected, like an authentication method.

This commit implements SYSTEM_USER as of auth_method:identity, where
"auth_method" is a keyword about the authentication method used to log
into the server (like peer, md5, scram-sha-256, gss, etc.) and
"identity" is the authentication identity as introduced by 9afffcb (peer
sets authn to the OS user name, gss to the user principal, etc.).  This
format has been suggested by Tom Lane.

Note that thanks to d951052, SYSTEM_USER is available to parallel
workers.

Bump catalog version.

Author: Bertrand Drouvot
Reviewed-by: Jacob Champion, Joe Conway, Álvaro Herrera, Michael Paquier
Discussion: https://postgr.es/m/7e692b8c-0b11-45db-1cad-3afc5b57409f@amazon.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0823d061b0b7f1e20fbfd48bef3c2e093493dbd4

Modified Files
--------------
doc/src/sgml/func.sgml                    | 19 ++++++++++++
src/backend/access/transam/parallel.c     |  8 +++++
src/backend/parser/gram.y                 | 11 ++++++-
src/backend/utils/adt/ruleutils.c         |  4 +++
src/backend/utils/init/miscinit.c         | 50 +++++++++++++++++++++++++++++++
src/backend/utils/init/postinit.c         |  4 +++
src/include/catalog/catversion.h          |  2 +-
src/include/catalog/pg_proc.dat           |  3 ++
src/include/miscadmin.h                   |  3 ++
src/include/parser/kwlist.h               |  1 +
src/test/authentication/t/001_password.pl | 42 ++++++++++++++++++++++++++
src/test/kerberos/t/001_auth.pl           | 28 +++++++++++++++--
src/test/regress/expected/create_view.out |  6 ++--
src/test/regress/sql/create_view.sql      |  3 +-
14 files changed, 177 insertions(+), 7 deletions(-)



Message-ID: <E1odmhl-00060i-FC@gemulon.postgresql.org>
Permalink:  ../E1odmhl-00060i-FC@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1odmhl-00060i-FC@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Introduce SYSTEM_USER
  In-Reply-To: <E1odmhl-00060i-FC@gemulon.postgresql.org>
  References: <E1odmhl-00060i-FC@gemulon.postgresql.org>

* 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