Live data from Hacker News

Create a web app from scratch in under 5 minutes with Meteor and Mailgun

blog.mailgun.net

61–70 of 112 posts

Re: Create a web app from scratch in under 5 minutes with Meteor and Mailgun

#61
post #28

$ curl https://install.meteor.com | sh I really wish people would stop giving instructions like this. Despite all the focus on web security and sandboxing, we continue to instruct people to run arbitrary code on their user account. People should at least give any shell script they download from the internet a cursory look to see if it's doing what it should be doing instead of blindly executing the response from an H…

Meteor dev here.. We actually think this is more secure, or at least does more to raise awareness about security! We want people to BE AWARE that they're running arbitrary code, secured only by the certificate authorities in their local curl install.

Just about every other way of installing software ends up letting the remote run arbitrary code on your machine. The disadvantage of the other approaches is that you don't think about it, so you feel safer than you are, and you are more likely to make security-compromising mistakes.

- When you download an OS X installer package and run it, it can run arbitrary code during the install. Is that how you installed Postgres or Rails? Hope you downloaded that disk image over http. (The last time you downloaded a disk image, did you check the link to make sure it was https? ... Are you sure you never forget to do that?)

- OK, so let's say you download a tarball instead, and untar it into /usr/local, and put meteor in your path. Then the next thing you do is.. you type 'meteor', letting the tarball run arbitrary code. There's not much security difference between letting the remote code run at install time, and letting it run two seconds later when you actually start the program fo the first time.

- OK, let's say you downloaded a Meteor tarball, checked its SHA1-- wait, how did you get the correct SHA1? Did you get it off our website? (Best case, over https, bringing us back where we started?) Or did you call me on the phone.. using the phone number you got off of Facebook.. secured by https? (Best case, and only if you manually added https to your Facebook URL. Did you remember to do that?)

- No problem, I'll get it out of macports, fink, or homebrew, and hopefully they'll have the correct authoritative hash and validate the download. Well, how do you know you have the real macports? The chain of trust still goes through https and the CA. Arguably this is a little better because presumably many people will notice if the macports download site is hacked, but just as arguably, it's less secure because there's one more potential compromise point (volunteer macport maintainers -- how are they vetted? do they use two factor auth? what if their email account is compromised?)

There's really two separate issues here:

- Do you trust Meteor enough to run our code? If so, you shouldn't care whether you run curl | sh or whether you download a tarball and unpack it, and then run the program in it. If not, you shouldn't do either. They're equally bad.

- Do you trust https and the certificate authorities to protect you from MITM attacks, so that you get the authentic bits from meteor.com and not an imitation? If so, then curl https://foo solves your problem. If not, you are going to have to find something better than the CA's to serve as your root of trust.

Maybe there is an argument for "defense in depth" -- maybe you should fetch the tarball from one server with one CA, and the SHA1 from a second server with a different CA -- sure, in practice that could make a compromise less likely. But that's a bit much to ask of the random OS X user that just wants to come to meteor.com and install the tools.

Your best option is clearly to come to the monthly DevShop events at Meteor HQ in SF. If you come to DevShop to install Meteor, I will personally confirm the SHA1 for you :)

Re: Create a web app from scratch in under 5 minutes with Meteor and Mailgun

#62
post #28

$ curl https://install.meteor.com | sh I really wish people would stop giving instructions like this. Despite all the focus on web security and sandboxing, we continue to instruct people to run arbitrary code on their user account. People should at least give any shell script they download from the internet a cursory look to see if it's doing what it should be doing instead of blindly executing the response from an H…

You're right but this is just kind of a nit-pick. It should be up to the user to decide if they trust the source. The way I see it, it all comes down to the question of do you trust the source. If the source is trustworthy from there you've got to worry about an attacker compromising your trusted source. That happens and it sucks but its life and I for one am not going to stop `gem install`ing and `curl`ing because R…

> "I'm going to cry a little but it's not like I'm working on a nuclear reactor"

Great for you, but you're a developer who presumably works on 'shit CRUD apps' for other people who pay you for the effort.

What happens when a script from a compromised source that you run on your devbox grabs the entire contents of ~/.ssh/ and sends it to the bad guys inbox? Congratulations, all your clients have been thoroughly owned.

Re: Create a web app from scratch in under 5 minutes with Meteor and Mailgun

