Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wVaH1-0023yd-2z for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Jun 2026 19:32:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wVaH0-00EDUZ-2n for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Jun 2026 19:32:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wVaH0-00EDUR-1q for pgsql-hackers@lists.postgresql.org; Fri, 05 Jun 2026 19:32:06 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wVaGy-00000001Huc-1OWs for pgsql-hackers@lists.postgresql.org; Fri, 05 Jun 2026 19:32:05 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id A63B2609392 for ; Fri, 05 Jun 2026 21:32:01 +0200 (CEST) Received: from s899.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id 9288960991A; Fri, 05 Jun 2026 21:32:01 +0200 (CEST) Received: from localhost (unknown [172.22.191.5]) by s899.loopia.se (Postfix) with ESMTP id 900352C8BA50; Fri, 05 Jun 2026 21:32:01 +0200 (CEST) X-Virus-Scanned: amavis at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s471.loopia.se (amavis); dkim=pass (2048-bit key) header.d=yesql.se Received: from s981.loopia.se ([172.22.191.6]) by localhost (s471.loopia.se [172.22.190.35]) (amavis, port 10024) with LMTP id MK4U14bd0wUH; Fri, 5 Jun 2026 21:32:01 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.236 Received: from smtpclient.apple (customer-89-255-232-236.stosn.net [89.255.232.236]) (Authenticated sender: daniel@yesql.se) by s981.loopia.se (Postfix) with ESMTPSA id 1385122B1761; Fri, 05 Jun 2026 21:32:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1780687921; bh=1BQ7dlKRVHjSniA0I93oJa9u1KVNLIUK4Mwj9KAxX7Q=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=D6DYsGY9Y61Cc/ld1cIN1UUIkqDZ/9Q7hIoU+NVWWA2v3mpvT96/2QwqDAN+NGPhn g2aGPJUJm7LnUjxsfcXnuP33pFMYiBAH3BYF+CXn9Vg9C/Yeq0Oz5WZOT8LwNmIA28 V7i8iuAe+mL82CNkQNN3JMZhLDkJJTUg+AuMHNnQf5Zwc1JhugDlgA+7lct4stceoP 6nJ9ZIulJq6jR2MXJWt/dC5J1l2gTTnCtV0HuUlzDnkq8cwxlUPBALnrhOsUWgJRgz eLvIgJS5qt9kI5TkcB8X0S4m9KwGQvC9wNQe/rywJ0jOIvU1bdTBFhWyewAXw1H3hr Zly+FaZ81kQsA== Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.12\)) Subject: Re: Fix OAuth validator docs for error_detail on internal errors From: Daniel Gustafsson In-Reply-To: <28A71A53-EB55-4A29-8C20-BBAF1BC82D2A@gmail.com> Date: Fri, 5 Jun 2026 21:31:50 +0200 Cc: Postgres hackers , Jacob Champion Content-Transfer-Encoding: quoted-printable Message-Id: References: <0281836A-F5FF-41A5-9EE1-656C1FAAC6B2@gmail.com> <28A71A53-EB55-4A29-8C20-BBAF1BC82D2A@gmail.com> To: Chao Li X-Mailer: Apple Mail (2.3776.700.51.11.12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 5 Jun 2026, at 00:21, Chao Li wrote: >> On Jun 5, 2026, at 04:19, Daniel Gustafsson wrote: >>=20 >>> On 4 Jun 2026, at 14:33, Chao Li wrote: >>=20 >>> =E2=80=9CAny result parameters are ignored=E2=80=9D is no longer = accurate; it should be something like =E2=80=9Cany result parameters = except result->error_detail are ignored=E2=80=9D. This patch just makes = that tiny doc fix. >>=20 >> That's true, but error_detail is explained in detail in the next = paragraph so >> I'm not sure this change is needed. >=20 > Agreed. Adding the =E2=80=9Cexception for result->error_detail=E2=80=9D = sounds a bit redundant with the next paragraph. But =E2=80=9Cany result = parameters are ignored=E2=80=9D also seems to conflict with the next = paragraph, so I think we can just delete that part. >=20 > ValidatorModuleResult has three fields, so the logic is: >=20 > * The first paragraph talks about authorized and authn_id when the = validator succeeds. > * The second paragraph talks about the validator=E2=80=99s return = values. > * The third paragraph talks about result->error_detail when the = validator fails. >=20 >> Another thing we don't explicitly document which seems more = interesting is that >> authn_id is used even in case of failure if log_connections is = enabled. Maybe >> that deserves a mention? >=20 > This is a good point. I added that in v2. This version looks good to me, the authn_id sentence is a bit long so I = might do some careful rewording before pushing. -- Daniel Gustafsson