Live data from Hacker News

A Docker footgun led to a vandal deleting NewsBlur's MongoDB database

blog.newsblur.com

261–270 of 275 posts

Re: A Docker footgun led to a vandal deleting NewsBlur's MongoDB database

#261

Earlier quoted context omitted.

Most productions are fine with 99.9% uptime, and a single server is fine for that, so HA is not necessary for most production out there. For example, I'm running a governmental, nationwide service handling 300k req/day, with 1k admins working daily on the site, on a single server without anyone complaining, and without less than 99.9% uptime even though I reboot to upgrade the kernel twice a month, I did have to fine…

Quick calc: 99.9% of 365 means 8:45 downtime a year. That's not a lot, especially if hardware or power fails. In my personal experience, given a vendor SLA of 4:00 hours, Dell manages to send you replacement HW on time, but HP has up to now failed to deliver in window every time. YMMV of course. RAID is the only thing keeping us online in these cases. There is also the normal server maintenance. Rebooting a kernel tw…

If the server burns I'll just deploy another one from scripts and restore the data, I won't need to wait 4 hours I can do it right away, I will surely be able to do that in less than 8 hours!!! However, we don't own the servers, we just rent them from OVH, so we can spawn one in less than an hour and provision it in another, so maybe the fourth time my server actually completely burns in a year I will feel some kind of fear to do 99.8 instead of 99.9 :'''( Funny to see my above comment get a final score of -4, people don't like us saying "well just get a cheap linux box and we'll get you 99.9% uptime" ahah and this is "hacker news"!

Not to mention the comment that was like "you can't do production without HA", I have been developing, deploying, maintaining a bunch of productions for the last 20 years and very very few of them needed any kind of HA.

Anyway, with that experience I can get you >99.9% uptime with a 3 buck/month linux box, or HA for anything above 99.9, cause that's what experience is about kids ;)

Re: A Docker footgun led to a vandal deleting NewsBlur's MongoDB database

#262
post #250

Earlier quoted context omitted.

I think this still misses the point. It's Docker's responsibility to not open firewall ports unless explicitly asked to do so. Opening random ports without A) Telling the developer first, B) Requesting permission to do so, C) Explaining why Docker wants to do so and D) Providing the ability to "opt-out" of this insecure-by-default configuration - is very bad. It doesn't matter how secure or insecure the software insi…

> It's Docker's responsibility to not open firewall ports unless explicitly asked to do so. You are asking Docker to open firewall ports with the -p option, it explicitly even says in the manual that published ports will be reachable from everywhere that can access the IP you're publishing on (either default 0.0.0.0 or an IP of your choosing).

The OP didn't pass this option to Docker, and it seems it's pretty well established to be a significant footgun[1].

I don't have a horse in this race, as I don't use Docker for a plethora of reasons dating back to it's inception. There are plenty of far superior containers to use. Just adding this footgun to the list of reasons...

[1] https://github.com/moby/moby/issues/4737

Re: A Docker footgun led to a vandal deleting NewsBlur's MongoDB database

#264
post #217
post #201

Earlier quoted context omitted.

Build systems in general can be ok, or even elegant and fun. Autoconf is just really terrible.

Autoconf is one of those programs that solved real problems when it was created, in a way that was actually fairly reasonable at the time too. There's a reason it became so popular. But it's now 30 years later, and what was reasonable then is a liability now. Sendmail is another great example of this phenomenon.

Oh, yes, Autoconf was somewhat defensible when it was created.

Just like PHP and COBOL solved real problems back in their heyday.

They are just not something anyone should be using nowadays.

