Re: Emptying oauth_validator_libraries doesn't stop OAuth logins

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
Cc: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Subject: Re: Emptying oauth_validator_libraries doesn't stop OAuth logins
Date: 2026-11-04 02:48:15
Message-ID: CAGRkXqTyttnAq_KBb2E4fVVH1z3ioUL_kuLSRsJvgvJkexKGEA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Daniel & Zsolt,

Thanks for working on this. This is my first time review oauth related
patches, and I hope my understanding is correct here, if not, please
correct me.

I tried v2 and the login still works. v1 checked the return value of
check_oauth_validator(), but v2 drops that.

COMMERROR only logs, and nothing checks the return value.
With the list set to '' and reloaded, I can still log in and run queries:

LOG: parameter "oauth_validator_libraries" must be set ...
LOG: connection authenticated: identity="test" method=oauth

The attached patch on top of v2 fails the login when the check fails.

Thanks,
Shihao

Attachment Content-Type Size
nocfbot-v2-0002-Reject-the-login-when-the-validator-is-no-longer-all.patch application/octet-stream 2.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shihao zhong 2026-11-04 03:06:41 Re: multi-row INSERT broken with a sublink in a target column subscript
Previous Message Chao Li 2026-11-04 02:46:55 Re: -Wcast-qual home stretch