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 1u2GYU-00FX84-0r for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Apr 2025 21:32:26 +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 1u2GYS-00FsTE-Dk for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Apr 2025 21:32:24 +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 1u2GYS-00FsRJ-2C for pgsql-hackers@lists.postgresql.org; Tue, 08 Apr 2025 21:32:24 +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 1u2GYP-003kkk-0u for pgsql-hackers@postgresql.org; Tue, 08 Apr 2025 21:32:22 +0000 Received: by mail-qk1-x736.google.com with SMTP id af79cd13be357-7c5f720c717so13739285a.0 for ; Tue, 08 Apr 2025 14:32:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1744147940; x=1744752740; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bA0ZfygaHt3G9u63YRDM4m4yWsd+ow3unTDUaAUrz4w=; b=H/lXNut6/RBIRr8XAYOXLzSCkydPApVSRAQKk34df52umocFhAbhqy7sbqHr2+8B6l j61vpLgag6yXmRZotY3xzJk/KLY8aUWNo+Xo6MyR0CVVrBBimxAJ6dQX+7eQmR+5nTVQ XPU06kAi8fBYWeIqxH72YIYiyRDGjYO4il8ZDD07vhY3k0OjPDug+jH5mMy5dAgiPWO+ smjcqynr6JWhBZQtjKVccyWcdyTlI8XedkyP5y6UuekROFn9Vcs+CrwrllQ6cvavFDhw NnCwlLPV2tRJKWBUQyiRY4EbNMUq/pqTQ8ripnEwBgPCKRNAuZruNxNJUFsQPj2dOWz5 2I7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744147940; x=1744752740; h=content-transfer-encoding:cc: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=bA0ZfygaHt3G9u63YRDM4m4yWsd+ow3unTDUaAUrz4w=; b=In6fth08pa54JW87EMKL2gUVg1iM1ldco2wLWvA656ANOOAfF1hnDFvtsPOvftKAO0 67jKiSCFn/uwpSoluKUoyzMusov95wwIricHZRMjykAQ+Wp7s6Q2e+51bheAG1E1FSyr IpErZf8mskP786GcNt7h45pEw4cbtfsDMSj32JC82P9be8XuseTN8W/4HOemn8S/6zFV 6uO45YRFEC11M1tacAVCU/JIKyucpJCv9FioL58jO1G4qe4FaKRnHpaBFJDOa0EI1FOd +BhmKby3N1r60d11y5Xzs3hMSB12UjESSwpSvJeGcsTfr7Nk7qyXg9r3Ram2dLRxdGVv i7uw== X-Forwarded-Encrypted: i=1; AJvYcCU38lsCBVrbpsx27hjvk6Et6JgkwKlBjtUgcx9cIQlWXaon5nzPhvranr86ZGZLQGhLXTGAYfG1tTXENbXN@postgresql.org X-Gm-Message-State: AOJu0YyV/oJH/MOzoSZXM9xsfEIvFSLA4Xjbs1Ke1qalqBAcrZ3rw0RQ 6x6GTW4VOHhRcGIq2nb2/Etw2mBqddyJwAP2+f8InVAxKZhnJpp3HAc73/ebyGHrFdw63g1pYAm BiwIb2AR8bUJqaRkdotbcmKM3qx6l/2ZjDtT1 X-Gm-Gg: ASbGncsS5jXC8pTuqjkNZmEjDZfSHG3lNEk8/o84GcDNMPDK8eC3kUqCxugUsLUsaTP c/RAyJ4tangXBXg1a+1322W7bVWBIVWSGwwUj8AgpQJmacevDwnfMw5pgLDxdK81eY7CGQhBAm4 Qbuo+rnj1iSNe95Mk+Sv17u4Jt X-Google-Smtp-Source: AGHT+IEE26HAfqaQRFYtqmeyS3AzLsarYkiKrRxkWRKYv3nomoCe51qxRs6rt76ZGY9vpSxPQmkBJojuNNMu+qBx8xs= X-Received: by 2002:a05:620a:191a:b0:7c3:c9e5:e4ba with SMTP id af79cd13be357-7c7940f2f91mr692242785a.29.1744147940419; Tue, 08 Apr 2025 14:32:20 -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: Tue, 8 Apr 2025 14:32:09 -0700 X-Gm-Features: ATxdqUErhQ71HdZm3c34AIhmn83Sm4MQaxWmyo_S3cSH1OuLeWh2kVd_nnwcLVk Message-ID: Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER To: Peter Eisentraut Cc: Christoph Berg , Andres Freund , 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 9:41=E2=80=AFAM Jacob Champion wrote: > > Not sure, the code looks correct at first glance. However, you could > > also just keep the libpq-oauth strings in the libpq catalog. There > > isn't really a need to make a separate one, since the versions you end > > up installing are locked to each other. So you could for example in > > libpq's nls.mk just add > > > > ../libpq-oauth/oauth-curl.c > > > > etc. to the files. > > Oh, that's an interesting idea. Thanks, I'll give it a try. A consequence of this is that our copy of libpq_binddomain isn't using the same mutex as libpq's copy to protect the "libpq-18" message domain. We could discuss whether or not it matters, since we don't support Windows, but it doesn't feel architecturally sound to me. If we want to reuse the same domain, I think the module should be using libpq's libpq_gettext(). (Which we could do, again through the magic of dependency injection.) > > Maybe it would also make sense to make libpq-oauth a subdirectory of th= e > > libpq directory instead of a peer. > > Works for me. It does not, however, work for our $(recurse) setup in the makefiles -- a shared library depending on a parent directory's shared library leads to infinite recursion, with the current tools -- so I'll keep it at the current directory level for now. Thanks, --Jacob