-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support HTTPS #2109
Comments
I'm building the world right now, and I think the best solution would be setting up a helpline where one could vent all their frustration caused by autotools. |
|
An unfortunate wrinkle in this equation: http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg01000.html The 24.4 release of Emacs introduces an unfortunate bug in package.el that causes dependencies of TLS-fetched packages to be downloaded without TLS. Might want to put this on hold until the package.el bug is fixed. |
|
@technomancy Thanks for the heads-up. I'd seen Nic had encountered issues switching Marmalade over. Will wait a bit and see how this plays out. |
|
Glad to see this is being considered! When implementing this, please keep both HTTP and HTTPS open. I've been in both situations where one is blocked and the other available, depending on company firewall/transparent proxy policy. |
|
One way to provide TLS without having to manage it on melpa.org yourself would be to use a github pages domain (https://milkypostman.github.io/melpa) to host all the packages. If you want to keep the packages on MELPA, I have a lot of experience configuring servers to support TLS and I know of several zero-cost valid cert options, and I'd be happy to volunteer to administer this aspect of the process, if someone wanted to give me appropriate credentials. I think that many people on this ticket are underestimating the severity of this problem. MELPA is, currently, an obvious vector for malware, and the only reason it hasn't been exploited in this manner is that it's relatively obscure. However, determined attackers will soon realize that people with lots of elevated privileges (system administrators, programmers with administrative credentials) use this repository and will likely target it in the future if they have not done so already. For example, @rmgrimm - if you can't access HTTPS, then I don't think you should be able to access MELPA. It's irresponsible to have the capability to secure users connections, but refuse to do so on the basis that there might be some users in some environments that are so heavily surveilled that they are not allowed to make secure connections at all. |
|
One possible solution to Windows users without access to OpenSSL would be to use a script that uses the native Windows HTTP client, like https://serverfault.com/questions/29707/download-file-from-vbscript/29720#29720 |
|
Bump. Although package signing is surely the real future-proof way to do this, HTTP-only MELPA remains very low-hanging fruit for attackers to put malware onto Emacs users' machines. There's rudimentary support for HTTPS in package.el already; please just let me use it. |
|
Ok I'll take care of this. I think part of the problem was that there was a
|
|
Thanks so much, @milkypostman ! |
|
Anyone interested in this issue will probably also be interested to know that you need these custom variables in order to actually verify TLS: By default, Emacs doesn't verify TLS certificates, nor TLS hostnames, and includes a number of fallbacks which will fall through to not verifying if you happen to not have You may want to replace the |
|
@glyph Emacs has built-in GnuTLS integration in the C code that makes HTTP/S verification simple without requiring For the Network Security Manager, the piece that actually manages certificates and warns you about expired ones: http://lars.ingebrigtsen.no/2014/12/01/the-emacs-network-security-manager/ For the GnuTLS integration, see https://www.gnu.org/software/emacs/manual/html_mono/emacs-gnutls.html Emacs 25 could be the release that officially deprecates the old |
|
@tzz - It doesn't work on the Emacs from either https://emacsformacosx.com or from Ubuntu. So the advice stands: for a given user, their Emacs is probably insecure and needs to be adjusted. In five years when Emacs 25 is common, if they remove the build options that allow it to build without GnuTLS, then users might be able to start relying on it. |
|
@glyph you're absolutely right: I thought your instructions were incomplete, not wrong. Sorry I wasn't explicit about that! So maybe you could join them with mine? I'll be glad to include that in the GnuTLS integration docs I cited as a "how to use HTTP/S reliably" guide. I don't think one exists right now anywhere so it will be a nice addition. |
|
@tzz Ah, I guess I misread. Honestly what I do is I do is head over to and the former should work, the latter should fail. If the latter succeeds then I get sad and check my configuration. |
|
I tried to setup the SSL with startSSL and they are having problems right now which doesn't bode well. but I will try again tomorrow. Just wanted to update. |
|
@milkypostman You can get free certs from them for the root domain plus one subdomain, so I guess that should cover both melpa.org and stable.melpa.org... |
|
@milkypostman thanks for the update. StartSSL's uptime isn't great, but luckily once you're set up you only need to use their site once a year :). |
|
are there any recommended SSL provides? I'm happy to just pay the amount. On Fri, Aug 14, 2015 at 4:19 PM, Glyph notifications@github.com wrote:
|
|
What problems with their certificate are you referring to? If you're willing to spend a little money, there's SSLMate which automates more of the process and is still pretty cheap. |
|
The problem is that I login but cannot get to the control panel. When I go
|
|
When you say you "login", what do you mean? Typically logging in takes you straight to the control panel. Are you sure you've properly installed your client authentication certificate in your browser? |
|
(I am able to get to my account, so it is not a problem with the StartSSL site, I don't think.) |
|
OK, so I must admit I wasn't aware of client auth certs before using this. So either it's in my download folder somewhere or I lost it. I'll try again tonight. I see what's happening. |
|
Glad I could help then :). I hope you didn't lose it! |
|
OK, give it a shot. It should work now! On Tue, Aug 18, 2015 at 11:33 AM, Glyph notifications@github.com wrote:
|
|
I was excited by this announcement https://www.eff.org/deeplinks/2014/11/certificate-authority- https://letsencrypt.org/ is supposed to go live by Q4 2015, so I'd wait for that. |
|
@glyph continuing the discussion here since you posted the instructions here... I posted a patch against the Emacs GnuTLS integration manual to emacs-devel: https://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00693.html If you could review that, it would be great (feel free to follow up on emacs-devel or to me directly). Also I don't know if you want to be mentioned in the commit, but if you do, I don't know what name to use. |
|
cool, thanks for the update ted. I already added the ssl certs from On Wed, Aug 19, 2015 at 7:32 AM Ted Zlatanov notifications@github.com
|
|
|
This could be closed now, although I think that updating https://melpa.org/#/getting-started to point at https would be good to do before calling it done. |
|
Thanks a lot for this. I was really waiting for the https version. |
Done in 37c241a, but I think we should also consider setting up HSTS headers. |
|
Not to discourage you, but, will |
I don't really care -- it's just a good thing to do for HTTPS sites. |
Fair enough. First order of business would be removing the HTTP site and replacing it with a redirect, yes? |
|
Yes. Maybe just for the html content, though, because - at least for a while - I'd like to allow people to still fetch packages over http. I don't want to have to urgently deal with any fallout like Marmalade's switch to https. |
|
glyph, do i need to post your snippet along with the url to get things On Sat, Aug 22, 2015 at 11:34 PM, Steve Purcell notifications@github.com
|
|
@milkypostman - Yes, although that snippet is probably insufficient by itself. Assuming that users can configure a working |
|
(For that matter I have never actually tested this on Windows, where I might learn some more exciting things.) |
|
is it easier if you can assume that users have the tickets available in On Sun, Aug 23, 2015 at 2:37 PM, Glyph notifications@github.com wrote:
|
|
Only users on Linux do, and only if they have particular packages installed ( |
|
It looks like Windows is quite a pickle. The official emacs builds don't include GnuTLS, and getting GnuTLS installed is tricky (msysgit doesn't come with it; you need a full Cygwin, it looks like). |
|
imo windows users are on their own. On Mon, Aug 24, 2015 at 11:15 AM Glyph notifications@github.com wrote:
|
I think that we may have to say that for now; this is a complicated puzzle. http://www.lonecpluspluscoder.com/2015/08/adding-tls-support-to-emacs-24-5-on-windows/ suggests that it's not all that hard to get a build of GnuTLS going, but … that suggests downloading it from Sourceforge, which, guess what, doesn't offer HTTPS on its downloads, so GnuTLS itself becomes a vector for an unauthenticated binary. Ugh! |
|
"imo windows users are on their own." Then put a sign on the front page of melpa, telling windows users up front that your site is broken, unless they manually patch their version of emacs, to work around it. Why make them spend the time and effort to troubleshoot a problem you already know exists? |
|
so does it not work at all? On Sun, Dec 6, 2015 at 2:47 AM, Michael Powe notifications@github.com
|
|
Not in cygwin, not with the standard Windows binary. I found at least 3 different sets of "instructions" for manually installing GnuTLS, none of which worked. Apparently, there is a rather delicate combination of dependencies that must be met. The standard win32 emacs does not have gnutls built in, according to ldd. The cygwin-64 emacs shows that it's there, but emacs itself does not see it. powem@powem-dell-win7 ~ Testing in emacs: Debugger entered--Lisp error: (void-function open-gnutls-stream) Chasing this stuff down can turn into a real rabbit hole. I'm trying to avoid falling in. I have in the past built emacs on linux, and that in itself can be a monster operation. I have no desire to do it in winblows, as I'm sure it's a route to a drinking problem. thanks. |
|
c5fbe5a makes a note about this. |
|
My blog post at https://glyph.twistedmatrix.com/2015/11/editor-malware.html covers Windows - although I've only tested these instructions with the standard Windows binary, not Cygwin. |
We do. Is there anything left to be done here? |
|
Should the link from https://github.com/melpa/melpa to http://melpa.org changed to https? |
|
done. |
We've previously declined to provide this (see #1877) on the basis that signing packages (#1749) is the long-term path to ensuring tamper-evident installations.
However, signing will only benefit those with Emacs 24.4 or greater, and now that we've settled MELPA on a dedicated TLD we can easily get a (free) SSL cert. So let's do that.
Thoughts:
open_sslorgnutlshelper programs. This seems to have affected Windows users following Marmalade's switch to SSL-only.Suggested steps:
@melpa.orgemail addressnginxon the servers, and probably enables SPDY too. I've done this a bunch, so can easily take care of this.To check:
https:andhttp:. Can't recall if there's an effect on Google Analytics, dlvr.it etc., but it's worth looking out for./cc @technomancy (thanks for the prod)
The text was updated successfully, but these errors were encountered: