What is the safest way for a PHP script to connect to a local PostgreSQL instance on Linux?
Posted
by
Botond Balázs
on Stack Overflow
See other posts from Stack Overflow
or by Botond Balázs
Published on 2012-10-27T08:34:22Z
Indexed on
2012/10/27
17:01 UTC
Read the original article
Hit count: 274
php
|postgresql
I think if I granted the apache user appropriate privileges and used the ident
authentication method, that would make the connection more secure because then the password wouldn't need to be stored in a connection string.
Also, that way the security of the connection would depend on how secure the host system is. I disabled root login over ssh and only permit public key authentication so I think it is pretty secure.
Does this have any significant security benefits or is it just wishful thinking? Is it necessary at all?
© Stack Overflow or respective owner