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 1p0oSB-0008JN-SB for pgsql-general@arkaria.postgresql.org; Thu, 01 Dec 2022 18:38:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p0oSA-0005rf-PH for pgsql-general@arkaria.postgresql.org; Thu, 01 Dec 2022 18:38:34 +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 1p0oSA-0005rW-F8 for pgsql-general@lists.postgresql.org; Thu, 01 Dec 2022 18:38:34 +0000 Received: from smtp75.iad3b.emailsrvr.com ([146.20.161.75]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p0oS8-0006G2-1Y for pgsql-general@lists.postgresql.org; Thu, 01 Dec 2022 18:38:33 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp2.relay.iad3b.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id 3C8E82012E; Thu, 1 Dec 2022 13:38:30 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: how to secure pg_hba.conf From: Christophe Pettus In-Reply-To: Date: Thu, 1 Dec 2022 10:38:27 -0800 Cc: "pgsql-general@lists.postgresql.org" Content-Transfer-Encoding: quoted-printable Message-Id: <6D2D4FDC-CCB3-41A3-9B76-D12BB5D43C83@thebuild.com> References: To: Rizwan Shaukat X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Classification-ID: c956b0ba-5380-47b0-8228-efe23157b0a0-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Dec 1, 2022, at 05:45, Rizwan Shaukat = wrote: > we hv requiremnt from security to secure pg_hba.conf file was = encryption or password protected on server to protect ip visibilty = because these server access by application n thy can amend as well. how = we can achive it pls=20 The only practical way of securing pg_hba.conf is to secure access to = the Linux user that PostgreSQL is running as (assuming you are on Linux, = of course). That user will need to open and read the file, so there's = no way of securing it against that user.=