From: vlsi (@vlsi) <noreply+vlsi@github.com>
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Subject: Re: [pgjdbc/pgjdbc] PR #4251: OAuth implementation
Date: Wed, 23 Sep 2026 06:43:33 +0000
Message-ID: <gh-pgjdbc-pgjdbc-4251-rc4079734587@github.com> (raw)
In-Reply-To: <gh-pgjdbc-pgjdbc-4251@github.com>
References: <gh-pgjdbc-pgjdbc-4251@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/v3/OAuthAuthenticator.java:116)
The caller never sees this JSON. The connection fails with `FATAL: OAuth bearer authentication failed for user "..."` (28000), and the `status`/`scope`/`openid-configuration` that tell the caller why exist only in this WARNING. A retrying HikariCP pool logged six of these in one second. The text is server-controlled, possibly from an unverified server when `oauthAllowInsecureConnection=true`, and it is logged verbatim, newlines included.
Keep the JSON in the authenticator, attach it to the exception built from the ErrorResponse (as a cause, so 28000 stays), and log it at FINEST as ` <=BE AuthenticationSASLContinue( {0} )`, like `ScramAuthenticator`. libpq also parses the JSON and fails on a malformed one; here an empty body is logged without complaint.