Re: SYSTEM_USER reserved word implementation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SYSTEM_USER reserved word implementation
Дата
Msg-id 3484653.1655913147@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SYSTEM_USER reserved word implementation  (Jacob Champion <jchampion@timescale.com>)
Ответы Re: SYSTEM_USER reserved word implementation  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
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
returnNULL 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Devel docs on website reloading
Следующее
От: Joe Conway
Дата:
Сообщение: Re: SYSTEM_USER reserved word implementation