From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Rizwan Shaukat <rizwan.shaukat@hotmail.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: how to secure pg_hba.conf
Date: Thu, 01 Dec 2022 14:29:35 -0500
Message-ID: <1693764.1669922975@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwa_pumVRLPas6qiiayyqPj7nbKMntj9GEAKci6g-mzw=Q@mail.gmail.com>
References: <DM8PR02MB8231DCDEC8243903101492E289149@DM8PR02MB8231.namprd02.prod.outlook.com>
<CAKFQuwa_pumVRLPas6qiiayyqPj7nbKMntj9GEAKci6g-mzw=Q@mail.gmail.com>
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Thu, Dec 1, 2022 at 11:36 AM Rizwan Shaukat <rizwan.shaukat@hotmail.com>
> 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
> You cannot with the present implementation of the system - pg_hba.conf is
> read by the PostgreSQL process as a file. I do not think the server is
> prepared for that file to be some kind of program whose stdout is the
> contents and you could arrange for that program to do whatever it is you'd
> like.
Even more to the point: if you are afraid of hostile actors being able
to access files inside your data directory, it seems to me that
pg_hba.conf is very far down the list of things to worry about. What's
to stop the same actors from examining/modifying other configuration
files, or even the actual database contents? If you don't think your
data directory is secure, you have problems that Postgres can't fix.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, rizwan.shaukat@hotmail.com
Subject: Re: how to secure pg_hba.conf
In-Reply-To: <1693764.1669922975@sss.pgh.pa.us>
References: <DM8PR02MB8231DCDEC8243903101492E289149@DM8PR02MB8231.namprd02.prod.outlook.com> <CAKFQuwa_pumVRLPas6qiiayyqPj7nbKMntj9GEAKci6g-mzw=Q@mail.gmail.com> <1693764.1669922975@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox