Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oAAq7-0002DU-HM for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Jul 2022 13:49:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oAAq6-0008KR-Eo for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Jul 2022 13:49:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oAAq5-0008KI-VX for pgsql-hackers@lists.postgresql.org; Sat, 09 Jul 2022 13:49:42 +0000 Received: from chandler.sharp.fm ([78.33.206.219]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oAAq0-0002BD-VL for pgsql-hackers@postgresql.org; Sat, 09 Jul 2022 13:49:40 +0000 Received: from smtpclient.apple (unknown [IPv6:2001:4d48:ad5d:6301:5d6d:34cf:cb46:1c6e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: minfrin@sharp.fm) by chandler.sharp.fm (Postfix) with ESMTPSA id 02F7459AC1; Sat, 9 Jul 2022 14:49:34 +0100 (BST) Authentication-Results: chandler.sharp.fm; arc=none smtp.client-ip=2001:4d48:ad5d:6301:5d6d:34cf:cb46:1c6e ARC-Seal: i=1; a=rsa-sha256; d=sharp.fm; s=default; t=1657374575; cv=none; b=XrlUtMc8DbiMXSdMX9HURqw8UOmEBQWdQDUqI8+yVkQ4iReToeA41UFwjF08N9iGt28tfFgu1t2nMouVk9Z+zaAoZTI6srcd/XP79Rljem530pRkcD4egEJeX3Fix/tAkmJ1CMHcKWaII9G7I3aPa7pce/hWaEa0ZDt1CLJEYYM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sharp.fm; s=default; t=1657374575; c=relaxed/simple; bh=gxOhC7l2d5PaFfcFFVdJKM9HUSKuf8xU+7qmMeJGWeQ=; h=DKIM-Filter:DKIM-Signature:Content-Type:Mime-Version:Subject:From: In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id: References:To:X-Mailer; b=FnocmdO6QG1LVs5AVN3XsrIqJNobNx8+tWNs+0yBgzGsyyIPkAZTepaaCBBLj0ABLdbAMY8PPy6nlrbSBW7A1gt8fe6I8Shqws0rRb44jsden0rOWSAErMUseXArn0HcaKgbDYg+9Pi6inTXJzYo8PL5nIAPLtGO7JMa7XZ6KGY= ARC-Authentication-Results: i=1; chandler.sharp.fm; arc=none smtp.client-ip=2001:4d48:ad5d:6301:5d6d:34cf:cb46:1c6e DKIM-Filter: OpenDKIM Filter v2.11.0 chandler.sharp.fm 02F7459AC1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharp.fm; s=default; t=1657374575; bh=gxOhC7l2d5PaFfcFFVdJKM9HUSKuf8xU+7qmMeJGWeQ=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=W82JG3b49XK4RzXbL7BSGNE9/pXV9cIDY5i89/F8V33GkZis4kzJ8sj+Pj2Etc9le GeAKAb7aOW7v8Be7hbsDgGMimVNj3yNyQWc8K1gnFwuKcfWiEsAnEvCwy2VuKEsqB8 HeqDmIcqdUPNIt2e0Zfy6XgNac6/wGGXzryznrIk= Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Subject: Re: [PATCH] Log details for client certificate failures From: Graham Leggett In-Reply-To: Date: Sat, 9 Jul 2022 15:49:34 +0200 Cc: Peter Eisentraut , PostgreSQL-development Content-Transfer-Encoding: quoted-printable Message-Id: <59BF2A64-05F6-4870-B7DB-3FE815682209@sharp.fm> References: <6EE6999E-0174-4B74-AC70-BE13F53E6827@sharp.fm> To: Jacob Champion X-Mailer: Apple Mail (2.3696.100.31) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 01 Jul 2022, at 22:59, Jacob Champion = wrote: >> I added this to httpd a while back: >>=20 >> SSL_CLIENT_CERT_RFC4523_CEA >>=20 >> It would be good to interoperate. >=20 > What kind of interoperation did you have in mind? Are there existing > tools that want to scrape this information for observability? This is for human troubleshooting. > I think the CEA syntax might not be a good fit for this particular > patch: first, we haven't actually verified the certificate, so no one > should be using it to assert certificate equality (and I'm truncating > the Issuer anyway, to avoid letting someone flood the logs). Second, > this is designed to be human-readable rather than machine-readable. This is what a CEA looks like: { serialNumber 400410167207191393705333222102472642510002355884, issuer = rdnSequence:=E2=80=9DCN=3DFoo UK G1,O=3DFoo,C=3DUK" } Whitespace and escaping is important above. When troubleshooting, you want a string like the above that you can cut = and paste and search for in other systems and log files. The = verification status of the cert isn=E2=80=99t an issue at this point, = you have a system in front of you where it doesn=E2=80=99t work when it = should, and you need to know exactly what=E2=80=99s connecting, not what = you think you=E2=80=99re connecting to, and you need precise data. Please don=E2=80=99t invent another format, or try and truncate the = data. This is a huge headache when troubleshooting. Regards, Graham =E2=80=94