Skip to content
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

Downloads over HTTP? #627

Closed
lol768 opened this issue Apr 1, 2017 · 7 comments
Closed

Downloads over HTTP? #627

lol768 opened this issue Apr 1, 2017 · 7 comments

Comments

@lol768
Copy link
Contributor

lol768 commented Apr 1, 2017

Currently scala-lang.org links this URL:

http://downloads.lightbend.com/scala/2.12.1/scala-2.12.1.tgz

Said URL does not redirect to the HTTPS'd URL.

But, downloads.lightbend.com supports HTTPS. Why are the download links given using HTTP?

Related: #463

@lol768 lol768 changed the title Downlaods over HTTP? Downloads over HTTP? Apr 1, 2017
@jarrodu
Copy link
Member

jarrodu commented Apr 1, 2017

Good point.

grep -r 'downloads.lightbend.com' . | wc gives 336 results. Visual inspection shows that they are all http calls.

It would not be to hard to put together a PR for this.

@lol768
Copy link
Contributor Author

lol768 commented Apr 2, 2017

It would not be to hard to put together a PR for this.

Agreed, see #628. I don't want to treat the symptom only though - where do these links come from? Are they generated automatically? Can I fix the source too?

@SethTisue
Copy link
Member

where do these links come from? Are they generated automatically? Can I fix the source too?

they come from https://github.com/scala/make-release-notes; a PR on this in that repo would be very welcome

a PR addressing scala/make-release-notes#35 would also be very welcome; that would address the root cause of it not being obvious where the files come from

lol768 added a commit to lol768/make-release-notes that referenced this issue Apr 3, 2017
Since no redirect or HSTS is in place, these downloads are
vulnerable to being MitM'd. This commit changes all future
links to use "HTTPS" in the protocol part instead of "HTTP".

Related: scala/scala-lang#627
lol768 pushed a commit to lol768/make-release-notes that referenced this issue Apr 3, 2017
Since no redirect or HSTS is in place, these downloads are
vulnerable to being MitM'd. This commit changes all future
links to use "HTTPS" in the protocol part instead of "HTTP".

Related: scala/scala-lang#627
@ashawley
Copy link
Member

ashawley commented Apr 3, 2017

Does this script need to be updated, too?

https://github.com/scala/scala-dist/blob/2.12.x/scripts/jobs/release/website/archives

It's not clear to me what it does, exactly, but it has a lightbend URL, as well.

@SethTisue
Copy link
Member

Does this script need to be updated, too?

That would be nice. It's only using that URL to retrieve things, but it might as well use the more secure form.

As for the purpose of that section of the script, I don't recall having dealt with it before, but it takes the artifacts available at downloads.lightbend.com and also makes them available at http://www.scala-lang.org/files/archive/. (Digression: I'm not sure if that's just, like, a backup in case an asteroid hits Lightbend, or what? In the past, download pages like this one used the scala-lang URLs instead of the typesafe/lightbend URLs. Maybe lightbend.com has better connectivity or cheaper bandwidth or something.)

@SethTisue
Copy link
Member

SethTisue commented Apr 3, 2017

That would be nice.

Come to think of it, maybe it's more than nice, maybe it's really a good idea. Even if the scala-lang.org download URLs aren't usually used, this would still be a really bad place to fall prey to MITM and end up with compromised binaries on an official server.

lol768 pushed a commit to lol768/scala-dist that referenced this issue Apr 3, 2017
This is to prevent an MitM possible by downloading the releases
in plain text (using HTTP). Per scala/scala-lang#627 this script
appears to make artifacts available on scala-lang.org and so any
form of attack here could be problematic.
SethTisue pushed a commit to scala/make-release-notes that referenced this issue Apr 4, 2017
Since no redirect or HSTS is in place, these downloads are
vulnerable to being MitM'd. This commit changes all future
links to use "HTTPS" in the protocol part instead of "HTTP".

Related: scala/scala-lang#627
SethTisue pushed a commit to scala/scala-dist that referenced this issue Apr 4, 2017
This is to prevent an MitM possible by downloading the releases
in plain text (using HTTP). Per scala/scala-lang#627 this script
appears to make artifacts available on scala-lang.org and so any
form of attack here could be problematic.
@lol768
Copy link
Contributor Author

lol768 commented Apr 4, 2017

Thanks all for your input on this.

I think the only thing I haven't addressed here is:

a PR addressing scala/make-release-notes#35 would also be very welcome; that would address the root cause of it not being obvious where the files come from

I'll see if I can wrap my head around what's going on with the comment issue - if I can get it to work I'll open another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants