Re: GSSAPI server side on Linux, SSPI client side on Windows - Mailing list pgsql-general

From Brian Crowell
Subject Re: GSSAPI server side on Linux, SSPI client side on Windows
Date
Msg-id CAAQkdDqDsGSReMPQBEYRiTC_BR=BGZgK=LkWi15Y1Qqv0GUyBA@mail.gmail.com
Whole thread Raw
In response to Re: GSSAPI server side on Linux, SSPI client side on Windows  (Christian Ullrich <chris@chrullrich.net>)
List pgsql-general
On Tue, Nov 12, 2013 at 10:03 AM, Christian Ullrich
<chris@chrullrich.net> wrote:
> Pseudocode:
>
> n = GetUserNameEx(NameSamCompatible)                    // "logon screen" case
> NameTranslate.Set(ADS_NAME_TYPE_NT4, n)
> n = NameTranslate.Get(ADS_NAME_TYPE_DOMAIN_SIMPLE)      // "official" case
> n = n.CutAtTheAtSign()
> db.Connect("DSN=foo;UID=" + n)
>
> To get a usable realm name, ADS_NAME_TYPE_USER_PRINCIPAL_NAME is probably more correct.
>
> This works if the role name in pg_authid matches the user name in the directory, case-wise. It cannot be shortened to
GetUserNameEx(NameUserPrincipal)because that also returns "logon screen" case. 

I don't see any reason this can't be put in Npgsql. If the username
isn't supplied, the NpgsqlConnectionStringBuilder guesses it in the
UserName property. I'm going to make it guess correctly.

—Brian


pgsql-general by date:

Previous
From: dinesh kumar
Date:
Subject: Re: select Xpath is returning values with {}
Next
From: "GRIFFITHS H.P."
Date:
Subject: Re: Cannot import logs from csv