0

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

asked Jul 21, 2019 at 8:57

1 Answer 1

0

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".

answered Jul 21, 2019 at 16:49
4
  • thanks for the answer. I tried with domainname part added but didn't work. DB username is all lower case. Commented Jul 22, 2019 at 8:15
  • The error message is showing the attempted username as mixed case. Commented Jul 22, 2019 at 10:59
  • but isn't it suppose to map it to lowercase provided. thanks Commented Jul 22, 2019 at 12:41
  • Mapping to lower case for unquoted SQL identifiers is done inside the database. You are not inside the database until after the connection is established, you are outside of it. (And if it did map to lower case, I think the error message would have reflected that.) Commented Jul 22, 2019 at 20:21

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.