#63
post #13
post #11

Anyone who says "5 minutes implementation" to me, get's a nice and sound "GO FUCK YOURSELF" EDIT: Usually it's the business monkey, UX snake oil guys and product leeches that say "Hey, that will only take like 5 minutes, right?"

Don't "from scratch" and "with Meteor and Mailgun" contradict each other?

“If you wish to make an apple pie from scratch, you must first invent the universe.”

― Carl Sagan, Cosmos

Re: Create a web app from scratch in under 5 minutes with Meteor and Mailgun

#65
post #39

Earlier quoted context omitted.

I don't understand this argument, unless you include things like gem, pip, npm, etc. `pip install foobar-py` runs a Python setup script, which can do anything bash can. Do you inspect all of those, and comment about their insecurities on HN?

Don't these generally do some sort of cursory signature check?

Against a signature they fetched how? Over HTTPS?

Just because this style makes you think about it harder, doesn't mean it's less secure. It's the simplest and best case.

Re: Create a web app from scratch in under 5 minutes with Meteor and Mailgun

#66
post #18

"Type this code and run it". Hey, I can teach you the theory of relativity in 30 seconds: type this "e=mc2".

This isn't a "learn how to be a programmer" tutorial. This is a "look how easy Meteor makes getting something simple built and deployed". So instead of the theory of relativity, how about using a calculator to do your taxes.

Fair enough. But this is still not teaching me much about actually writing an app in Meteor. It tells me to type the code in, not how it works or what it all means.

To use the calculator metaphor it would like saying: "enter 75345 + 3455 / 4, there's your taxes!"

Re: Create a web app from scratch in under 5 minutes with Meteor and Mailgun

#67
post #51

if(Meteor.isClient) { ... } if(Meteor.isServer) { ... } Does the Meteor compiler somehow split those code blocks into separate files, so that it only serves the client code to the browser? If not, it seems like a pretty bad practice for delivering fast webapps. Edit: In general, Meteor.isServer seems like a great way for developers to shoot themselves in the foot: Dev: Let me just add my $secret in the server-side bl…

"Does the Meteor compiler somehow split those code blocks into separate files, so that it only serves the client code to the browser?"

Yes.

Re: Create a web app from scratch in under 5 minutes with Meteor and Mailgun

#68

Earlier quoted context omitted.

At least it's https; I've seen sites on HN recently[1] that suggest you run code pulled over plain http, as if that wasn't an even more horrible security risk than just blindly running a script from the Internet. [1] http://chocolatey.org/

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin Goodness, that looks awful.

Heh the least they could do is put that into a batch file to be downloaded and clicked on to run.

Chocolatey is sort of like an alternative apt-get for Windows, except that it doesn't need s sudo command and your password to install software. It uses cinst to install stuff:

cinst firefox

Installs Firefox.

The UAC asks the current user to allow the setup program to run and that is about it. No password needed to install like apt-get has.

Oh yeah if your PC doesn't have Powershell installed you are SOL if you try to use that command to install Chocolatey. Some administrators remove it because it can be used to install software without being known to the user.

Re: Create a web app from scratch in under 5 minutes with Meteor and Mailgun

#69

Earlier quoted context omitted.

The parties examples only uses a static map (lame), they make no use of google maps or leaflets. Try using an infoWindow. You can't, it's not easy. You're productive will be stone walled with the simplest of integration. (This is a limit of constant regions and how meteor handles controlling a piece of the dom). Working with maps or third party libraries is a common task. So, given that common tasks become stone wall…

As much as I dislike the whiny tone of your comment, you have a point: Meteor has problems integrating with some libraries. If a smart-package doesn't exist for it, the odds of it working are slim. (Try getting jquery ui to work...) Part of this is because the Meteor use of reactive programming is very different. Regarding the whining: projects like this take time and effort to create. Wanting something "a year ago"…

Lots of non-standard packages here which are easily added like "mrt add jquery-ui"

https://atmosphere.meteor.com/

Re: Create a web app from scratch in under 5 minutes with Meteor and Mailgun

#70
I tried it, sent email to myself. Never received it. I typed everything correct except I replaced the email with my own email orionblastar@gmail.com there was no error messages as well.

Do I have to install things like sendmail to make it work? If so that needs to be in the documentation.

Yes I did the meteor add email part, I followed every step.

Post reply on HN