Re: Have an encrypted pgpass file

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Have an encrypted pgpass file
Дата
Msg-id CAEepm=30M_ndJp2QMoR1Pt3Lg3qq3oC1fCZYTcsV=p1SR0U=VQ@mail.gmail.com
обсуждение исходный текст
Ответ на Have an encrypted pgpass file  (Marco van Eck <marco.vaneck@gmail.com>)
Ответы Re: Have an encrypted pgpass file  (Christophe Pettus <xof@thebuild.com>)
Re: Have an encrypted pgpass file  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Jul 19, 2018 at 5:46 AM, Marco van Eck <marco.vaneck@gmail.com> wrote:
> Since .pgpass files contain plain-text passwords, I searched for an
> alternative.
> In the attached patch I've added the possibility to run a command to produce
> the content of the pgpass file, in exactly the same format. In this way I
> could use gpg or any other command to decrypt a pgpass file. It will prefer
> the .pgpass file and will not call the command.
>
> This would be my environment variable, to have no plain-text password:
>     PGPASSCOMMAND="gpg -q -d pgpass.gpg"
>
> Other usages of the variable:
>     PGPASSCOMMAND="cat pgpass"
>     PGPASSCOMMAND="curl http://passwords/really-unsecure-pgpass"
>     PGPASSCOMMAND="my-own-secure-pgpass-script"

Hi Marco

I've heard requests for encrypted .pgpass files before, and I've
always been a bit confused about how an unattended system is supposed
to decrypt them.  If the key is in the configuration file or local
filesystem, it feels like you haven't really added much security over
a plaintext password, since an attacker who can steal the .pgpass file
can steal those things too.

There are other database systems out there where passwords are held in
an encrypted form but with only a small amount of digging on the
internet you can find out how to decrypt them.  Seems a bit bogus, at
first glance anyway.

Here you side step those questions completely and make that the end
user's problem.   I like it.

-- 
Thomas Munro
http://www.enterprisedb.com


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: GSOC 2018 Project - A New Sorting Routine
Следующее
От: Christophe Pettus
Дата:
Сообщение: Re: Have an encrypted pgpass file