3 ms·
It has to exist on a private network behind a firewall with ports open to application servers and other es nodes only. Running things on a public ip address is
by jillesvangurp 7y ago
It has to exist on a private network behind a firewall with ports open to application servers and other es nodes only. Running things on a public ip address is a choice that should not be taken lightly. Clustering over the public internet is not a thing with Elasticsearch (or similar products).
If you are running mysql or postgres on a public ip address it would be equally stupid and irresponsible regardless of the useless default password that many people never change unless you also set up TLS properly (which would require knowing what you are doing with e.g. certificates). The security in those products is simply not designed for being exposed on a public ip address over a non TLS connection. Pretending otherwise would be a mistake. Having basic authentication in Elasticsearch would be the pointless equivalent. Base64 (i.e. basic authentication over http) encoded plaintext passwords is not a form of security worth bothering with. Which is why they never did this. It would be a false sense of security.
At some point you just have to call out people for being utter morons. The blame is on them, 100%. The only deficiency here is with their poor decision making. Going "meh http, public IP, no password, what could possibly go wrong?! lets just upload the entirety of linkedin to that." That level of incompetence, negligence, and indifference is inexcusable. I bet, MS/Linkedin is considering legal action against individuals and companies involved. IMHO they'd be well within their rights to sue these people into bankruptcy.
- jerrac 7y agoThat does give me some food for thought. Not sure I agree a username and password is pointless though.
- LaGrange 7y ago> It has to exist on a private network behind a firewall with ports open to application servers and other es nodes only. Running things on a public ip address is a choice that should not be taken lightly. Clustering over the public internet is not a thing with Elasticsearch (or similar products). I've met at least one cloud provider in the past (small Dutch thing) that provides _only_ public IP addresses. They do have customers, though one less now. Clustering over the public Internet is a thing. It shouldn't, but I could say the same thing about this website and yet here we are.
- jillesvangurp 7y agoWell, lets agree it's a sad thing. Very sad.
- LaGrange 7y agoOh sure, but sad things happen. And they can be even messier: I had a Jenkins instance "made" public because a sysadmin new to a hosting provider forgot to remove the public IP that gets automatically assigned to new things. We were lucky, being fairly sure nothing found it before I realised, but it was a strong lesson learned: Any network may become public by accident unless you go to great lengths to make sure it doesn't. Configurations change and mistakes are made even by seasoned people. People bring devices. Unless there's an air gap, people's devices may be hacked and let stuff through. Put authentication and anti-CSRF on _all_ your stuff, always.
- lis 7y agoHeroku does the same in non-enterprise tiers. Their databases are accessible by the public internet with no option to limit it to your own dynos.
- cobookman 7y agoThere's something called defense in depth. Even with ES deployed in an environment with proper network firewall rules...etc, I'd still want some sort of authentication/RBAC
- jwandborg 7y ago"Defense in depth" sounds, to me, like a phrase to justify multiple layers of imperfect security. A single layer of cloth might not hold water, adding more layers of cloth may hold water for longer, but it's probably more cost effective to start with the right material.
- deleted 7y ago[deleted]
- peteretep 7y ago> "Defense in depth" sounds, to me, like a phrase to justify multiple layers of imperfect security. That’s absolutely correct! But you seem to be missing the fact that _all_ layers of security are always imperfect.
- jerrac 7y agoSo, after some thought, here's why I don't consider it pointless to have basic auth built in. It would keep ES from being completely open. If you wanted to get in, you'd have to comprise some part of the network that would let you read the username and password. The way it is now, anyone can do a scan for port 9200 and get full access right away. It is also important to have a username and password, even on secured networks. My test instance is on an internal network, and protected by both network and host firewalls, but I still make sure to secure it beyond that. Basic auth would not provide a false sense of security. It is simply a very basic part of overall security. Not having it is a mistake.
- GhettoMaestro 7y ago> At some point you just have to call out people for being utter morons. The blame is on them, 100%. [...] Your attitude is a symptom of a broader issue that plagues this industry: Indifference to risk*probability. If you don't ship software with "secure defaults" (depending on the threat/attack model), you essentially are handing out loaded shotguns, then blaming the "dumb" user when they inevitably point it at their foot and click the trigger. Easy solution: Don't hand out the gun loaded -- make the user do specific actions that enable the usage. Yeah, it creates some friction to first time deployment, but that's a secondary concern to having your freaking DB leaking all over the place.
- outworlder 7y agoBut ES doesn't hand over a loaded gun . Someone went out of their way to load the gun up.
- GhettoMaestro 7y agoBullshit. If firing up a piece of software creates an unauthenticated, unprotected (non-TLS) endpoint to read-write data, that's a loaded gun. That is PRECISELY the default behavior of ES. ES has jacked around for years by making TLS and other standard security features premium. To that, I say this: Screw ES and their bullshit business model. Their business model is a leading cause to dumbasses dumping extremely sensitive PII data into a DB that is unprotected - those same folks aren't going to go the extra mile to secure the DB, either by licensing or 3rd party bolt-ons. Thus, why it must be shipped secure by default. Anything less is a professional felony, in my eyes. Also, screw ES again, in-case I wasn't clear.
- deleted 7y ago[deleted]
- late2part 7y agomaybe. but there's always this.... http://www.team.net/mjb/hawg.html http://www.team.net/mjb/hawg.html
- 7y ago
- z3t4 7y agoSoftware should be secure by default. Don't blame the user. mySQL in comparison wont even let you install without setting a root password. And it only listen on localhost/unix-socket by default. Then you need to explicitly add another user if you want to allow it to login from a non local ip. I don't think it's even possible - to both set a blank root password and allow it to login from a public IP. So you really think the solution is to blame some low level worker, and sue him/her? The blame should always be on the people in charge, usually the CEO, who set the bar for engineering practices, proper training, etc, or the lack of.
- zerocrates 7y agoThat MySQL stuff is all quite recent... up until 5.7 (?, one of the most recent releases, anyway) there's no root password by default and running `mysql_secure_installation` is a common (but not mandatory) step to, well, secure the installation and set a root password. I think MariaDB still works this way? Not sure. I'm not aware of "bind to localhost" being the default, either. The skip-networking setting to only allow local socket connections is definitely not the default, and I'm pretty sure the default is still to bind to all interfaces.
- somehnguy 7y agoEvery MySql install I've done in the last 5 years either bound exclusively to localhost or had skip-networking enabled by default.
- z3t4 7y agoI installed mySQL a couple of months ago on a Ubuntu server, and got asked to set a root password. I've also installed mySQL many times on Windows. Secure install is the default. And it doesn't annoy me a bit. I like my software to be secure by default.
- m00x 7y agoThis is ridiculous. Software should be built in the best method of delivering maximum value to its users. A trade-off for usability can be made for certain cases like ease-of-use for new software. Redis was part of this a while ago http://antirez.com/news/96 http://antirez.com/news/96. Engineers should know their tools before using them. It's a huge part of our jobs. You could introduce a ton of other vulnerabilities in software: XSS, SQL injections, insecure cryptography. Security is part of our job and matters we must know. You don't blame a plane for a pilot mistake that was meant to be part of his training. Engineers in every other sector are responsible for their mistakes, we should be too. Also, you don't sue the worker, you sue the company.
- sebsito 7y agoI agree. Every anti-moronic default adds friction. I love that I can play with ES quickly via simple URL without any auth.
- deleted 7y ago[deleted]
- bound008 7y agoThis is a fallacy of distributed systems. Never trust the network. Best case you get packets destined for somewhere else, worst case you your network segmented wasn't actually segmented.
- golemiprague 7y agoThe responsibility is always on the user but it doesn't make the decision to make it open by default less stupid. I remember being puzzled about this when using elastic search for the first time. I was trying to set up a log server with kibana and the first thing I was thinking about was how do I block this thing, why it is open for everyone? It should have a user/pass like any other database, it is not rocket science, that should be the default.
- tibbon 7y agoSecurity in depth. If I compromise one part of your network, I shouldn't compromise it all.
- anaphor 7y ago> Clustering over the public internet is not a thing with Elasticsearch It is, sort of, https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-cross-cluster-search.html https://www.elastic.co/guide/en/elasticsearch/reference/curr... But it's not a feature you'd be using without a really good reason IMO.
- blondin 7y agoi agree with GP here. ES is to blame here. not long ago apache airflow had a similar vulnerability discovered about not having sensible authentication defaults. the reasoning on their mailing list was eerily similar to those defending ES here. same arguments (iirc) history is our greatest teacher. i think ES will end up doing what that team did: they agreed to provide sensible & secure defaults.
- sedachv 7y ago> It has to exist on a private network behind a firewall with ports open to application servers and other es nodes only. Have you ever heard of the end-to-end principle, IPv6, or number 4 of the eight fallacies? http://nighthacks.com/jag/res/Fallacies.html http://nighthacks.com/jag/res/Fallacies.html
- Thorrez 7y ago>Having basic authentication in Elasticsearch would be the pointless equivalent. Instead of that they could implement a PAKE. That would provide security with no certificates.
- iforgotpassword 7y agoHonestly, I as a user don't give a shit what a good engineer should so. All I see is that my personal data gets leaked left and right by elasticsearch and not mysql or postgres. But its fanbois just keep shifting blame instead of reflecting about reality and going "hey yeah maybe we should try do do something about it on our end". So fuck ES.
- jeltz 7y agoPostgreSQL does the following things by default to prevent this: 1. Only listen to localhost and unix sockets 2. Not generate any default passwords So the only way to connect to a default configured fresh installation of PostgreSQL is via UNIX sockets as the postgres unix user. Where PostgreSQL is lacking is that it is a bit more work than it should be to use SSL.