Re: [PATCH] Add peer authentication TAP test

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PATCH] Add peer authentication TAP test
Дата
Msg-id YzPhGhI0dyC4/IAG@paquier.xyz
обсуждение исходный текст
Ответ на [PATCH] Add peer authentication TAP test  ("Drouvot, Bertrand" <bdrouvot@amazon.com>)
Ответы Re: [PATCH] Add peer authentication TAP test  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Список pgsql-hackers
On Fri, Aug 26, 2022 at 10:43:43AM +0200, Drouvot, Bertrand wrote:
> During the work in [1] we created a new TAP test to test the SYSTEM_USER
> behavior with peer authentication.
>
> It turns out that there is currently no TAP test for the peer
> authentication, so we think (thanks Michael for the suggestion [2]) that
> it's better to split the work in [1] between "pure" SYSTEM_USER related work
> and the "pure" peer authentication TAP test work.
>
> That's the reason of this new thread, please find attached a patch to add a
> new TAP test for the peer authentication.

+# Get the session_user to define the user name map test.
+my $session_user =
+  $node->safe_psql('postgres', 'select session_user');
[...]
+# Define a user name map.
+$node->append_conf('pg_ident.conf', qq{mypeermap $session_user testmap$session_user});
+
+# Set pg_hba.conf with the peer authentication and the user name map.
+reset_pg_hba($node, 'peer map=mypeermap');

A map consists of a "MAPNAME SYSTEM_USER PG_USER".  Why does this test
use a Postgres role (from session_user) as the system user for the
peer map?
--
Michael

Вложения

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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Fix some newly modified tab-complete changes
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Extend win32 error codes to errno mapping in win32error.c