From: Robbie Harwood <rharwood@redhat.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Stephen Frost <sfrost@snowman.net>
Subject: Re: [PATCH v12] GSSAPI encryption support
Date: Tue, 26 Jul 2016 11:22:24 -0400
Message-ID: <jlg7fc8fmq7.fsf@thriss.redhat.com> (raw)
In-Reply-To: <CAB7nPqSmq1tuVGoVQXVb86y9SoaM-wcMDxHD1of9dGc54QYNSQ@mail.gmail.com>
References: <jlg1tgq1ktm.fsf@thriss.redhat.com>
<jlgy48ssyvl.fsf@thriss.redhat.com>
<20160406112105.GG10850@tamriel.snowman.net>
<jlg1t6isftk.fsf@thriss.redhat.com>
<1530.1459977031@sss.pgh.pa.us>
<jlgy48qqt86.fsf@thriss.redhat.com>
<5486.1459984857@sss.pgh.pa.us>
<CAB7nPqRPK1f4oAStwsy_Ty_Cjjo8U50HF0bRZi86my7va4nVdg@mail.gmail.com>
<jlgk2hq3uvr.fsf@thriss.redhat.com>
<jlg7fc91lko.fsf@thriss.redhat.com>
<CAB7nPqSmq1tuVGoVQXVb86y9SoaM-wcMDxHD1of9dGc54QYNSQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Michael Paquier <michael.paquier@gmail.com> writes:
> On Tue, Jul 26, 2016 at 5:58 AM, Robbie Harwood <rharwood@redhat.com> wrote:
>> Robbie Harwood <rharwood@redhat.com> writes:
>
> Sorry for my late reply.
Thanks for the feedback!
>>> If I were to continue as I have been - using the plaintext connection
>>> and auth negotiation path - then at the time of startup the client has
>>> no way of knowing whether to send connection parameters or not.
>>> Personally, I would be in favor of not frontloading these connection
>>> parameters over insecure connections, but it is my impression that the
>>> project does not want to go this way (which is fine).
>
> Per the discussion upthread I got the opposite impression, the startup
> packet should be sent after the connection has been established. SSL
> does so: the SSL negotiation goes first, and then the startup packet
> is sent. That's the flow with the status changing from
> CONNECTION_SSL_START -> CONNECTION_MADE.
We are in agreement, I think. I have structured the referenced
paragraph badly: for this design, I'm suggesting separate GSS startup
path (like SSL) and once a tunnel is established we send the startup
packet. I probably should have just left this paragraph out.
>>> On the server, I'll need to implement `hostgss` (by analogy to
>>> `hostssl`), and we'll want to lock authentication on those connections
>>> to GSSAPI-only.
>
> As well as hostnogss, but I guess that's part of the plan.
Sure, `hostnogss` should be fine. This isn't quadratic, right? We don't
need hostnogssnossl (or thereabouts)?
>>> Clients will explicitly probe for GSSAPI support as they do for TLS
>>> support (I look forward to the bikeshed on the order of these) and
>>> should have a parameter to require said support. One thing I'm not
>>> clear on is what our behavior should be when the user doesn't
>>> explicitly request GSSAPI and doesn't have a ccache - do we prompt?
>>> Skip probing? I'm not sure what the best option there is.
>
> I am not sure I get what you mean here.
Okay. Let me try again:
So there's a connection setting `sslmode` that we'll want something
similar to here (`gssapimode` or so). `sslmode` has six settings, but I
think we only need three for GSSAPI: "disable", "allow", and "prefer"
(which presumably would be the default).
Lets suppose we're working with "prefer". GSSAPI will itself check two
places for credentials: client keytab and ccache. But if we don't find
credentials there, we as the client have two options on how to proceed.
- First, we could prompt for a password (and then call
gss_acquire_cred_with_password() to get credentials), presumably with
an empty password meaning to skip GSSAPI. My memory is that the
current behavior for GSSAPI auth-only is to prompt for password if we
don't find credentials (and if it isn't, there's no reason not to
unless we're opposed to handling the password).
- Second, we could skip GSSAPI and proceed with the next connection
method. This might be confusing if the user is then prompted for a
password and expects it to be for GSSAPI, but we could probably make
it sensible. I think I prefer the first option.
Thanks,
--Robbie
Attachments:
signature.asc (application/pgp-signature, 818B) download
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: rharwood@redhat.com, michael.paquier@gmail.com, tgl@sss.pgh.pa.us, sfrost@snowman.net
Subject: Re: [PATCH v12] GSSAPI encryption support
In-Reply-To: <jlg7fc8fmq7.fsf@thriss.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