Skip to content

Serve package index over HTTPS #5480

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

Closed
VictorTagayun opened this issue Dec 12, 2018 · 16 comments · Fixed by #5992
Closed

Serve package index over HTTPS #5480

VictorTagayun opened this issue Dec 12, 2018 · 16 comments · Fixed by #5992

Comments

@VictorTagayun
Copy link

Why is the board manager http://arduino.esp8266.com/stable/package_esp8266com_index.json not in https like ESP32 https://dl.espressif.com/dl/package_esp32_index.json ?
I cannot load ESP8266 in our work office, thus I need to hotspot my mobile to connect and download everytime the json file.

@igrr
Copy link
Member

igrr commented Dec 12, 2018

Switching to HTTPS for the package download is something we will be looking into before the next release, thanks for bringing this up.

@igrr igrr self-assigned this Dec 12, 2018
@igrr igrr added this to the 2.5.0 milestone Dec 12, 2018
@igrr igrr changed the title HTTPS in board manager Serve package index over HTTPS Dec 12, 2018
@VictorTagayun
Copy link
Author

Short term I am using github https://github.com/esp8266/Arduino/releases/download/2.4.2/package_esp8266com_index.json
Thanks for considering this.

@devyte
Copy link
Collaborator

devyte commented Dec 12, 2018

Release 2.5.0-beta1 is out, in case you want to use that json instead.

@VictorTagayun
Copy link
Author

Thanks for the offer.
Ill wait for the final release.

@devyte
Copy link
Collaborator

devyte commented Dec 12, 2018

I should rephrase: ... in case you want to try it out and provide feedback :)

@devyte
Copy link
Collaborator

devyte commented Jan 18, 2019

@igrr has there been any progress?

@igrr
Copy link
Member

igrr commented Jan 19, 2019

@devyte Some progress — I have created a repo, but don't have a domain name at esp8266.com yet. Will ping the owner (Espressif) again.

@devyte
Copy link
Collaborator

devyte commented Feb 4, 2019

@igrr due date for 2.5.0 was yesterday. I assume this still needs more time and should be pushed back?

@devyte devyte modified the milestones: 2.5.0, 2.6.0 Feb 5, 2019
@igrr
Copy link
Member

igrr commented Feb 26, 2019

Have set up https://arduino-test.esp8266.com/ which is generated from https://github.com/esp8266/esp8266.github.io. HTTPS seems to work. Next step is to upload existing package .json to that repo, and test that Arduino IDE can use that as a package manager URL.

@gvarisco
Copy link

gvarisco commented Apr 8, 2019

Hi @igrr! I can confirm that the Arduino IDE correctly works with HTTPS endpoints. Could you please enable HTTPS on arduino.esp8266.com as well? Is there anything we can help with, re: testing?

@igrr
Copy link
Member

igrr commented Apr 9, 2019

@gvarisco Sure, can you try installing the package using this boards manager package URL?

https://arduino-test.esp8266.com/stable/package_esp8266com_index.json

(instead of the usual http://arduino.esp8266.com/stable/package_esp8266com_index.json)

If that works, I'll ask the DNS record owner to switch arduino.esp8266.com from the current A record to a CNAME record pointing to the github pages site.

@igrr
Copy link
Member

igrr commented Apr 9, 2019

One more thing to test, is that the http->https redirection works, i.e. if the boards manager package URL is set as

http://arduino-test.esp8266.com/stable/package_esp8266com_index.json

then Arduino will install the package successfully, after redirection to https.

@gvarisco
Copy link

gvarisco commented Apr 9, 2019

Hi @igrr! I can confirm that installing the package using the board manager's package URL you provided (the https one) works just fine on Arduino IDE. I can also confirm that the http->https redirection (via 301) WORKS as expected, and both the package's index as well the package itself get download without any problems. You should be good to switch the main host over it.

@igrr
Copy link
Member

igrr commented Apr 11, 2019

Okay, done. The package is now available from arduino.esp8266.com both via http and https. I have not enabled automatic redirection from http to https just yet.

Next step is to update release scripts in this repo to automatically upload the new package version for every release.

@d-a-v d-a-v modified the milestones: 2.6.0, 2.5.1 Apr 11, 2019
earlephilhower added a commit to earlephilhower/Arduino that referenced this issue Apr 16, 2019
earlephilhower added a commit that referenced this issue May 1, 2019
* Upgrade to https: serving for JSON, links in docs

Fixes #5480

* Update boards.rst documentation

* Update more documentation http: refs to https:

* Remove obsolete staging info

* Drop obsolete versions from JSON programatically

After the final merge is done on the JSON, strip out any named versions
from the final product.

Removing 1.6.5-* and 2.5.0-beta(1,2,3) for now.

* Remove 2.4.0-rc(0/1) from JSON, too
@gvarisco
Copy link

gvarisco commented May 2, 2019

@igrr thanks for working on #5992. I've noticed there's no 301 redirect on http://arduino.esp8266.com/ (http->https) or even better HSTS. Do you have any plan for it?

@igrr
Copy link
Member

igrr commented May 10, 2019

@gvarisco Unfortunately, old versions of Arduino IDE can not verify the certificate of https://arduino.esp8266.com, so we can not enable the HTTP -> HTTPS redirect.

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

Successfully merging a pull request may close this issue.

5 participants