Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WI0m3-0006UH-DT for pgsql-bugs@arkaria.postgresql.org; Mon, 24 Feb 2014 19:01:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WI0m2-0005N3-I1 for pgsql-bugs@arkaria.postgresql.org; Mon, 24 Feb 2014 19:01:06 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WI0m0-0005Ju-PN for pgsql-bugs@postgresql.org; Mon, 24 Feb 2014 19:01:04 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WI0ly-0001Dw-DO for pgsql-bugs@postgresql.org; Mon, 24 Feb 2014 19:01:04 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 4A2095F7D7; Mon, 24 Feb 2014 14:01:59 -0500 (EST) Date: Mon, 24 Feb 2014 14:01:59 -0500 From: Stephen Frost To: Brian Crowell Cc: Tom Lane , pgsql-bugs@postgresql.org Subject: Re: BUG #9337: SSPI/GSSAPI with mismatched user names Message-ID: <20140224190159.GO2921@tamriel.snowman.net> References: <20140224183440.1162.91110@wrigleys.postgresql.org> <5500.1393267495@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zlZNH2uO67L3peLA" 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: 13:59:19 up 25 days, 20:58, 7 users, load average: 0.00, 0.04, 0.05 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 --zlZNH2uO67L3peLA 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 12:50 PM, Brian Crowell wrote: > > 2014-02-24 11:30:40 CST LOG: provided user name (Brian) and > > authenticated user name (BCrowell@REALM.COM) do not match > > > > But the Kerberos ticket is perfectly valid, and matches a Postgres > > user. In this case, the program attempting to log in is incapable of > > determining the correct Postgres user name to send (see Npgsql bug for > > the dirty details), so why not just accept the Kerberos principal > > name? >=20 > Or in other words, I'm trying to log in as the Postgres user > "BCrowell@REALM.COM" (which is in the Kerberos ticket), and not as > "Brian" (which is in the startup packet, because Npgsql doesn't know > what else to do). To PG, you're trying to log in as PG user 'Brian' and there's no mapping which allows the kerb princ "BCrowell@REALM.COM" to log in as that user. Also, is the PG user really "BCrowell@REALM.COM", or is it actually 'bcrowell', in which case you need a mapping for that (unless you tell PG to just strip the realm off, but I generally recommend against such since you can end up with cross-realm issues if you ever define a trust relationship to another realm with different users who might have the same princs as your local users). Thanks, Stephen --zlZNH2uO67L3peLA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJTC5cmAAoJEO1sijiDR2RV9VUP/3dZQ1bzGo4JfR7TTQQOdjCv dK/nCw7/c0czs+5snk7tzLthXKVWC74KehJI6e5mr7Q0ghESxmdLDPYb/sjPCmR4 4zedBBuV85q/kj2NS2OEmmmDDmp9utmK1G0+99sXiUAClg6sh6FNCWKaOwr/Q6q7 6Q8xlHYoPTJ3scwoJE36L1S4jAuqUNPthnfTaCCTltU1ouMwB5IMQIXudC3heCHP o6d7WlW4ytnsIqVMerPIlf74OOe00xb0/ejeyRxzKuQ3Krzo8e6rscgFP6swUnhi xzbsOhTb/j7tNxo+Qbodo8Dc2iOESjawvpQFzGHmSZjw0ol2IYnQ2LUcP3lOj0+2 UKm/eRKV84cJpks5fbrLpCpNkI1RhkIkwJt10uVjHDgKNOCigd3FMmCUeGbaI6M5 aY0RGWx1cMbhkK57V5tCg2TKmZPgXA0nHJRRnEgnNh04Pc2jRORgGVVp2JMkbDmM jIcxeGsP9xjpePWizaGAngopzlye0zGlTZemP5cxt7LfPAUAIIMf6Oz75/WhhIyv IjdL6dUm3m4hrYoOc9mtPrDl74GQ0VrqjqiGG0+h9q/AjxwXj22fJSNC29gEfixb KZbUnR9nNNNxZQgkaWau+bizmRmp9W9xM3m+jeZGr5NVhxKjSr+Qa6I7+TiBgGTx vRh9il/3lp2WwAzwtTYq =gC8l -----END PGP SIGNATURE----- --zlZNH2uO67L3peLA--