pgsql: oauth: Run Autoconf tests with correct compiler flags

2025-07-11 Thread Jacob Champion
oauth: Run Autoconf tests with correct compiler flags Commit b0635bfda split off the CPPFLAGS/LDFLAGS/LDLIBS for libcurl into their own separate Makefile variables, but I neglected to move the existing AC_CHECKs for Curl into a place where they would make use of those variables. They instead teste

pgsql: oauth: Run Autoconf tests with correct compiler flags

2025-07-11 Thread Jacob Champion
oauth: Run Autoconf tests with correct compiler flags Commit b0635bfda split off the CPPFLAGS/LDFLAGS/LDLIBS for libcurl into their own separate Makefile variables, but I neglected to move the existing AC_CHECKs for Curl into a place where they would make use of those variables. They instead teste

Re: pgsql: Fix up misuse of "volatile" in contrib/xml2.

2025-07-10 Thread Jacob Champion
On Wed, Jul 9, 2025 at 8:55 PM Michael Paquier wrote: > > On Wed, Jul 09, 2025 at 11:49:55AM -0400, Tom Lane wrote: > > Not sure. Yesterday I saw such warnings from arowana, > > boa, dhole, rhinoceros, and shelduck, eg > > > > arowana | 2025-07-08 04:54:18 | xpath.c:274:6: warning: 'worksp

pgsql: oauth: Fix kqueue detection on OpenBSD

2025-07-07 Thread Jacob Champion
oauth: Fix kqueue detection on OpenBSD In b0635bfda, I added an early header check to the Meson OAuth support, which was intended to duplicate the later checks for HAVE_SYS_[EVENT|EPOLL]_H. However, I implemented the new test via check_header() -- which tries to compile -- rather than has_header()

pgsql: oauth: Fix kqueue detection on OpenBSD

2025-07-07 Thread Jacob Champion
oauth: Fix kqueue detection on OpenBSD In b0635bfda, I added an early header check to the Meson OAuth support, which was intended to duplicate the later checks for HAVE_SYS_[EVENT|EPOLL]_H. However, I implemented the new test via check_header() -- which tries to compile -- rather than has_header()

pgsql: oauth: Correct missing comma in Requires.private

2025-05-23 Thread Jacob Champion
oauth: Correct missing comma in Requires.private I added libcurl to the Requires.private section of libpq.pc in commit b0635bfda, but I missed that the Autoconf side needs commas added explicitly. Configurations which used both --with-libcurl and --with-openssl ended up with the following entry:

pgsql: oauth: Limit JSON parsing depth in the client

2025-05-23 Thread Jacob Champion
oauth: Limit JSON parsing depth in the client Check the ctx->nested level as we go, to prevent a server from running the client out of stack space. The limit we choose when communicating with authorization servers can't be overly strict, since those servers will continue to add extensions in thei

pgsql: oauth: Correct SSL dependency for libpq-oauth.a

2025-05-02 Thread Jacob Champion
oauth: Correct SSL dependency for libpq-oauth.a libpq-oauth.a includes libpq-int.h, which includes OpenSSL headers. The Autoconf side picks up the necessary include directories via CPPFLAGS, but Meson needs the dependency to be made explicit. Reported-by: Nathan Bossart Tested-by: Nathan Bossart

pgsql: oauth: Fix Autoconf build on macOS

2025-05-01 Thread Jacob Champion
oauth: Fix Autoconf build on macOS Oversight in b0635bfda. -lintl is necessary for gettext on Mac, which libpq-oauth depends on via pgport/pgcommon. (I'd incorrectly removed this change from an earlier version of the patch, where it was suggested by Peter Eisentraut.) Per buildfarm member indri.

Re: pgsql: oauth: Move the builtin flow into a separate module

2025-05-01 Thread Jacob Champion
On Thu, May 1, 2025 at 10:48 AM Tom Lane wrote: > It looks like you need to mention libintl explicitly in the link > command for libpq-oauth, if we're building with NLS. > macOS is picky that way ... Yeah, and that was in at one point at Peter's suggestion. :/ I made the mistake of taking it back

Re: pgsql: oauth: Move the builtin flow into a separate module

2025-05-01 Thread Jacob Champion
On Thu, May 1, 2025 at 10:26 AM Jacob Champion wrote: > > oauth: Move the builtin flow into a separate module I'm taking a look at the MacPorts failure now. --Jacob

pgsql: oauth: Move the builtin flow into a separate module

2025-05-01 Thread Jacob Champion
oauth: Move the builtin flow into a separate module The additional packaging footprint of the OAuth Curl dependency, as well as the existence of libcurl in the address space even if OAuth isn't ever used by a client, has raised some concerns. Split off this dependency into a separate loadable modu

pgsql: oauth: Disallow OAuth connections via postgres_fdw/dblink

2025-04-29 Thread Jacob Champion
oauth: Disallow OAuth connections via postgres_fdw/dblink A subsequent commit will reclassify oauth_client_secret from dispchar="" to dispchar="*", so that UIs will treat it like a secret. For our FDWs, this change will move that option from SERVER to USER MAPPING, which we need to avoid. But upo

pgsql: Bump the minimum supported Python version to 3.6.8

2025-04-29 Thread Jacob Champion
Bump the minimum supported Python version to 3.6.8 Python 3.2 is no longer tested by the buildfarm, and there are only a handful of buildfarm animals running versions older than 3.6, which itself went end-of-life in 2021. Python 3.6.8 is the default version shipped in RHEL8, so that seems like a r

pgsql: oauth: Classify oauth_client_secret as a password

2025-04-29 Thread Jacob Champion
oauth: Classify oauth_client_secret as a password Tell UIs to hide the value of oauth_client_secret, like the other passwords. Due to the previous commit, this does not affect postgres_fdw and dblink, but add a comment to try to warn others of the hazard in the future. Reported-by: Noah Misch Re

pgsql: oauth: Support Python 3.6 in tests

2025-04-23 Thread Jacob Champion
oauth: Support Python 3.6 in tests RHEL8 ships a patched 3.6.8 as its base Python version, and I accidentally let some newer Python-isms creep into oauth_server.py during development. Reported-by: Tom Lane Reviewed-by: Jelte Fennema-Nio Tested-by: Renan Alves Fonseca Tested-by: Tom Lane Discu

Re: pgsql: Add support for basic NUMA awareness

2025-04-16 Thread Jacob Champion
On Wed, Apr 16, 2025 at 9:30 AM Daniel Gustafsson wrote: > It seems like this commit didn't run autoheader, which leaves a trivial diff > in > pg_config.h.in carried over for future callers. It doesn't change anuything > really as the HAVE_LIBNUMA macro isn't used, but for completeness sake we >

Re: pgsql: Add notBefore and notAfter to SSL cert info display

2024-03-22 Thread Jacob Champion
On Fri, Mar 22, 2024 at 2:17 PM Daniel Gustafsson wrote: > (We have only defined a minimum supported > version of OpenSSL, we should do the same for LibreSSL since it's right now > unclear what we support and for how long.) +1 > Adding checks for symbol existence > in autoconf/meson seems like t

Re: pgsql: Add some information about authenticated identity via log_connec

2021-04-07 Thread Jacob Champion
On Wed, 2021-04-07 at 10:27 -0400, Tom Lane wrote: > Michael Paquier writes: > > On Wed, Apr 07, 2021 at 01:17:34AM +, Michael Paquier wrote: > > > Add some information about authenticated identity via log_connections > > So, fairywren, that is able to run the SSL tests on Windows, has been >