Re: [PoC] Let libpq reject unexpected authentication requests
Jacob Champion <jchampion@timescale.com>
From: Jacob Champion <jchampion@timescale.com>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Michael Paquier <michael@paquier.xyz>, "David G. Johnston" <david.g.johnston@gmail.com>
Date: 2022-10-20T18:36:34Z
Lists: pgsql-hackers
Attachments
- v11-0003-require_auth-decouple-SASL-and-SCRAM.patch (text/x-patch) patch v11-0003
- v11-0002-Add-sslcertmode-option-for-client-certificates.patch (text/x-patch) patch v11-0002
- v11-0001-libpq-let-client-reject-unexpected-auth-methods.patch (text/x-patch) patch v11-0001
On Wed, Oct 12, 2022 at 9:40 AM Jacob Champion <jchampion@timescale.com> wrote: > On 10/5/22 06:33, Peter Eisentraut wrote: > > I think it would be good to put some provisions in place here, even if > > they are elementary. Otherwise, there will be a significant burden on > > the person who implements the next SASL method (i.e., you ;-) ) to > > figure that out then. > > Sounds good, I'll work on that. v10 does not yet make changes in this area. v11 makes an attempt at this (see 0003), using the proposed string list. Personally I'm not happy with the amount of complexity it adds in exchange for flexibility we can't use yet. Maybe there's a way to simplify it, but I think the two-tiered approach of the patch has to remain, unless we find a way to move SASL mechanism selection to a different part of the code. I'm not sure that'd be helpful. Maybe I should just add a basic Assert here, to trip if someone adds a new SASL mechanism, and point that lucky person to this thread with a comment? --Jacob
Commits
-
libpq: Add sslcertmode option to control client certificates
- 36f40ce2dc66 16.0 landed
-
Rewrite error message related to sslmode in libpq
- bcaa1fafc82f 16.0 landed
-
libpq: Add support for require_auth to control authorized auth methods
- 3a465cc6783f 16.0 landed
-
Run pgindent on libpq's fe-auth.c, fe-auth-scram.c and fe-connect.c
- b6dfee28f2b4 16.0 landed