Re: [PATCH] Log details for client certificate failures
Jacob Champion <jchampion@timescale.com>
From: Jacob Champion <jchampion@timescale.com>
To: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2022-07-19T16:07:31Z
Lists: pgsql-hackers
Attachments
- 0001-Don-t-reflect-unescaped-cert-data-to-the-logs.patch (text/x-patch) patch 0001
On Fri, Jul 15, 2022 at 4:45 PM Andres Freund <andres@anarazel.de> wrote: > On 2022-07-15 14:51:38 -0700, Jacob Champion wrote: > > That seems much worse than escaping for this particular patch; if your > > cert's Common Name is in (non-ASCII) UTF-8 then all you'll see is > > "CN=?????????" in the log lines that were supposed to be helping you > > root-cause. Escaping would be much more helpful in this case. > > I'm doubtful that's all that common. Probably not, but the more systems that support it without weird usability bugs, the more common it will hopefully become. > But either way, I suggest a separate patch to deal with that... Proposed fix attached, which uses \x-escaping for bytes outside of printable ASCII. Thanks, --Jacob
Commits
-
Fix tiny memory leaks
- a9d58bfe8a3a 16.0 landed
-
Don't reflect unescaped cert data to the logs
- 257eb57b50f7 16.0 landed
-
pg_clean_ascii(): escape bytes rather than lose them
- 45b1a67a0fcb 16.0 landed
-
Log details for client certificate failures
- 3a0e385048ad 16.0 landed