Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WIM3Q-0002CM-7X for pgsql-bugs@arkaria.postgresql.org; Tue, 25 Feb 2014 17:44:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WIM3P-0003BZ-NY for pgsql-bugs@arkaria.postgresql.org; Tue, 25 Feb 2014 17:44:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WIM3O-0003BS-LS for pgsql-bugs@postgresql.org; Tue, 25 Feb 2014 17:44:26 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WIM3M-0005yx-2M for pgsql-bugs@postgresql.org; Tue, 25 Feb 2014 17:44:26 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id DFF715F7C9; Tue, 25 Feb 2014 12:45:20 -0500 (EST) Date: Tue, 25 Feb 2014 12:45:20 -0500 From: Stephen Frost To: Brian Crowell Cc: Tom Lane , pgsql-bugs Subject: Re: BUG #9337: SSPI/GSSAPI with mismatched user names Message-ID: <20140225174520.GC2921@tamriel.snowman.net> References: <9531.1393275398@sss.pgh.pa.us> <10402.1393278034@sss.pgh.pa.us> <13625.1393288243@sss.pgh.pa.us> <20140225170738.GA2921@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RrWClU6yxnVCUwg6" 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: 12:41:47 up 26 days, 19:40, 7 users, load average: 0.03, 0.05, 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 --RrWClU6yxnVCUwg6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Brian Crowell (brian@fluggo.com) wrote: > On Tue, Feb 25, 2014 at 11:07 AM, Stephen Frost wrot= e: > > On the other hand, Magnus removing the krb5 auth method also removed > > krb_server_hostname.. I'll ask him about that because we should > > probably make that available under 'gss' or we may end up leaving some > > of our users out in the cold when 9.4 comes out and that'd be quite > > unfortuante. >=20 > I'd be interested in why the principal needs to be specified ahead of > time, since it arrives in the ticket. Is it a limitation of the > Kerberos APIs? Or maybe it's to prevent using a different key from the > key file? Yeah, I'm pretty sure you have to set up the server-side stuff before you can actually pass control to GSSAPI (really, the whole thing is insane because GSSAPI actually wants to control the socket on both ends to do whatever communication it needs to with it, so that's why you set everything up, pass control of the socket to the GSSAPI library on both sides, and then check what answer you get back from it at the end). Note that the princ we're talking about here is the *server-side* princ, not the client-side one. > > If we decide to allow an option where we use the 'default cred' in > > GSSAPI to also determine the PG username we are authenticating to, we'll > > want to think about how we support that in libpq and psql and consider > > what to do about the limitations of not being able to specify different > > krb_server_hostname depending on the user which is attempting to > > authenicate. >=20 > I figured this would be an optional extension, something you could > request in the initial packet. You would explicitly ask for it using > some special invocation of psql, like "psql -K" the way ssh does. As > such, if there are going to be limitations, you could just choose to > authenticate the normal way. That sounds reasonable to me. Thanks! Stephen --RrWClU6yxnVCUwg6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJTDNawAAoJEO1sijiDR2RVjDUQAMID1q7Y+fCoS2KYVTNkHWmy c9vkvNC/1CQwXplLDf6HH5f9b9nvEQoLlShLPZ+6TNTlOL6i0pv+Loxrsx0jPRu7 Yn/V6FqB8UrJT8nJieKjbgtFpD/P4gOonSYIW5Nsp7yTGc1V5+wTdUefTwvcVH/t ErVJOVu/myE8eWQDCvPWD5BgjywbpUZZY3rNwzGDK6KK9d0rdVsYDmfq+mmb6Qhp SvnEi6zDCEMy/5xQIfSSzBTng3CRKU0I4g8wkdH3/1aK/D/tDxWpmiCtE6hn5Exh etLvX+ejyvk78YhDI97V2k/HizO0Gbya/iwdrFRUftn3CyZc/AvcPEXTXai+MqZf KYPHsDaqOwhoiMQsoQcsnPRvyclnHvTdY/7pbfy8OyfoyOOmqGuawCW2dnJ+l9jJ A0KyigMjF3We0rmF7vhsWUXtFTbzA9YetZuYN7EKogf6scYeR2Hxov+pGC/iet1p IH5RtiLvAO/ktu+Vx4IM2difeg46HOKgXEdHXEsD6+d6F06Jbwvij0hcn64ChcF/ HyNayE8OTFPeBxsNd1mN2Ovs+Mp5IcPGhFNBYMWFqVDnwuJzfzYePEAHn9/2FKWC 1Y0EHb3tSc69RYxtsKW6RN5duKtHAlR0ppm13uOWhInCKVeTVi+RmuYhQqSfA7rM lMdEKvFNgSnif7/Q0UYm =5zeC -----END PGP SIGNATURE----- --RrWClU6yxnVCUwg6--