Re: Where is SSPI auth username determined for TAP tests? - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Where is SSPI auth username determined for TAP tests?
Date
Msg-id 20190630014222.GA2286@paquier.xyz
Whole thread Raw
In response to Where is SSPI auth username determined for TAP tests?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Where is SSPI auth username determined for TAP tests?
List pgsql-hackers
On Sat, Jun 29, 2019 at 04:36:51PM -0400, Tom Lane wrote:
> I think this is likely a consequence of ca129e58c0 having modified
> 010_dump_connstr.pl to use "regress_postgres" not "postgres" as the
> bootstrap superuser name in the source cluster.  I suppose I overlooked
> some dependency on the user name that only affects SSPI ... but what?
> I don't see anything about the destination cluster configuration (which
> already used a nondefault superuser name) that I didn't replicate
> in the source cluster configuration.

Didn't you get trapped with something similar to what has been fixed
in d9f543e?  If you want pg_hba.conf to be correctly set up for SSPI
on Windows, you should pass "auth_extra => ['--create-role',
'regress_postgres']" to the init() method initializing the node.

Looking at the commit...
 my $node = get_new_node('main');
-$node->init(extra => [ '--locale=C', '--encoding=LATIN1' ]);
+$node->init(extra =>
+     [ '-U', $src_bootstrap_super, '--locale=C', '--encoding=LATIN1' ]);
[...]
 $node->run_log(
     [
        $ENV{PG_REGRESS}, '--config-auth',
    $node->data_dir,  '--create-role',
-       "$dbname1,$dbname2,$dbname3,$dbname4"
+       "$username1,$username2,$username3,$username4"
     ]);

This part is wrong and just needs to be updated to as
$src_bootstrap_super also gets its role added in --create-role, which
would set up pg_hba.conf as you would like.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Usage of epoch in txid_current
Next
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] proposal: schema variables