Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntBvE-0001Tz-Iw for pgsql-general@arkaria.postgresql.org; Mon, 23 May 2022 17:32:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ntBvD-0006RD-F6 for pgsql-general@arkaria.postgresql.org; Mon, 23 May 2022 17:32:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntBvD-0006R4-4c for pgsql-general@lists.postgresql.org; Mon, 23 May 2022 17:32:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntBv6-00040i-Ej for pgsql-general@lists.postgresql.org; Mon, 23 May 2022 17:32:45 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 24NHWdce1293486; Mon, 23 May 2022 13:32:39 -0400 From: Tom Lane To: "dzagashev@gmail.com" cc: pgsql-general@lists.postgresql.org Subject: Re: psql connect over ssl load balancer In-reply-to: References: Comments: In-reply-to "dzagashev@gmail.com" message dated "Mon, 23 May 2022 20:28:15 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1293484.1653327159.1@sss.pgh.pa.us> Date: Mon, 23 May 2022 13:32:39 -0400 Message-ID: <1293485.1653327159@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "dzagashev@gmail.com" writes: > I want to secure connections to postgress server usings SSL. > My server is deployed on google cloud behind SSL load balancer, which > terminates SSL connections (using SSL certificates, issued by google) > and forwards decrypted traffic to the posgres server. > But standard psql client don't working: > $ PGSSLMODE=require psql -h proxy.softvisio.net That isn't going to work, because PG wraps the SSL handshake inside its own protocol. You could set up an SSL tunnel and let psql think it's making a non-encrypted connection. regards, tom lane