[Discuss] Passwords in Source Code?? Or, How to secure interprocess communications?

Richard Pieri richard.pieri at gmail.com
Sat Jan 31 14:45:01 EST 2015


On 1/31/2015 1:53 PM, Kent Borg wrote:
> How about this: Give every boot, of every box running the code, its own
> unique password.

If Postgres reads the random password before the password randomizer 
finishes then Postgress will have the previous boot's password or an 
incomplete password from a partially-written file. Nothing can 
authenticate as a result. You could embed the randomizer in the Postgres 
startup code so it runs sequentially but now you have another piece of 
code that you have to maintain. If at a later date you have to split the 
database engine and the application between different servers then the 
whole thing falls apart and you're back to square 1. So no, not really 
as simple as it might seem at first.

Put the effort into implementing a standard, secure authentication 
system instead of a hack. It's more work up front but it avoids on-going 
hassles over the life of the system. Use your existing authentication 
infrastructure if you have one and let whoever runs it deal with key 
management. That's their job.

-- 
Rich P.



More information about the Discuss mailing list