1: f5b861f7efd < -: ----------- libpq-oauth: Use the PGoauthBearerRequestV2 API 2: f59d6431b04 < -: ----------- libpq-oauth: Never link against libpq's encoding functions 3: 75ac7ddc120 ! 1: 16fa033f184 libpq: Poison the v2 part of a v1 Bearer request @@ Commit message The struct is unpoisoned after the call, so we can switch back to the v2 internal implementation when necessary. + Reviewed-by: Zsolt Parragi Discussion: https://postgr.es/m/CAOYmi%2BmrGg%2Bn_X2MOLgeWcj3v_M00gR8uz_D7mM8z%3DdX1JYVbg%40mail.gmail.com ## src/interfaces/libpq/fe-auth-oauth.h ## @@ src/interfaces/libpq/fe-auth-oauth.c: oauth_unsafe_debugging_enabled(void) +static void +poison_req_v2(PGoauthBearerRequestV2 *request, bool poison) +{ ++#ifdef USE_VALGRIND + void *const base = (char *) request + sizeof(request->v1); + const size_t len = sizeof(*request) - sizeof(request->v1); ++#endif + + if (poison) + { 4: 7a43398c90a ! 2: 6f886914c83 libpq: Allow developers to reimplement libpq-oauth @@ Commit message provide feedback for PG20, by telling the runtime linker to find a different libpq-oauth. It remains undocumented for end users. + Reviewed-by: Zsolt Parragi Discussion: https://postgr.es/m/CAOYmi%2BmrGg%2Bn_X2MOLgeWcj3v_M00gR8uz_D7mM8z%3DdX1JYVbg%40mail.gmail.com ## src/interfaces/libpq/fe-auth-oauth.h ## 5: b3daf3140f8 ! 3: 651d9bdcbc3 WIP: Introduce third-party OAuth flow plugins? @@ Commit message TODO: how hard would it be to support Windows here? Reviewed-by: Zsolt Parragi + Reviewed-by: Jonathan Gonzalez V. Discussion: https://postgr.es/m/CAOYmi%2BmrGg%2Bn_X2MOLgeWcj3v_M00gR8uz_D7mM8z%3DdX1JYVbg%40mail.gmail.com ## src/interfaces/libpq/meson.build ## @@ src/test/modules/oauth_validator/meson.build: tests += { 'cert_dir': meson.project_source_root() / 'src/test/ssl/ssl', + 'flow_module_path': oauth_flow.full_path(), }, - 'deps': [oauth_hook_client], +- 'deps': [oauth_hook_client], ++ 'deps': [oauth_hook_client, oauth_flow], }, + } ## src/test/modules/oauth_validator/Makefile ## @@ src/test/modules/oauth_validator/Makefile: PGFILEDESC = "validator - test OAuth validator module"