Re: SSPI auth and mixed case usernames - Mailing list pgsql-general

From Magnus Hagander
Subject Re: SSPI auth and mixed case usernames
Date
Msg-id CABUevEwMoyYQMGByTQ33Lwrdw7D2=i0r7RwNYAoWmgaUPsWGoQ@mail.gmail.com
Whole thread Raw
In response to SSPI auth and mixed case usernames  (Niels Jespersen <NJN@dst.dk>)
List pgsql-general

On Fri, Aug 30, 2019 at 3:00 PM Niels Jespersen <NJN@dst.dk> wrote:
Hello Magnus

Thank you for your prompt reply. 

I’m not sure I understand your last statement. I want to achieve that regardless of the case of the entered username is logged into the same Postgres user (whose name is created in all lowercase).

In other words, Windows usernames one day entered as XYz, the next day entered as xYz, should logon to Postgres user xyz.


Right. The client application needs to enforce that the usernamed passed to PostgreSQL is lowercased before it tries to connect. The only thing pg_ident mapping does is make sure that it actually works  when the client application does this, but it's the client that has to do it.

For example, if using psql you can't say "psql -h myserver.domain.com -d mydatabase", you have to explicitly say "psql -h myserver.domain.com -d mydatabase -U mylowercaseusername"

//Magnus
 

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: "storing" a calculated value in plsql function ?
Next
From: Steven Lembark
Date:
Subject: Re: Work hours?