pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jacob Champion <jchampion@timescale.com>
Cc: Joe Conway <mail@joeconway.com>
Cc: Drouvot, Bertrand <bdrouvot@amazon.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: SYSTEM_USER reserved word implementation
Date: Wed, 22 Jun 2022 11:52:27 -0400
Message-ID: <3484653.1655913147@sss.pgh.pa.us> (raw)
In-Reply-To: <CAAWbhmj=zsgBac593B4RdHTNVVNUFedgQ2CH-h9STD7USSMqTw@mail.gmail.com>
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>
	<CAAWbhmj=zsgBac593B4RdHTNVVNUFedgQ2CH-h9STD7USSMqTw@mail.gmail.com>

Jacob Champion <jchampion@timescale.com> writes:
> On Wed, Jun 22, 2022 at 8:10 AM Joe Conway <mail@joeconway.com> wrote:
>> In case port->authn_id is NULL then the patch is returning the SESSION_USER for the SYSTEM_USER. Perhaps it should return NULL instead.

> If the spec says that SYSTEM_USER "represents the operating system
> user", but we don't actually know who that user was (authn_id is
> NULL), then I think SYSTEM_USER should also be NULL so as not to
> mislead auditors.

Yeah, that seems like a fundamental type mismatch.  If we don't know
the OS user identifier, substituting a SQL role name is surely not
the right thing.

I think a case could be made for ONLY returning non-null when authn_id
represents some externally-verified identifier (OS user ID gotten via
peer identification, Kerberos principal, etc).

			regards, tom lane





view thread (42+ messages)  latest in thread

Message-ID: <3484653.1655913147@sss.pgh.pa.us>
Permalink:  ../3484653.1655913147@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3484653.1655913147@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, jchampion@timescale.com, mail@joeconway.com, bdrouvot@amazon.com
  Subject: Re: SYSTEM_USER reserved word implementation
  In-Reply-To: <3484653.1655913147@sss.pgh.pa.us>
  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> <CAAWbhmj=zsgBac593B4RdHTNVVNUFedgQ2CH-h9STD7USSMqTw@mail.gmail.com> <3484653.1655913147@sss.pgh.pa.us>

* 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