Re: Add "password_protocol" connection parameter to libpq

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, Stephen Frost <sfrost(at)snowman(dot)net>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Add "password_protocol" connection parameter to libpq
Date: 2019-08-09 23:54:14
Message-ID: a977da04af60668c487a7a21abbcbb87b9ea8344.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 2019-08-10 at 00:17 +0300, Heikki Linnakangas wrote:
> This is a multi-dimensional problem. "channel_binding=require" is
> one
> way to prevent MITM attacks, but sslmode=verify-ca is another. (Does
> Kerberos also prevent MITM?) Or you might want to enable plaintext
> passwords over SSL, but not without SSL.
>
> I think we'll need something like the 'ssl_ciphers' GUC, where you
> can
> choose from a few reasonable default rules, but also enable/disable
> specific methods:

..

> auth_methods = 'MITM, -password, -md5'

Keep in mind this is client configuration, so something reasonable in
postgresql.conf might not be so reasonable in the form:

postgresql://foo:secret(at)myhost/mydb?auth_methods=MITM%2C%20-
password%2C%20-md5

Another thing to consider is that there's less control configuring on
the client than on the server. The server will send at most one
authentication request based on its own rules, and all the client can
do is either answer it, or disconnect. And the SSL stuff all happens
before that, and won't use an authentication request message at all.

Some protocols allow negotiation within them, like SASL, which gives
the client a bit more freedom. But FE/BE doesn't allow for arbitrary
subsets of authentication methods to be negoitated between client and
server, so I'm worried trying to express it that way will just lead to
clients that break when you upgrade your server.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2019-08-10 00:03:40 Re: Add "password_protocol" connection parameter to libpq
Previous Message Thomas Munro 2019-08-09 23:50:56 Re: Locale support