pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jacob Champion <jchampion@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: oauth: Add TLS support for oauth_validator tests
Date: Thu, 05 Mar 2026 18:12:03 +0000
Message-ID: <E1vyDB5-002YEk-0M@gemulon.postgresql.org> (raw)

oauth: Add TLS support for oauth_validator tests

The oauth_validator tests don't currently support HTTPS, which makes
testing PGOAUTHCAFILE difficult. Add a localhost certificate to
src/test/ssl and make use of it in oauth_server.py.

In passing, explain the hardcoded use of IPv4 in our issuer identifier,
after intermittent failures on NetBSD led to commit 8d9d5843b. (The new
certificate is still set up for IPv6, to make it easier to improve that
behavior in the future.)

Patch by Jonathan Gonzalez V., with some additional tests and tweaks by
me.

Author: Jonathan Gonzalez V. <jonathan.abdiel@gmail.com>
Discussion: https://postgr.es/m/8a296a2c128aba924bff0ae48af2b88bf8f9188d.camel@gmail.com

Branch
------
master

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

Modified Files
--------------
src/test/modules/oauth_validator/Makefile          |  1 +
src/test/modules/oauth_validator/meson.build       |  1 +
src/test/modules/oauth_validator/t/001_server.pl   | 51 ++++++++++++++++++----
src/test/modules/oauth_validator/t/OAuth/Server.pm |  7 ++-
src/test/modules/oauth_validator/t/oauth_server.py | 22 +++++++++-
.../ssl/conf/server-localhost-alt-names.config     | 20 +++++++++
src/test/ssl/ssl/server-localhost-alt-names.crt    | 20 +++++++++
src/test/ssl/ssl/server-localhost-alt-names.key    | 28 ++++++++++++
src/test/ssl/sslfiles.mk                           |  1 +
9 files changed, 136 insertions(+), 15 deletions(-)



Message-ID: <E1vyDB5-002YEk-0M@gemulon.postgresql.org>
Permalink:  ../E1vyDB5-002YEk-0M@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vyDB5-002YEk-0M@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: jchampion@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: oauth: Add TLS support for oauth_validator tests
  In-Reply-To: <E1vyDB5-002YEk-0M@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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