215 points · by rcconf · 12y ago · 128 comments
"Please, try harder or get forked. Not sure how else to say that."
I think it has become more of an issue in general as the discussion of software projects has moved away from mailing lists and newsgroups to blogs and other more centralized discussion forums.
I recently saw similar censorship happen at Opera's blogs. I would read some of the comments one evening, and there'd be some good discussion about features that the newer versions of Opera's desktop browsers are still missing. They weren't always positive comments, but they'd be relevant and remarkably civilized given the circumstances. Then I'd read the same blog post a day or two later, and entire discussion threads full of useful content would be gone.
Criticism and negative discussion is often the most valuable that there is. It often highlights real problems that need to be solved. To delete such commentary is not at all helpful, and actually probably quite harmful.
Here's a link to the full text: http://blog.npmjs.org/post/78085451721/npms-self-signed-cert...
==
Hey. Crazy kids. This probably needs to be that one event where you sort of realize: "Oh. Shit. Other people...like...use this & stuff. We need a damn road map and a release schedule. Stop smoking dabs all day, breh."
Now is also a great time to learn how to think about the potential ramifications a production push will have prior to making said production push. And, if your change might impact some or perhaps even all of the other people who use your technology, then some degree of coordination - perhaps an email? - would be nice. It's one of those things that will help make you look professional. I suck at professionalism. You have no idea. But, even I know this much.
Because, right now, I sort of feel like I'm asking some very rightfully fearful people to consider entrusting perhaps their actual career into the development of technology they need to succeed and thrive. And, I just started recommending Node.js - with a caveat - that npm basically sucks. I hate having to do that and it needs to stop.
So, here we are.
Your words continue to be one thing, and your actions continue to be quite another. If it is even possible to break a tool like this, that tool is not enterprise grade. If there is nothing that can be done to successfully insulate a tool from unexpected behavior like this, then that tool scores less in evaluations that consider the risk of using it.
npm, at this point, has more going against it in the discussion than going for it right now. Events like this are, in the grand context, very significant and telling. They are also ill-timed. Because big, important decisions are trying to happen right now regarding the use of Node.js. It is literally on the cusp of going mainstream. And, that seems to be generating some pressure that at least one team (npm) doesn't seem to be equipped to handle.
So, before you find yourself facing a community that forks instead of trying to work with you, I would like to just make a simple recommendation. In the future, you seriously need to sit and think about the potential ramifications of a production push. And...this is the important part...if those changes are going to have a wide impact on your users - send some sort of email WELL IN ADVANCE. A flippant blog post the day of is not Doing It Right™.
Because, and I feel like I might not only be speaking for myself, I'm not going to allow the promise of Node.js to be voided by the lackluster and problematic performance of its weird bolt-on archive service. Someone, perhaps even me (as in: today), will simply replace you with a workable, decentralized solution that enterprise can specialize to purpose and communities can use to grow and thrive.
If you have any questions, ask somebody. Anybody. If you're struggling with some concept of enterprise grade operations, what people expect of you and how you can succeed with events like this in the future, I'm positive every capable person here would provide some level of guidance and support. We want you to succeed.
Please, try harder or get forked. Not sure how else to say that.
Best regards, -Rob
I didn't delete your comment. I'll look at the moderation queue and see if maybe disqus is set to auto-hide after some time or something. I'm sorry for the confusion there.
A lot of this is also in how they manage the fallout of this decision - the "Streisand Effect" may come into play here...
The "canonical" resource for my comment on npmjs.org today can be found here:
http://robcolbert.com/#/posts/5311055a38bb373638000007
That is my personal blog running on my personal server on a DSL line that I can't afford while about to go homeless. I have no choice. I have to speak up and fight for what I want to be using or throw in the towel.
What would you do?
So it sounds like it is not ready. _This_ drama, tangled slinkies of callbacks, drama with the Node.JS contributor that got pushed out because if "her" vs "his" pronouns and so on. Nothing of that says it is ready. So I pretty much agree with your IT department. Sorry.
> And, I'm sick of failing because other people suck, won't learn, won't adapt, won't address problems or make progress.
Maybe they did, they just didn't arrive at the same conclusion as you. Maybe they are even right.
Devils advocate, is it actually ready? Especially in light of the incompetence on display with this particular issue?
So yeah.. I was thinking this myself. this type of errors are unacceptable.
It looks like the npm registry used to have a certificate signed by npm's own CA, and existing npm clients only trust that CA by default, not the normal list of verisign, digicert, etc. (Trusting versign et al would defeat the point of using their own CA.) The signing key for that CA is pretty darn important, and maybe there are entities other than npm, inc who might know it (i.e. nodejitsu).
So npm, inc rolled out a new cert that looks to be signed by digicert, but existing clients don't trust Digicert until you explicitly configure them to.
I was thrown off by the SELF_SIGNED_CERT_IN_CHAIN error; I expected some error about an untrusted root CA if the problem was that npm clients didn't trust digicert, but apparently SELF_SIGNED_CERT_IN_CHAIN is what OpenSSL returns when the root CA isn't loaded.
npm CA -> digicert CA -> any other intermediates -> server cert
Clients that only trust the digicert CA (and other standard CAs) will see that and accept it because they trust the digicert CA, and clients that trust the npm CA will trust the cert also, allowing both old and new clients to work. Once (almost) everyone has upgraded, the npm root CA can be removed from the chain presented by the server. Am I missing something here?Edit: It looks like what I'm missing is that you'd need the private key of the digicert CA to generate the request to sign with the npm CA. I was thinking about how CAs have been migrated in the past (e.g. equifax to geotrust global CA). It looks like it won't work in this case.
Edit2: Actually, it appears to work after all. I just tested with the openssl ca command, and you give it -ss_cert instead of -in for the certificate to sign a certificate instead of a request.
A sense of arrogance that precludes understanding x509 infrastructure before you roll out a world-breaking change.
The chain is accepted by Firefox and Chrome with NSS, but Safari (and Chrome on OSX) gives a self-signed warning message. I asked AGL and he thinks that it should be valid: https://twitter.com/giovannibajo/status/439746540249567232
So it looks like it should work in theory, but in practice, even if npm had attempted this, it wouldn't work on Mac.
All root CAs are self-signed, that's what makes them root. What overrides the self-signing being an error is it being listed in the CA list available to the client which is updated out of band.
It was surprising that npm status didn't have any sort of warning. I had to find out about this via twitter. I think it's extremely irresponsible and I'm glad we've started to move away from node.js and started to use Java.
That npm as a project thought this was the correct way to handle this kind of transition is very unsettling.
"Tell us all about how awesome it is building apps in Java!" sounds like a pretty loaded comment to me though.
That's not at all what he said.
People have (foolishly, in my opinion) chosen to make npm an integral part of their deployment process, which is why this change has broken a lot of people's deployments. They're going against the official npm recommendation [1], which is to check your dependencies into your source repository and not use npm in deployment scripts. (A good idea with any package manager, imo. [2])
Not that I'm excusing npm; a change like this seems like something they should have taken more carefully.
[1] Npm recommends checking product dependencies into your repo: https://npmjs.org/doc/faq.html#Should-I-check-my-node_module...
[2] I explain why checking dependencies into your repo is a good idea: http://www.letscodejavascript.com/v3/comments/live/2#comment...
Now, system updates are a different beast than tying your development process into Magic Hosted Things In Internetland, but certificates on things have been changed before and they will be changed again. Just have to keep aware of how your systems work and what they depend on, which goes against modern "javascript with a double large lack of knowledge" development.
I assume you're talking about http etc.. These do not depend on npm and have nothing to do with npm.
Edit: I used to email project owners about issues like this, but never seem to get any response, so I stopped. The worst one, in terms of losing $$ was Pandora. I keep trying to sign up for the paid service, but the form to put in your credit card details is served over HTTP. I emailed them several times with no response.
Edit: Oh, plus you can always use a checksum to verify your download packages [1] :)
Because then you're susceptible to remote MITM? VPNs are useful but do not replace end-to-end encryption.
https://www.pandora.com/radio/jsonp/v35
And you can load the form, which is just an HTML input form with some sensitive data (last 4!), over HTTPS. It sucks that HTTPS is not default though.
Sure, but for the purpose of being explicit to other readers that is still not secure. If the form collecting the sensitive data is served using HTTP only then a malicious actor could alter the page (by injecting some javascript for example) to steal the data even if the actual form post is secured. Serving the form page as https at least ensures that the page collecting the data for submission was unmodified in transit.
I really don't think an advance notice would have hurt. So much for automation.
(add all the latest drama, and you're basically just asking to be forked..)
Solution 2: is a terrible idea for people who have their own private registries or proxy caches. Also a security issue in general...
This leaves you with needing to upgrade node, which may or may not be possible due to operating system/platform constraints. Luckily we were using this https://launchpad.net/~chris-lea/+archive/node.js/ which makes life on ubuntu ok.
We set up our own proxy cache, at this point im thinking about increasing the cache time to something like 2 weeks.
But it does provide a case study for the rest of us on what or what not to do.
Maybe I'm being hopelessly optimistic by not jumping to the conclusion that they did no validation whatsoever before?
npm config set strict-ssl false npm update npm -g npm config set strict-ssl true
I'm sure the likelihood of experiencing a MITM attack here is low, but the security consideration needs to be as widely advertised as the solution.
The change broke bower at on my laptop. The above link fixed it.
I can't figure out from the blog post whether the change was in the npm server or client.
npm --registry http://registry.npmjs.eu/ install blahI think Rob's comment sums up my feelings. A bit more aggressively, but the same gist.
You can see on the following step which image is being used when deploying an app:
https://github.com/progrium/dokku/blob/master/dokku#L33
So what I did was change that to an image of my own based on the progrium/buildstep one:
sudo docker run -i -t progrium/buildstep /bin/bash
Now you can make changes to it and save them into your new image (while you are still logged in to progrium/buildstep): sudo docker commit <id> myownimage
OK, and inside this image I have referenced my own buildstep instead of the default Heroku one. The relevant txt document is in /build/.And to get to the point I have changed the npm install line to run pointing to the http EU repo.
npm install --registry "http://registry.npmjs.eu" --userconfig $build_dir/.npmrc --production 2>&1 | indent
That is one way to go about it. export BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs
This will use Heroku's version of the build pack, which already has a fix for the NPM problem.http://blog.npmjs.org/post/78165272245/more-help-with-self-s...
The blog post doesn't mention deleting the config change after updating, which (I'm not an expert) might be important. I think this is a full fix: http://stackoverflow.com/a/22099006/2708274
https://github.com/npm/npm/commit/2389525a1df6d20e780cca5887...
D:\repos\js-master\phantomjscloud-backend>npm install npm -g --ca=""
npm http GET https://registry.npmjs.org/npm
npm http 200 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/-/npm-1.4.4.tgz
npm ERR! fetch failed https://registry.npmjs.org/npm/-/npm-1.4.4.tgz
npm http GET https://registry.npmjs.org/npm/-/npm-1.4.4.tgz
npm ERR! fetch failed https://registry.npmjs.org/npm/-/npm-1.4.4.tgz
npm http GET https://registry.npmjs.org/npm/-/npm-1.4.4.tgz
npm ERR! fetch failed https://registry.npmjs.org/npm/-/npm-1.4.4.tgz
npm ERR! Error: CERT_UNTRUSTED
npm ERR! at SecurePair.<anonymous> (tls.js:1349:32)
npm ERR! at SecurePair.EventEmitter.emit (events.js:92:17)
npm ERR! at SecurePair.maybeInitFinished (tls.js:962:10)
npm ERR! at CleartextStream.read [as _read] (tls.js:463:15)
npm ERR! at CleartextStream.Readable.read (_stream_readable.js:320:10)
npm ERR! at EncryptedStream.write [as _write] (tls.js:366:25)
npm ERR! at doWrite (_stream_writable.js:219:10)
npm ERR! at writeOrBuffer (_stream_writable.js:209:5)
npm ERR! at EncryptedStream.Writable.write (_stream_writable.js:180:11)
npm ERR! at write (_stream_readable.js:573:24)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
If anything, roll out a new version and gracefully drop support for other clients.