pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Verite <daniel@manitou-mail.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Desidero <desidero@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: pgpass file type restrictions
Date: Thu, 19 Oct 2017 19:40:28 +0200
Message-ID: <6cc8501d-2dc5-4a81-ba09-1d31eeee0d7e@manitou-mail.org> (raw)
In-Reply-To: <30756.1508422804@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

	Tom Lane wrote:

> On many platforms, it's possible for other users to see the environment
> variables of a process.  So PGPASSWORD is really quite insecure.

As said in https://www.postgresql.org/docs/current/static/libpq-envars.html

  "PGPASSWORD behaves the same as the password connection
  parameter. Use of this environment variable is not recommended for
  security reasons, as some operating systems allow non-root users to
  see process environment variables via ps; instead consider using a
  password file"

I understand this in the context that PostgreSQL runs on many
operating systems, including ancient ones.
But in the case that the target platform is not afflicted by
"the environment is public" problem, what's best between
PGPASSWORD and .pgpass is a judgment call. Personally
I'm unimpressed by the recommendation above seemingly
favoring the latter, as if it hadn't its own problems.


Best regards,
-- 
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



view thread (10+ messages)  latest in thread

Message-ID: <6cc8501d-2dc5-4a81-ba09-1d31eeee0d7e@manitou-mail.org>
Permalink:  ../6cc8501d-2dc5-4a81-ba09-1d31eeee0d7e@manitou-mail.org/
Also on:    postgresql.org/message-id/6cc8501d-2dc5-4a81-ba09-1d31eeee0d7e@manitou-mail.org

 · 

reply

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: daniel@manitou-mail.org, tgl@sss.pgh.pa.us, desidero@gmail.com
  Subject: Re: pgpass file type restrictions
  In-Reply-To: <6cc8501d-2dc5-4a81-ba09-1d31eeee0d7e@manitou-mail.org>
  References: <30756.1508422804@sss.pgh.pa.us> <6cc8501d-2dc5-4a81-ba09-1d31eeee0d7e@manitou-mail.org>

* 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