News for hackers. Stuff that matters.
Re:Securing a Postgres Database by tinus_hn on Friday April 02, 2021 @06:42PM (#26676707)
The worst of both worlds: not accessible from the outside, yet insecure because it’s accessible to any user on the inside.

What is the advantage of listening on localhost compared to using a socket, with free access control?

Re:Securing a Postgres Database by koolba on Friday April 02, 2021 @08:24PM (#26677279)
Heartbleed style OpenSSL zero day protection. An open to all environment, like the public Heroku postgres environment, is a huge attack surface.

Layers of security exist for this exact reason. If one fails, hopefully something else stops it.

Re:Securing a Postgres Database by rascul on Friday April 02, 2021 @07:38PM (#26677033)
> What is the advantage of listening on localhost compared to using a socket, with free access control?

Can install and use right away locally without figuring out where your distro puts the socket at.

Edit: Also no need to play with permissions of the socket in such a case.

Re:Securing a Postgres Database by asguy on Friday April 02, 2021 @10:44PM (#26678024)
Unless your local cluster doesn’t allocate your install on 5432 e.g. after cluster upgrade.
Re:Securing a Postgres Database by tinus_hn on Saturday April 03, 2021 @08:05AM (#26680368)
No need to play with permissions of the socket, because you ‘just’ use a socket that gives permission to everyone.
Re:Securing a Postgres Database by juotlrjrb on Friday April 02, 2021 @07:45PM (#26677078)
Modern linux security thinking is that any sort of code running inevitably leads to root privilege.

Put another way, any user can become root through privilege escalation, so access control is pointless, since any untrusted user can take over the machine.

The real unit of security is the whole OS (VM), not its internal user boundaries.

Re:Securing a Postgres Database by fulafel on Friday April 02, 2021 @11:10PM (#26678151)
This kind of mindset exists but is not a consensus. And even if it became consensus, it would still take many, many years for most developers to stop using ssh forwarding with localhost listeners in a security reliant way.

Also, the loopback is used as a networking interconnect or guest->host channel for sandboxed containers and VMs, so it's security sensitive in this way.