pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: oauth: Recheck oauth_validator_libraries during authentication
Date: Thu, 05 Nov 2026 13:16:14 +0000
Message-ID: <E1xOxKA-00000000Jbk-1C2w@gemulon.postgresql.org> (raw)

oauth: Recheck oauth_validator_libraries during authentication

The validator allowlist is only enforced while parsing pg_hba.conf.
If changing oauth_validator_libraries makes an existing oauth line
invalid, the HBA reload fails and the old lines stay in use, so a
removed validator keeps authenticating users.  In particular, when
setting the list to the empty string, the server doesn't refuse an
OAuth connection, as documented.

Backpatch down to v18 where OAuth was introduced.

Author: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: shihao zhong <zhong950419@gmail.com>
Discussion: https://postgr.es/m/CAN4CZFNbWXwC=s4t9Xu1kitLsQvTe-EwpVtFCjixWCHBxRTraQ@mail.gmail.com
Backpatch-through: 18

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e352ac8c5c90ed6ce792f044c22145578542a330

Modified Files
--------------
src/backend/libpq/auth-oauth.c                   | 14 ++++++++++++++
src/test/modules/oauth_validator/t/001_server.pl | 18 ++++++++++++++++++
2 files changed, 32 insertions(+)



view thread (3+ messages)  latest in thread

Message-ID: <E1xOxKA-00000000Jbk-1C2w@gemulon.postgresql.org>
Permalink:  ../E1xOxKA-00000000Jbk-1C2w@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xOxKA-00000000Jbk-1C2w@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: dgustafsson@postgresql.org
  Subject: Re: pgsql: oauth: Recheck oauth_validator_libraries during authentication
  In-Reply-To: <E1xOxKA-00000000Jbk-1C2w@gemulon.postgresql.org>
  References: <E1xOxKA-00000000Jbk-1C2w@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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