summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/plan/planner.c
diff options
context:
space:
mode:
authorDaniel Gustafsson2025-01-31 14:47:28 +0000
committerDaniel Gustafsson2025-01-31 14:47:28 +0000
commitf8d8581ed882b79b512daaa7f71ca19c8eafcaef (patch)
treed5fc2f72e1dd7c356f04ec97eb7869b7734d0086 /src/backend/optimizer/plan/planner.c
parente21d6f297158db1383a7c9a668ebe1048f2eac39 (diff)
require_auth: prepare for multiple SASL mechanisms
Prior to this patch, the require_auth implementation assumed that the AuthenticationSASL protocol message was using SCRAM-SHA-256. In preparation for future SASL mechanisms, like OAUTHBEARER, split the implementation into two tiers: the first checks the acceptable AUTH_REQ_* codes, and the second checks acceptable mechanisms if AUTH_REQ_SASL et.al are permitted. conn->allowed_sasl_mechs contains a list of pointers to acceptable mechanisms, and pg_SASL_init() will bail if the selected mechanism isn't contained in this array. Since there's only one mechansism supported right now, one branch of the second tier cannot be exercised yet and is protected by an Assert(false) call. This assertion will need to be removed when the next mechanism is added. This patch is extracted from a larger body of work aimed at adding support for OAUTHBEARER in libpq. Author: Jacob Champion <[email protected]> Reviewed-by: Daniel Gustafsson <[email protected]> Reviewed-by: Peter Eisentraut <[email protected]> Discussion: https://postgr.es/m/CAOYmi+kJqzo6XsR9TEhvVfeVNQ-TyFM5LATypm9yoQVYk=4Wrw@mail.gmail.com
Diffstat (limited to 'src/backend/optimizer/plan/planner.c')
0 files changed, 0 insertions, 0 deletions