Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u1uLx-00A6kG-Bt for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Apr 2025 21:50:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u1uLv-004BAz-I9 for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Apr 2025 21:49:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u1uLv-004BAm-6y for pgsql-hackers@lists.postgresql.org; Mon, 07 Apr 2025 21:49:59 +0000 Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u1uLr-003Y5l-33 for pgsql-hackers@postgresql.org; Mon, 07 Apr 2025 21:49:57 +0000 Received: by mail-qk1-x736.google.com with SMTP id af79cd13be357-7c592764e24so528670585a.0 for ; Mon, 07 Apr 2025 14:49:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1744062595; x=1744667395; darn=postgresql.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=FpzRSR6fFOqglYy7l3ZcFifOwqTW4BoADhI8THPm01I=; b=XLixtBUEFX6cL6x+PAbej4kk5aCWBy6lKRV+SFEXwkwBQs5CVATf0HCZZoGAZb8YJY SeCOS6rI+xrwNF6p8Myl0WmFglzuDKoUIVzSDi2P92bw0DxxG0xAnabABrgKd3U5sylZ /fcBf4qAHIXK0IN/xHhwycOg6ccLAALlWjBOAIRt94ay+u+Fahmd6WTk4ifHtY383j8k wfV5Z4toLXs8kjo1kNrlkex+nd3T0WdaiI4ccn9OE1KTigQIF7Oy+ZYYuFpJFu2mpfhS n4cSInf2+1Dv+kk/2ekTW5j4zV9ofZgDh09uGsFHp+9N4+s2MVfxzFTRWfyM+UKIkNxF K52A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744062595; x=1744667395; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FpzRSR6fFOqglYy7l3ZcFifOwqTW4BoADhI8THPm01I=; b=X5TEKBni1gWBrVXkyYEC/NMgaEpy678FyXZ1hMSZsPaUZSI5Bo3KEEESMddanerOgX HJDaz5giydgtHvDEBMackr6PNZvBpnfjY4r4AF7mVLnsx93phOfaR6Hc4VL9aQjBXJgC bLixZt0QYvPXq7h/7xxbIaRqSGq37e2jN3VueQEJsei8Nmb/olSquOPXe928mLMLSV87 ZMZGYrmCeW5yV5in5V9Thf5Swd1g1ra84DJ7ik9sZ6bLOc1Tv/LXVAm+K4w01/tfLyuq lFq48A+ImF0QOg/9aKdX02pelNzK1zdBcOdzUoW9GYECAWd2g0/UDT+xlfdPkgkmY6om HZ+g== X-Forwarded-Encrypted: i=1; AJvYcCWYtGAu9PlXx9LL9rsUUpZIE0kZmQkFu65u1elzDNa+IBHitJ9xvqg7QxRbm2vzDcQnL7RwY+QVKDJfiR/z@postgresql.org X-Gm-Message-State: AOJu0Yz5k+e095smgWh+N8/d47z8Dd/WkhpUnudgE3qSWlHvGI1NhCKO SKdFaOuQv7E/dP8c/fGse60AyK69onZausTgnn/sn9ESByb+INydGSkn38a9k4DU9He8lNenQfh 6ZiaFVSXhaJfGpdPUcI+sbr7yyFIgrjf7+AM3 X-Gm-Gg: ASbGncvjQzxIghBxtEWE0EtSxBzE1UNmauKr6ziYwBOjRpCNIxTQWra83UdxJHB/x4U M3uwAzUvvpuxogS3xxaD1rGiy858R1arsalUSlYrjSbyDY8N7Wk4/osBjUTIyZjyEW0OvaHgr0C Z5xwbiprdS1T/7eyhbTdgBLj5T X-Google-Smtp-Source: AGHT+IEWrWIdwC34PAeyxq7A8b1Rsrva2lgD7xybZ9Sy2Ppg1nY6LMpSQhgEPhTqr0+jAi2IIW4zzcRJa88MPLdC5J4= X-Received: by 2002:a05:620a:4507:b0:7c3:ca29:c87e with SMTP id af79cd13be357-7c7940d7c16mr161635985a.21.1744062594823; Mon, 07 Apr 2025 14:49:54 -0700 (PDT) MIME-Version: 1.0 References: <1120967.1742504934@sss.pgh.pa.us> <5bec3d4f-613f-425b-88c4-59e71c70f7d6@eisentraut.org> In-Reply-To: From: Jacob Champion Date: Mon, 7 Apr 2025 14:49:43 -0700 X-Gm-Features: ATxdqUGBzrZjNpVwiA9PeG714ztrk-MAApLEczr9R0MhzAMS3LOMWLQDWrUrAkI Message-ID: Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER To: Christoph Berg , Jacob Champion , Andres Freund , Peter Eisentraut , Tom Lane , Bruce Momjian , PostgreSQL Hackers , Daniel Gustafsson , Thomas Munro , Nazir Bilal Yavuz , Antonin Houska Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Apr 7, 2025 at 11:47=E2=80=AFAM Christoph Berg wr= ote: > Mmmmh. Since we are currently only talking about 3 symbols, it doesn't > sound very likely that we'd have to bump this in a major branch. The ABI extends to the pointers we're using, though. This module uses PGconn* internals and libpq-int.h. [1] > Putting the minor version into the filename would make looking at > package diffs harder when upgrading. Do we really need this as opposed > to some hardcoded number like libpq.so.5.18 ? > > Perhaps reusing the number from libpq.so.5.18 also for this lib would > be the way to go? That doesn't address Andres' concern, though; if multiple installations all use libpq.so.5.18, they still can't necessarily mix and match. In fact you can't mix and match across different settings of ENABLE_SSL/GSS/SSPI, either. So I guess that nudges me towards pkglibdir/, to avoid major pain for some unlucky end user. > Though for Debian, I'd actually prefer > /usr/lib/$DEB_HOST_MULTIARCH/libpq/libpq-oauth... > since the libpq packaging is independent from the major version > packaging. Not sure I understand this. Do you mean you'd patch our lookup for Debian, to find it there instead of pkglibdir? I don't think we can adopt that ourselves, for the same reasons as above; the two sides have to be in lockstep. > The Debian Policy expectation is that everything in libdir is a proper > library that could be linked to, and that random private stuff should > be elsewhere. But if being able to use the default lib search path is > an important argument, we could put it there. I was hoping the default lib search would make your life (and ours) easier. If it doesn't, I can lock it down. Thanks, --Jacob [1] Future work ideas in this area include allowing other people to compile their own loadable flow plugin, so that the utilities can use it. (Only Device Authorization can be used by psql et al, for 18.) At that point, developers will need a limited API to twiddle the connection handle, and our builtin flow(s?) could use the same API. But that's not work we can tackle for 18.