Since we need to add user name in the command, which is not we want, I removed the map in the pg_ident.conf file, and created role xxx@COMPANY.COM in postgresql
the pg_hba.conf looks like:
host all all all gss include_realm=1
in pg_ident.conf, I removed all items
in postgresql, I create role
create role "xxx@COMPANY.COM" login
I thought it would work, because my credential is xxx@COMPANY.COM, and there was user xxx@COMPANY.COM in postgresql, it should map the my credential to user xxx@COMPANY.COM.
however, when I login with kerberos, I got error below on server side
LOG: provided user name (xxx) and authenticated user name (xxx@COMPANY.COM) do not match
FATAL: GSSAPI authentication failed for user "xxx"
Do anyone know why it doesn't work? thanks
James
From: jamesxu@outlook.com
To: magnus@hagander.net
CC: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Postgresql gss user map doesn't work
Date: Wed, 1 Jul 2015 09:09:28 -0400
Thanks Magnus, you are awesome!
James
Date: Wed, 1 Jul 2015 08:38:45 +0200
Subject: Re: [ADMIN] Postgresql gss user map doesn't work
From: magnus@hagander.net
To: jamesxu@outlook.com
CC: pgsql-admin@postgresql.org