pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robbie Harwood <rharwood@redhat.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Stephen Frost <sfrost@snowman.net>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: weird libpq GSSAPI comment
Date: Fri, 03 Jan 2020 15:01:25 -0500
Message-ID: <jlgsgkwqpgq.fsf@redhat.com> (raw)
In-Reply-To: <20191227202332.GA20278@alvherre.pgsql>
References: <20191227202332.GA20278@alvherre.pgsql>

Alvaro Herrera <alvherre@2ndquadrant.com> writes:

> How about this?
>
>                  * If GSSAPI is enabled and we can reach a credential cache,
>                  * set up a handle for it; if it's operating, just send a
>                  * GSS startup message, instead of the SSL negotiation and
>                  * regular startup message below.

Due to the way postgres handled this historically, there are two ways
GSSAPI can be used: for connection encryption, and for authentication
only.  We perform the same dance of sending a "request packet" for
GSSAPI encryption as we do for TLS encryption.  So I'd like us to be
precise about which one we're talking about here (encryption).

The GSSAPI idiom I should have used is "can acquire credentials" (i.e.,
instead of "can reach a credential cache" in your proposal).

There's no such thing as a "GSS startup message".  After negotiating
GSSAPI/TLS encryption (or failing to do so), we send the same things in
all cases, which includes negotiation of authentication mechanism if
any.  (Negotiating GSSAPI for authentication after negotiating GSSAPI
for encryption will short-circuit rather than establishing a second
context, if I remember right.)

I wonder if part of the confusion might be due to the synonyms we're
using here for "in use".  Things seem to be "got running", "set up",
"operating", "negotiated", ... - maybe that's part of the barrier to
understanding?

Thanks,
--Robbie

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (11+ messages)  latest in thread

Message-ID: <jlgsgkwqpgq.fsf@redhat.com>
Permalink:  ../jlgsgkwqpgq.fsf@redhat.com/
Also on:    postgresql.org/message-id/jlgsgkwqpgq.fsf@redhat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: rharwood@redhat.com, alvherre@2ndquadrant.com, sfrost@snowman.net
  Subject: Re: weird libpq GSSAPI comment
  In-Reply-To: <jlgsgkwqpgq.fsf@redhat.com>
  References: <20191227202332.GA20278@alvherre.pgsql> <jlgsgkwqpgq.fsf@redhat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox