Re: SYSTEM_USER reserved word implementation - Mailing list pgsql-hackers

From Drouvot, Bertrand
Subject Re: SYSTEM_USER reserved word implementation
Date
Msg-id db5f852b-7e22-7b25-a0f3-5b4a67cd5be9@amazon.com
Whole thread Raw
In response to Re: SYSTEM_USER reserved word implementation  ("Drouvot, Bertrand" <bdrouvot@amazon.com>)
Responses Re: SYSTEM_USER reserved word implementation
List pgsql-hackers
Hi,

On 8/17/22 9:51 AM, Drouvot, Bertrand wrote:
> On 8/16/22 6:52 PM, Jacob Champion wrote:
>
>> And it would also be good to add a similar test to
>> the authentication suite, so that you don't have to have Kerberos
>> enabled to fully test SYSTEM_USER.
>
> Agree, I'll look at what can be done here.
>
I added authentication/t/003_peer.pl in 
v2-0006-system_user-implementation.patch attached.

It does the peer authentication and SYSTEM_USER testing with and without 
a user name map.

$ make -C src/test/authentication check PROVE_TESTS=t/003_peer.pl 
PROVE_FLAGS=-v

ok 1 - users with peer authentication have the correct SYSTEM_USER
ok 2 - parallel workers return the correct SYSTEM_USER when peer 
authentication is used
ok 3 - user name map is well defined and working
ok 4 - users with peer authentication and user name map have the correct 
SYSTEM_USER
ok 5 - parallel workers return the correct SYSTEM_USER when peer 
authentication and user name map is used
1..5
ok
All tests successful.

That way one could test the SYSTEM_USER behavior without the need to 
have kerberos enabled.

Regards,

-- 
Bertrand Drouvot
Amazon Web Services: https://aws.amazon.com

Attachment

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: POC: GROUP BY optimization
Next
From: Justin Pryzby
Date:
Subject: shadow variables - pg15 edition