[oauth] Add TLS support to OAuth tests

From: "Jonathan Gonzalez V(dot)" <jonathan(dot)abdiel(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: [oauth] Add TLS support to OAuth tests
Date: 2026-02-27 19:15:59
Message-ID: 8a296a2c128aba924bff0ae48af2b88bf8f9188d.camel@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!!

After some discussion about PGOAUTHCAFILE[1] variable, the need of
having the TLS support for the tests added in a different patch[2].

I'm attaching a patch that add this TLS support making use of the
already certs system in the `src/test/ssl/` directory and just making
the `oauth_server.py` script able to support TLS only, this removes the
plain HTTP support from the server.

My Python skills are old, but I tried to keep the modifications as
simple as possible, even that there's an easy way to have the context
in Python 3.14, I decided to just have a context because the function
HTTPSServer() is only available from Python 3.14 and above, which is
not so widely used yet, in the future for sure will be more simple to
use that function.

[1]
https://www.postgresql.org/message-id/flat/16a91d02795cb991963326a902afa764e4d721db.camel%40gmail.com
[2]
https://www.postgresql.org/message-id/flat/9850AB21-78A7-43CD-94C6-FA8E3BC9F1B3%40yesql.se#11e8d9febb3c3b428caa383f0c3f6acf
--
Jonathan Gonzalez V. <jonathan(dot)abdiel(at)gmail(dot)com>

Attachment Content-Type Size
v1-0001-Add-TLS-support-for-the-OAuth-tests.patch text/x-patch 10.0 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message 陈宗志 2026-02-27 19:26:38 Re: [PROPOSAL] Doublewrite Buffer as an alternative torn page protection to Full Page Write
Previous Message 陈宗志 2026-02-27 19:15:36 Re: [PROPOSAL] Doublewrite Buffer as an alternative torn page protection to Full Page Write