Re: [PoC] Federated Authn/z with OAUTHBEARER

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Antonin Houska <ah(at)cybertec(dot)at>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER
Date: 2025-01-09 19:18:21
Message-ID: CAOYmi+mEkXu9Jfg9v-5z9DmBCRCMS2dt43Z=TCbgVkbrqJXxRg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 9, 2025 at 8:17 AM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> Maybe it would work to just use plain "int" as the type here. Any
> socket number must fit into int anyway in order for PQsocket() to be
> able to return it. The way I understand Windows socket handles, this
> should work.

Looks like it should work for current Windows, yeah. This is the
approach taken by OpenSSL [1].

It'd be sad to copy-paste the API bug into a new place, though. If
we're going to disconnect this API from SOCKET, can we use uintptr_t
instead on Windows? If someone eventually adds an alternative to
PQsocket(), as Tom suggested in [2], it'd be nice not to have to
duplicate this callback too.

--Jacob

[1] https://docs.openssl.org/3.4/man3/SSL_set_fd/#notes
[2] https://www.postgresql.org/message-id/153442.1624889951%40sss.pgh.pa.us

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-01-09 19:27:51 Re: Psql meta-command conninfo+
Previous Message Alena Rybakina 2025-01-09 19:13:26 Re: Sample rate added to pg_stat_statements