Re: Securing .pgpass File? - Mailing list pgsql-general

From Steve Atkins
Subject Re: Securing .pgpass File?
Date
Msg-id 826BC060-70DA-4879-9FA2-2F65C964B474@blighty.com
Whole thread Raw
In response to Re: Securing .pgpass File?  (Shaun Thomas <sthomas@optionshouse.com>)
List pgsql-general
On Oct 1, 2012, at 10:26 AM, Shaun Thomas <sthomas@optionshouse.com> wrote:

> On 10/01/2012 12:19 PM, Darren Duncan wrote:
>
>> You should never put your passwords (or private keys) in source control;
>> it would be better to use the puppet/bcfg option.
>
> That was kind of my point. Puppet / Bcfg2 have the same problem. About a dozen people have access to our bcfg2 repo
thanI would want to know the contents of .pgpass. 
>
> We have twenty machines. If I ever change that file, I have to change it in 20 places. I'd love to put it in bcfg2,
butthat necessitates allowing anyone with access to bcfg2 the ability to read it. No go. 
>
> You basically just reiterated my question back to me. ;) I'd like to *stop* manually copying the files around, but
can'tbecause they're completely plain text. It doesn't matter if it's source control, puppet, bcfg2, cfengine, or
anythingelse; unauthorized people can read them, and I rather they didn't. 
>
> Encrypted passwords would be nice, but apparently this isn't an option.

If the passwords were encrypted, you'd also need to distribute the password to decrypt the password.

You could obfuscate the passwords (with something that's somewhat equivalent to rot13) which would help with shoulder
surfing,but you'd still be distributing a secret that's equivalent to a password. That's something you could do without
anysupport from postgresql though - just deobfuscate as part of the distribution process. 

Authentication that isn't based on a secret token would be one way to sidestep the issue - source IP based, for
instance.

Cheers,
  Steve



pgsql-general by date:

Previous
From: "Yelai, Ramkumar IN BLR STS"
Date:
Subject: Re: Re: Need help in reclaiming disk space by deleting the selected records
Next
From: Tom Lane
Date:
Subject: Re: pg_upgrade: out of memory