by tptacek · 14y ago · 0 comments
mySQLgame[1] demonstrates that domain logic can be successfully implemented within a publicly accessible database[2]. It would be better to reword your statement to:
Minimise the attack surface by preventing unnecessary access
There are times where public access to a database server make perfect sense. It is the reason why database servers implement TLS client certificate verification, Role Based Access Control (RBAC) and other security features which a typical application (with domain logic at the application layer) has no hope of implementing correctly.
In any case, the typical web app deployed by HN readers has no business having an exposed MySQL port.
This works well. There are some things we are still working on improving, but it's getting there. Moreover it means multiple clients on multiple codebases are possible and we don't have to worry as much about the implications of what happens when someone writes a secondary client to hit the database.
At the same time, we use PostgreSQL, which I have a bit more confidence in than MySQL. Of course I would still suggest limiting access only to those IP address ranges where that is necessary.
On other other hand, I'd trust OpenSSH more than MySQL.
Also agreed. I'd trust OpenSSH to do security better than MySQL.
Your advice is for everyone that is providing and using shared web hosting, to stop it?
Now, do you really care if some community bulletin board's database gets owned? Probably not. But I wouldn't run a shopping cart on a shared hoster.
Sorry if that makes you feel bad.
Cheapest? SSH tunnel or openvpn point to point link.
If you do need your mysql to be exposed to the internet you can use bind_address=x.x.x.x or some kind of firewall.
https://github.com/rapid7/metasploit-framework/blob/master/m...
Thus began years of efforts on our part of security fixes, which I would not have started except that I had customers to support.