(Btw, Facebook's Hack is a surprisingly pleasant language. Probably the best one they could have made, coming from PHP.)

Re: A Docker footgun led to a vandal deleting NewsBlur's MongoDB database

#265
post #264
post #217

Earlier quoted context omitted.

Autoconf is one of those programs that solved real problems when it was created, in a way that was actually fairly reasonable at the time too. There's a reason it became so popular. But it's now 30 years later, and what was reasonable then is a liability now. Sendmail is another great example of this phenomenon.

Oh, yes, Autoconf was somewhat defensible when it was created. Just like PHP and COBOL solved real problems back in their heyday. They are just not something anyone should be using nowadays. (Btw, Facebook's Hack is a surprisingly pleasant language. Probably the best one they could have made, coming from PHP.)

> They are just not something anyone should be using nowadays.

I guess it depends, take Vim for example: been around since the early 90s, the developers are familiar with autoconf, and it seems to work well for them. Why fix something if it ain't broke?

Switching build systems is not necessarily an easy task. Also, as a user I always found cmake quite hard to deal with. Actually, as a user, I actually prefer autotools in spite of its shortcomings. I think there's still quite a bit to win here.

Either way, I personally wouldn't really call autoconf "terrible".

Re: A Docker footgun led to a vandal deleting NewsBlur's MongoDB database

#266
post #265
post #264

Earlier quoted context omitted.

Oh, yes, Autoconf was somewhat defensible when it was created. Just like PHP and COBOL solved real problems back in their heyday. They are just not something anyone should be using nowadays. (Btw, Facebook's Hack is a surprisingly pleasant language. Probably the best one they could have made, coming from PHP.)

> They are just not something anyone should be using nowadays. I guess it depends, take Vim for example: been around since the early 90s, the developers are familiar with autoconf, and it seems to work well for them. Why fix something if it ain't broke? Switching build systems is not necessarily an easy task. Also, as a user I always found cmake quite hard to deal with. Actually, as a user, I actually prefer autotool…

It's like the saying "the shortest path between two points is the one you know" - the simplest build system is the one that exposes the least complexity to you, which is usually the one that is already deployed and working to your satisfication.

Re: A Docker footgun led to a vandal deleting NewsBlur's MongoDB database

#267
post #186
post #83

Earlier quoted context omitted.

MySQL/MariaDB have a completely open root account too... although default firewall rules should prevent public access too, unless Docker likes to punch that hole open too. Yes, root account password and access permissions should be changed upon a fresh install, but the real issue here is Docker's "helpfulness" by opening ports without explicit permission. That's absurd, and has no reasonable excuse.

That's how both Mongo and MySQL, back in the day, became so popular. They had super lax security, making them easy to use for newbie devs, who are frequently scared/easily distracted by security settings. I'm quite convinced the lack of security was by design. Growth hacking and all that. Get everyone onboard and once you have big business going on, you can focus on the minutiae of security, scaling, not losing data.…

> right/security or wrong/money :-)

right/no users or wrong/yes users

Not much point being right if no one uses the product :)

Re: A Docker footgun led to a vandal deleting NewsBlur's MongoDB database

#268
post #265
post #264

Earlier quoted context omitted.

Oh, yes, Autoconf was somewhat defensible when it was created. Just like PHP and COBOL solved real problems back in their heyday. They are just not something anyone should be using nowadays. (Btw, Facebook's Hack is a surprisingly pleasant language. Probably the best one they could have made, coming from PHP.)

> They are just not something anyone should be using nowadays. I guess it depends, take Vim for example: been around since the early 90s, the developers are familiar with autoconf, and it seems to work well for them. Why fix something if it ain't broke? Switching build systems is not necessarily an easy task. Also, as a user I always found cmake quite hard to deal with. Actually, as a user, I actually prefer autotool…

Well, cmake ain't exactly my favourite piece of software either.

And, yes, switching an existing system is a different proposition from starting from scratch.

Though see what the Neovim people have been doing to remove some of the accumulated cruft from Vim, if you are interested.

Re: A Docker footgun led to a vandal deleting NewsBlur's MongoDB database

#269
post #266
post #265

Earlier quoted context omitted.

> They are just not something anyone should be using nowadays. I guess it depends, take Vim for example: been around since the early 90s, the developers are familiar with autoconf, and it seems to work well for them. Why fix something if it ain't broke? Switching build systems is not necessarily an easy task. Also, as a user I always found cmake quite hard to deal with. Actually, as a user, I actually prefer autotool…

It's like the saying "the shortest path between two points is the one you know" - the simplest build system is the one that exposes the least complexity to you, which is usually the one that is already deployed and working to your satisfication.

Unless you want to make a change or fix a bug, that is.

Re: A Docker footgun led to a vandal deleting NewsBlur's MongoDB database

#270
I'm a bit curious as to why they had the MongoDB docker container running with the 27017 port mapped in the first place, maybe for testing?

You don't need to map ports for inter-container communications, and maybe that's where some of the confusion comes in for people using docker.

I have noticed a few friends who have been playing with docker for home server stuff thinking that they need to map ports for everything, just to get containers in a stack talking to each other.

At the same time docker really shouldn't be messing with the hosts incoming firewall rules.

And MongoDB really should force auth by default.

Post reply on HN