Re: [PoC] Let libpq reject unexpected authentication requests - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PoC] Let libpq reject unexpected authentication requests
Date
Msg-id 4070201.1646493140@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PoC] Let libpq reject unexpected authentication requests  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 3/4/22 20:19, Tom Lane wrote:
>> Seems reasonable, but I bet that for very little more code you could
>> accept a comma-separated list of allowed methods; libpq already allows
>> comma-separated lists for some other connection options.  That seems
>> like it'd be a useful increment of flexibility.

> Just about necessary I guess, since you can specify that a client cert
> is required in addition to some other auth method, so for such cases you
> might want something like "required_auth=cert,scram-sha-256"? Or do we
> need a way of specifying the combination?

I'd view the comma as strictly meaning OR, so that you might need some
notation like "required_auth=cert+scram-sha-256" if you want to demand
ANDed conditions.  It might be better to handle TLS-specific
conditions orthogonally to the authentication exchange, though.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: SQL/JSON: functions
Next
From: Jeff Davis
Date:
Subject: Re: Proposal: Support custom authentication methods using hooks