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

Use HTTPS for web service queries #197

Closed
Freso opened this issue Apr 19, 2016 · 12 comments · Fixed by #245
Closed

Use HTTPS for web service queries #197

Freso opened this issue Apr 19, 2016 · 12 comments · Fixed by #245
Milestone

Comments

@Freso
Copy link
Contributor

Freso commented Apr 19, 2016

MusicBrainz is now planning to go all HTTPS-only in the future. To begin with, only the non-/ws/ sections of the page with be HTTPS-only, but it is planned that eventually everything will only be accessible through HTTPS - so python-musicbrainzngs should probably make the switch sooner rather than later. :)

Relevant upstream ticket: https://tickets.musicbrainz.org/browse/MBH-363

@mineo
Copy link
Collaborator

mineo commented Apr 19, 2016

Does MB use SNI? That is not supported on all Python versions we support.

@gentlecat
Copy link

Yes, we've had issues with that before. In CritiqueBrainz we had to add some hacks to access MBS via HTTPS.

@alastair
Copy link
Owner

I don't mind dropping support for python 2.6 if we need to. Are there any other possible workarounds?

@alastair
Copy link
Owner

Right, https://stackoverflow.com/questions/18578439/using-requests-with-tls-doesnt-give-sni-support/18579484#18579484 shows something similar. We could leave it as "supported with this caveat"

@gentlecat
Copy link

Also keep in mind that 2.7 started supporting SNI and a bunch of other things only from 2.7.9.

@sampsyo
Copy link
Collaborator

sampsyo commented Apr 21, 2016

Looks like Requests (i.e., #123) also supports SNI.

EDIT: Oops; @alastair already noticed this!

@alastair
Copy link
Owner

Yep. I'm happy to start considering requests again, but this won't help anyone using older versions of the library

@alastair alastair modified the milestone: 0.7 May 7, 2016
mutantmonkey added a commit to wuvt/wuvt-site that referenced this issue Nov 25, 2016
I had to fork python-musicbrainzngs to add HTTPS support because
alastair/python-musicbrainzngs#197 has not
been resolved yet.
Freso added a commit to Freso/freedb2musicbrainz that referenced this issue Feb 27, 2017
The Python library being used does not currently support contacting
MusicBrainz.org over HTTPS:
alastair/python-musicbrainzngs#197
@alastair
Copy link
Owner

We talked about this in IRC. Our plan is to:

The new parameter should default to false so that it's backwards compatible with existing code which already calls set_hostname expecting it to connect to an http endpoint

@hugovk
Copy link

hugovk commented Oct 28, 2017

It's about time to drop Python 2.6 anyway, it's been EOL since 2013 and many packages have already dropped support meaning it's getting harder to support and test.

Luckily, usage is low.

Here's the pip installs for musicbrainzngs from PyPI for the last month:

$ pypinfo --percent --pip musicbrainzngs pyversion
python_version percent download_count
-------------- ------- --------------
2.7              48.0%            617
3.6              29.6%            380
3.5              18.1%            232
3.4               3.4%             44
2.6               0.4%              5
3.3               0.3%              4
3.7               0.2%              3

Python 3.2 and 3.3 are also now EOL, and have even lower numbers, so you could consider dropping those too.

Thoughts?

@Freso
Copy link
Contributor Author

Freso commented Jan 5, 2018

Considerations for HTTP/HTTPS have come up again for whipper-team/whipper#210 - @alastair, how would you feel about this as a GCI task? :)

@Freso
Copy link
Contributor Author

Freso commented Feb 20, 2019

Considering that Python 2 will be dead in less than a year, maybe we can just bump the minimum version for the next release (0.7 or 1.0) to Python 2.7.6+ and any future releases by Python 3 only?

Freso added a commit to Freso/python-musicbrainzngs that referenced this issue Feb 21, 2019
This adds a new "global" `https` boolean variable. This variable will be
True by default, but if `set_hostname()` gets called it will default to
False. This should allow both using coverartarchive.org over HTTPS by
default, but anyone that have a script setting a custom server (that may
not support HTTPS) will continue to work as well.

Related to alastair#197

Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
Horrendus pushed a commit to Horrendus/python-musicbrainzngs that referenced this issue Aug 21, 2020
This adds a new "global" `https` boolean variable. This variable will be
True by default, but if `set_hostname()` gets called it will default to
False. This should allow both using musicbrainz.org over HTTPS by
default, but anyone that have a script setting a custom server (that may
not support HTTPS) will continue to work as well.

Fixes alastair#197

Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
Horrendus pushed a commit to Horrendus/python-musicbrainzngs that referenced this issue Aug 21, 2020
This adds a new "global" `https` boolean variable. This variable will be
True by default, but if `set_hostname()` gets called it will default to
False. This should allow both using coverartarchive.org over HTTPS by
default, but anyone that have a script setting a custom server (that may
not support HTTPS) will continue to work as well.

Related to alastair#197

Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
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

Successfully merging a pull request may close this issue.

6 participants