pg.ddx.io  GitHub: pgjdbc/pgjdbc (issues + PRs as email threads)  
help / color / mirror / Atom feed
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-rc4079734541@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:372)

libpq picks the first of SCRAM-SHA-256 and OAUTHBEARER in the order the server sends them (`fe-auth.c`). This code picks OAUTHBEARER in either order. No PostgreSQL server offers both in one message, since the `pg_hba.conf` entry selects one method (`oauth_get_mechanisms` advertises only OAUTHBEARER), so the preference is hypothetical. It's the docs and the changelog that turn it into advice to add `requireAuth=scram-sha-256` (see the comment on `use.md`).

Also, nothing logs this decision, including the two fallbacks to SCRAM (channel binding, OAUTHBEARER not offered). A user who configured OAuth then sees only a SCRAM error. One FINE record with the offered list, the choice, and the reason would help.

view thread (168+ messages)  latest in thread

Message-ID: <gh-pgjdbc-pgjdbc-4251-rc4079734541@github.com>
Permalink:  ../gh-pgjdbc-pgjdbc-4251-rc4079734541@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox