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 1vkUti-00GCet-2D for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Jan 2026 22:17:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vkUth-00Avrx-1w for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Jan 2026 22:17:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vkUth-00Avrp-0v for pgsql-hackers@lists.postgresql.org; Mon, 26 Jan 2026 22:17:25 +0000 Received: from mail-qv1-xf2e.google.com ([2607:f8b0:4864:20::f2e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vkUte-00000000bmm-28e8 for pgsql-hackers@lists.postgresql.org; Mon, 26 Jan 2026 22:17:24 +0000 Received: by mail-qv1-xf2e.google.com with SMTP id 6a1803df08f44-88ffcb14e11so83739186d6.0 for ; Mon, 26 Jan 2026 14:17:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769465840; cv=none; d=google.com; s=arc-20240605; b=EbkNiORT15PE5KiodskcGV3mqevv8q7poJ9Sw5AEYCaACLpTqoYDA51zc0s7N/Gsqw 2DnoPYYE01nJa0tkqFDiXk6g3jrg2yxx8aDNIKr7TuwPei2JFV9TfP8yjfdAk356bx+W hqoZ29CZBS1Mt9PEEmJ9s3ZTnI8M1gQZ4KOrV0+S6joKKnZBEfTTHM39AQqG6v3T9eW6 r76J6wAMUsbkykXAMmO60dyVoRSfmfBPLYPWpxZuB9BOiU5IcZ6sqa2hIRxvE5U+Ya9W pQlthXRD826FjJedIJwOEHUKIQ36FY5Q3C5cuk5lIUghE8vsXGZanoxshuNt3CgjsSSi oiCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=oJZcYjEgTxyuv288TK0sXFGxdbth0lH4RPeEKWKV3Xg=; fh=Mnn878Y0bv7CMhAhqaRYP3bvHhqhOjF+MLAZ9+cp/1I=; b=JxW71XkmtnxO/L3ZuUmdJeVKaV10vu+Rgk49tYLgpO++6L37QhYeGA06ZPpfV25Mod pxeANASGDilGcpy8I8TYS95MqCZSnPhYX274ldqGEulg2VHXpJeVafsNI0e298hCC1fO hqyUJggXXR87NuFLwOQXzCeyHNDxwurKBvvHnp7eSx2WlLbWCQoFFQ3/slfIQcYq7x+t tqXr5bqE42ofkNr1KTPP3YDutlmN36O7+Z1G5fSVD4IJvqwD4+TWa8+qmXiFeIyiOYR2 LsAZXTGQTHL/Osi7o8qcbRCuwFmyYjICMpN28R1BwAmrKE6xpP+OZeQa4aTpeFYi7+BV +yqw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1769465840; x=1770070640; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=oJZcYjEgTxyuv288TK0sXFGxdbth0lH4RPeEKWKV3Xg=; b=CZ2fft9T8SW2q9D799PIBcludyd1BNaAlwEshZNv1b9dgQFmNCHMzyPEiKHWgfpVST YnJ5lmZVNV7kKfOptN/Y+FqgKeql08vLqEnSXlkh9w7IOVSx2aJKX51pe09WxX+ZfAYR qrstPjnLNk1byYYmKbECqC4CktzFa6Ibb/nY4zg+uZgUaX8XasZ1/QTq2dtrGqLjHmVa LubSigt8dCU15zcN1ScxzALVXng8lvFc97UnR1IoKaHgHuJh9I6deVIYFzQkC4fkR8ha /I9wmFfRnVGxUXyXmpUyLvskBYEn90CnbqOhCCJ3vRouAYkcnFqP+hxxCi30H7hSSY/C KNbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769465840; x=1770070640; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=oJZcYjEgTxyuv288TK0sXFGxdbth0lH4RPeEKWKV3Xg=; b=q/DUcH1UCK3VlLV4zuvx7+I5uCkaPYgvUyokgrYdA7xWR+Nyk4QQCKUDvrdSAH3awN aNcfC3AnZ98TdBZeDOywLu6GGqHqH5hBoiAFtRkemfiUAoOR7iv7dl816DHemxmUsh2n lI60b1PbYh2K5JPyWusKtGr4ztnaPLihSNJeVhTHXPpX6iUnyxs3/OOGjdVddK1kmJ/J uCVD9m7NjR6cvE5enYAEY4CckY6f/gxF3qba0t4UXBLrxLGfVBnTVeItLpxvJCX12dAj ihk99zUWZhoP6ftHe2tK4v2EAEGteYvqlqp1f+fC3cTG2mY5hEYDa5IMRpDChW8VZaWS WEuw== X-Gm-Message-State: AOJu0YwPeZ/iV6S2O6QMJp1ESqU7xKqhx48+HIvt/J6R8/V6Sa3EsQ9+ aDM67ABGIG/41SsSWONaD72jatWUgq/dksXuzrsFs3+Z3eLb6Y0s15V3e3oiqdiCrcE2HhLWfJ1 gX1+oZjyPuRmCUE2+Q4MnuPsLcXwqj31IXtYjHoQJdrxyYd8msecCkQ== X-Gm-Gg: AZuq6aJIfpVuZVz+BfvMyXAmV5nkA1agdiI3LLU0abNNcGy5TEaJWaW7Avf5cgHVs9a EIZIZ2m+L0ydq4VxhVJCOVDOi/B53uJ3Na2bLv4P4/1tSIIHRHc5lsHwkeWQPehbA1biVSGewfh 143CKOItdPuRfvxW3Z9r539Mr8C1CwLJf3OM4wJ63omdu3CN+gzWLIv9ILXs2rpTjGBfxpLBeC8 Z2FX8Pog0IRCMtacl5PAUk9LzJrwXDDDdIMz6YqZtdpIaDEPmVwIAHZM54esuv/Pz2ENdFC1w== X-Received: by 2002:ad4:5c82:0:b0:888:6ea5:a90b with SMTP id 6a1803df08f44-894b06fb6e9mr77109296d6.0.1769465839732; Mon, 26 Jan 2026 14:17:19 -0800 (PST) MIME-Version: 1.0 References: <202601241015.y5uvxd7oxnfs@alvherre.pgsql> In-Reply-To: <202601241015.y5uvxd7oxnfs@alvherre.pgsql> From: Jacob Champion Date: Mon, 26 Jan 2026 14:17:08 -0800 X-Gm-Features: AZwV_QgDybdARcnGZmJlqc-bqYNs_GvMHjyU15GaFf3e68LtTW6JwwhRZvQtdBE Message-ID: Subject: Re: unclear OAuth error message To: =?UTF-8?Q?=C3=81lvaro_Herrera?= Cc: Pg Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Jan 24, 2026 at 6:50=E2=80=AFAM =C3=81lvaro Herrera wrote: > But the code suggests that the module worked fine and made the > determination not to authorize the user. If that's so, then why do we > have the errdetail at all? Can't we just get rid of it and let the > errmsg stand on its own merit? For that code path I suspect we could get rid of the entire message, because of what you mentioned later: auth_failed() is already going to give us that. The validator can log what's important if needed, or not. We could add some DEBUGs, maybe, so that you can still figure out what's going on if a validator fails silently? > Here it seems the validator did indeed have an internal problem of some > sort, because while it did declare that the user was authorized, it did > not provide what we were expecting from it. Should in this case the > errmsg() be different? Yeah, I think so. The errdetail should probably become the errmsg, essentially (but with more context). Thanks, --Jacob