What is the safest way for a PHP script to connect to a local PostgreSQL instance on Linux?
- by Botond Balázs
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?