Postgresql 11 SSPI authentication failing

authenticationpostgresql

On windows 2016 in AD setup when I try to use SSPI with postgresql 11 and following settings :

pg_hba.conf:

host    all all 127.0.0.1/32    sspi    map=newmap #IP4

pg_ident.conf:

newmap  SrvSupportPsgr  srvsupportpsgr

log:

Log: no match in usermap "newmap" for user "SrvSupportPsgr" authenticated as "SrvSupportPsgr@domainname"

FATAL: SSPI authentication failed for user "SrvSupportPsgr"

this account has superuser on postgres and local admin + domain user on AD.
I have tried putting usernames in double quotes as well.
thanks

Best Answer

If you are authenticated as "SrvSupportPsgr@domainname", then that is what needs to be in the 2nd column of pg_ident.conf; including the "@domainname" part. (Or it could be a regexp which matches to that)

Also, pg_ident.conf is case sensitive. In the third column, "SrvSupportPsgr" is not the same thing as "srvsupportpsgr".