Re: Storing the password in .pgpass file in an encrypted format - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Storing the password in .pgpass file in an encrypted format
Date
Msg-id 20140221141511.GJ4759@eldon.alvh.no-ip.org
Whole thread Raw
In response to Storing the password in .pgpass file in an encrypted format  (firoz e v <firoz.ev@huawei.com>)
Responses Re: Storing the password in .pgpass file in an encrypted format  (Christian Kruse <christian@2ndQuadrant.com>)
List pgsql-hackers
firoz e v wrote:
> Hi,
> 
> Is there a way to store the password in ".pgpass" file in an encrypted format (for example, to be used by pg_dump).
> 
> Even though, there are ways to set the permissions on .pgpass, to disallow any access to world or group, the security
rulesof many organizations disallow to hold any kind of passwords, as plain text.
 
> 
> If there is no existing way to do this, shall we take up this, as a patch?

Maybe you can memfrob() the password to encrypt it before writing, and
then memfrob() it back before applying it.  Would that be secure?

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Hadi Moshayedi
Date:
Subject: Cost estimation in foreign data wrappers
Next
From: Christian Kruse
Date:
Subject: Re: Storing the password in .pgpass file in an encrypted format