-
Couldn't load subscription status.
- Fork 79
HTTPS #1581
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
Merged
Merged
HTTPS #1581
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c716574
Adding QiitaClient class
josenavas 28f9697
Adding QiitaClient tests
josenavas 15a6ee7
Using wss for websockets
josenavas 7dbac08
Using https in the tornado webserver, adding default certificates and…
josenavas e7b541f
Update plugin to use https rather than http
josenavas c9a3da0
Type on config file
josenavas f60a98d
Removing prints
josenavas 8739635
Fixing small bug
josenavas 18fe70c
Adding documentation to the QiitaClient object
josenavas 1337746
Addressing comments
josenavas d6f63dd
Addressing comments
josenavas 0b848d8
Adding verbose comment to the _verify attribute in QiitaClient
josenavas e28153b
Removing try/except
josenavas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| -----BEGIN CERTIFICATE----- | ||
| MIIDVjCCAj4CCQCP4XnDqToF2zANBgkqhkiG9w0BAQUFADBtMQswCQYDVQQGEwJV | ||
| UzETMBEGA1UECBMKQ2FsaWZvcm5pYTESMBAGA1UEBxMJU2FuIERpZWdvMQ0wCwYD | ||
| VQQKEwRVQ1NEMRIwEAYDVQQLEwlLbmlnaHRMY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2 | ||
| -----END CERTIFICATE----- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| -----BEGIN CERTIFICATE REQUEST----- | ||
| MIICsjCCAZoCAQAwbTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWEx | ||
| EjAQBgNVBAcTCVNhbiBEaWVnbzENMAsGA1UEChMEVUNTRDESMBAGA1UECxMJS25p | ||
| Z2h0TGFiMRIwEAYDVQQDEwlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IB | ||
| DwAwggEKAoIBAQC3WCBbgz+Xdamu7j7YKuieeppRYPQiYueR0BuYOOEaIJ0qp1vz | ||
| LMt4qKkZpFjfzeB3m8xYewoHUje34TMVaJh/F3XYS/HoxQhdVlKR0KieT7zGWYnl | ||
| trUeDLurMStjv4c62CqbXKXKpO45nK/dSa/RboRMtXP9qV/PFOWoCS+4mfsjtGtt | ||
| jzUjdvlI5TElO2P2k/CRm1U4PSFrcUfQsG6UTiiLqtBCHMhtQNYshNlEK16mVXmK | ||
| RsLcmponukOJic4g+dFHRQX7F3JOI69I0fxasq4B0YY373Q8O3x+BA7Cm0TmX9Eb | ||
| KgnaifueVKPlysO1jNdcNjDQMLO4UbXadlUXAgMBAAGgADANBgkqhkiG9w0BAQUF | ||
| AAOCAQEAJD/s9Z150miwTYW08DklPoCjR1NijtFBUUkh176GCljNFe+rhnn2OLiV | ||
| skunJ4EiVAZ8O3bjgxGc53FnEMVrwisFugvnORTJAZpp7tKxBqpP++gqXf79wElN | ||
| ySTLjg9vFQgDjUxM2gO/8lH12HBw9xUDHFN2hOZ9ozPFf7KZUa6KUzh2AgHJ4UCF | ||
| 9kFceNAvUamAHjv7BwDqoakLTuEBSZOycimDKiW8aBFGYCHFO2NMCzAKyVxmLtkB | ||
| K7+e5iWwvy3LewiPX/eK+jtRVwY+ujcvOZeCv6Th+oQv1BxstpJwOlca+5s1Rdke | ||
| kUu++nvrQUvWSsdQzxZq855r2TBA/w== | ||
| -----END CERTIFICATE REQUEST----- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| -----BEGIN RSA PRIVATE KEY----- | ||
| MIIEogIBAAKCAQEAt1ggW4M/l3Wpru4+2CronnqaUWD0ImLnkdAbmDjhGiCdKqdb | ||
| 8yzLeKipGaRY383gd5vMWHsKB1I3t+EzFWiYfxd12Evx6MUIXVZSkdConk+8xlmJ | ||
| 5ba1Hgy7qzErY7+HOtgqm1ylyqTuOZyv3Umv0W6ETLVz/alfzxTlqAkvuJn7I7Rr | ||
| bY81I3b5SOUxJTtj9pPwkZtVOD0ha3FH0LBulE4oi6rQQhzIbUDWLITZRCteplV5 | ||
| ikbC3JqaJ7pDiYnOIPnRR0UF+xdyTiOvSNH8WrKuAdGGN+90PDt8fgQOwptE5l/R | ||
| GyoJ2on7nlSj5crDtYzXXDYw0DCzuFG12nZVFwIDAQABAoIBAAWPwsuD27X4d8E6 | ||
| sOVVx+Cmz2+QhVdVsLiXm36umwVz39CfawahYTqzww1oEtoXIKwAKd61PMSkFdSa | ||
| HDaWCaoxR/3br+bjszFBoReTQMosmQlbRfeV50CWGktDHpHUCYIbdI9p7A2Nmzxc | ||
| KGmKBq9Pruu0xWP4c1OQyraiMLRkyjdPxV42t/cpolzkk+zt94om2DdmaZHgrwfM | ||
| TIC/PkgINlwIQfATFSaZSeTQ3bhfMzlLLaiDicf/ZUF8HnIToQjXwfApLv9/2DQB | ||
| BBjFXVXPODYADG0ddczX4GflO4cdyKeJALooQ2v1R7+F7XbTCHGSewFQsYN1cebP | ||
| Shnw4iECgYEA3t2wik92tLDD9yTw3Gl7KcoafW7yVMVjY7DrQqx5VLNN6H2ToIw0 | ||
| 1eaWx1xvabh8F4GyZ6hLqQJs2yOvuBcdEgvjs7rEAktT9w60MNQHP/9LxC7AloUR | ||
| QCpcp4kgf6QuYNBH5eeDMPXt/AyItlTBu1tLWvIyArZDFyFpQ1R+UFUCgYEA0po7 | ||
| 78yzQ2zTxxg+Zg1oFhojo8eqbBCxcnaeMMobaUvRlYdQn3FEgYEzAi39ajw+ApKO | ||
| megCBEc58mlWRaCEBzmOSdttCL/hZR5QD3tMyE97xZxu4qvty7mS8+Qx7VXi4E+R | ||
| 9iB3QW2IdnO0ny0LL+/FRlseFd9Xi48HPEfGC7sCgYBZ4bC0Z03pm6y8/PIDAquA | ||
| dBjw45DqLV1jNFP9ZM/eIB5YmGS0iDc62S+QIbBxQ80QMeeAtLgm5mp+isrwhKnd | ||
| wFvJ/ZXVkwm/BvgXBTwTTGQDMBPN4MbPSQZrLvujXtSxiO6mQxN+6IBdebSdTFuB | ||
| s1UVzb3rqBQwvPHWDLqQrQKBgEQoemFfZFzb6aYzqG4qxJbymro0smkK9gLPdN7h | ||
| agGn8gpsoqEXbU5kW/fGno81M/RtLg2NUqnDy3MyuCMMke4sqGoqw5zjTLUHHG4G | ||
| P5FMeAg6WoCtl+YpBvA72BSxiR2DYv++/hmEs3dydvBVCZvYA4aDkrcNcy3Nek/+ | ||
| ApBlAoGAQOXrFJa0kMKK89D6luYd7KWTHze7fSNmohxXKm4OW/9V/IxcDFASRasm | ||
| Ld45yQ6CRk42Ry0xA/TiEs9Gv8hPrJEzNXVzBMA+s0h6uY13p5cMgZdMA7XotM95 | ||
| UgtsatiprRqzpYQItbPCYyPmDAscA+jsdoZzbXFjlOYz/9BZRCc= | ||
| -----END RSA PRIVATE KEY----- | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have these been tested when serving from other systems? I want to make sure they don't trigger HTTPS error pages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I try and access any page on the system, I get hte following error:
So these may not be good universally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't test this in another system - that is what I exposed in the PR comments.
The error that you're seeing is because you are using http rather than https. Make sure to type https - in the live system the redirect is done through nginx, but in your local machine you need to type the https. Also make sure that your config file includes the https in the base_url, so when redirects happen in the system it works as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, and I now get the error I was expecting from chrome:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you post a screenshot of the error rather than copy paste? I would like to see better the error from chrome.
Thanks,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@biocore/qiita-dev can I have some comments here? The only alternative then is to ask each of our users to ask for a certificate to an authority - which can take some time and I don't think this is what we need to do. Without this, we can't use https neither oauth2.
I think that we good documentation this is not a problem - and we let the user know that is not a problem.
@squirrelo If you don't agree with this, please provide an alternative and constructive feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should really default back to HTTP if we don't have a certificate provided, possibly with a warning when you start the webserver. This allows users to use standard HTTP when it's on their laptop and safe, and HTTPS in larger deploys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This issue is a complicated one, on the one hand we want to maintain the installation process as simple as possible, but on the other hand we also want to have a consistent system that isn't raising flags and worrying our users. It almost feels like these two are incompatible, so these are the possible partial solutions I can think of:
--i-dont-care-about-security-or--local-system.The solution should probably be a combination of some of the points above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just discussed some of this information with Jeff. Few points:
About the comment of defaulting to HTTP: the entire work to use HTTPS has beed done so the RESTapi/plugins work as expected communicating through OAuth2 - if we default to HTTP, we can't use any of the plugins as they're authenticating through OAuth2, which requires HTTPS.
My vote goes top add detailed documentation in which we specify that if you are running locally in your machine, you will receive that warning the first time that you log in to the server (per @squirrelo 's observation, maybe every time that you start the server - I did not have that problem). Then, also add documentation that if you want to make your own Qiita server, you should get your own valid certificates from a Certificate Authority.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the solution is to improve documentation and/or try to do some of these suggestions: http://superuser.com/questions/772762/how-can-i-disable-security-checks-for-localhost