Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WI1Aq-0007UJ-IJ for pgsql-bugs@arkaria.postgresql.org; Mon, 24 Feb 2014 19:26:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WI1Aq-0006Iw-2o for pgsql-bugs@arkaria.postgresql.org; Mon, 24 Feb 2014 19:26:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WI1Ap-0006Iq-CU for pgsql-bugs@postgresql.org; Mon, 24 Feb 2014 19:26:43 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WI1Ai-0006UH-Js for pgsql-bugs@postgresql.org; Mon, 24 Feb 2014 19:26:43 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id ED4125F7D7; Mon, 24 Feb 2014 14:27:32 -0500 (EST) Date: Mon, 24 Feb 2014 14:27:32 -0500 From: Stephen Frost To: Brian Crowell Cc: Tom Lane , pgsql-bugs Subject: Re: BUG #9337: SSPI/GSSAPI with mismatched user names Message-ID: <20140224192732.GQ2921@tamriel.snowman.net> References: <20140224183440.1162.91110@wrigleys.postgresql.org> <5500.1393267495@sss.pgh.pa.us> <6076.1393269048@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2+ZhP/dWvHcZgqpy" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.8.0-35-generic (x86_64) X-Uptime: 14:24:18 up 25 days, 21:23, 7 users, load average: 0.10, 0.08, 0.08 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --2+ZhP/dWvHcZgqpy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Brian Crowell (brian@fluggo.com) wrote: > On Mon, Feb 24, 2014 at 1:10 PM, Tom Lane wrote: > > Why exactly doesn't Npgsql know what the Kerberos principal name is? > > How did it obtain the ticket without knowing that? >=20 > Windows obtained the ticket, not Npgsql. It's attached to my logon > token without Npgsql's help. If I'm on the domain, I _might_ have > access to that information through a call to LsaGetLogonSessionData or > similar. If I'm not on the domain, I definitely don't. >=20 > Npgsql is just asking Windows to do GSSAPI auth on its behalf, so it > never really touches that info. I seem to recall that, at one point, we actually we doing this automatically in libpq- that is, grabbing the Kerberos princ and then using it to auth. That was too constrained though, as we wanted to be able to have users with names other than their princs, but perhaps we should have just made it optional instead, perhaps using an environment variable. Would that work for you and the general users? I'm on the fence about making that the default again since it's possible we would break things for existing users... Thanks, Stephen --2+ZhP/dWvHcZgqpy Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJTC50kAAoJEO1sijiDR2RVW3UP/3iITl0jgrJbnunKBLIOzs9s 2udGVv6aSI3B66V/qclIaIR0tN2fvvkr53L0JYdFNeL4KwwbPlgI3IemMW48ugT3 OCE/zyb67I7HonRwuYPcDLANlJMrdB8esFcftUVHmzCZneglgaSUuxJHQ6PxP4Xe SDenDoujv8nkGnKRf39Lp03EWqx1kRp6NefwBnlPEYPJwJcqLBXD/Sz1t2opAV9X xTh/qH7LfO2Zk7Absietc+V2fdL8agAD0wkJYf0Pxm5+N7CzzPEObwrFYicyrRR1 cAPflPUBP6HssEeki0hDlorikWsQr0EbkS6Yl0mO2RvOlk+SpyMTzy/4TiNP4cP+ Vj9LWV5gB5Rsenklt/zM+wClH4fwy/NSUpJy//X+izCLUDyEakQANcwFlf0VOicC R1gGQUer+NCbC/FNZlsU3nmWW7IL0hyIxecZqf3abv5GfmXKxygjrg56l7JZjDi6 cqOjQn3rNPkcHuu52OkSrXCt8XZU1vnuzv8OWP8r0mV0MPL3/StHlnPPwbqD4efx 1xEGwNk0sk+3RV9RMQ2tyRUoSK8gVJPuclWp84VBzvPkqzvPHfR3Gs2QfjFRX3ra vrh3qYsvSWQnUJJ+/qie/sIcdPGOrZg8vGj/hmYkIsPNgq8dzD8uHvFr5il39n57 pQyIaIvHilvIfGzU/98S =A2o3 -----END PGP SIGNATURE----- --2+ZhP/dWvHcZgqpy--