pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: oauth: Recheck oauth_validator_libraries during authentication
3+ messages / 1 participants
[nested] [flat]

* pgsql: oauth: Recheck oauth_validator_libraries during authentication
@ 2026-11-05 13:16 Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Daniel Gustafsson @ 2026-11-05 13:16 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(+)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: oauth: Recheck oauth_validator_libraries during authentication
@ 2026-11-05 13:16 Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Daniel Gustafsson @ 2026-11-05 13:16 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_19_STABLE

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

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: oauth: Recheck oauth_validator_libraries during authentication
@ 2026-11-05 13:16 Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Daniel Gustafsson @ 2026-11-05 13:16 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8e54a414570010afed0b8b1ed10882afba380166

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2026-11-05 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05 13:16 pgsql: oauth: Recheck oauth_validator_libraries during authentication Daniel Gustafsson <dgustafsson@postgresql.org>
2026-11-05 13:16 pgsql: oauth: Recheck oauth_validator_libraries during authentication Daniel Gustafsson <dgustafsson@postgresql.org>
2026-11-05 13:16 pgsql: oauth: Recheck oauth_validator_libraries during authentication Daniel Gustafsson <dgustafsson@postgresql.org>

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