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-rc4079734519@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/ConnectionFactoryImpl.java:431)
This runs before the `oauthToken` check, so an `oauthIssuer` the driver never uses blocks the connection: `oauthToken=good-token&oauthIssuer=http://idp` fails with `OAuth issuer URL must use HTTPS`, and a malformed URI fails with `OAuth issuer is not a valid URL`. The same issuer against a SCRAM server connects, because this runs only on the OAuth path.
The driver doesn't compare `oauthIssuer` with the issuer the server advertises either (libpq does, during discovery). So I'd drop the validation, or apply it only to the value handed to the provider, and document which it is.