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

Handle untrusted certificates #93

Open
shawnmjones opened this issue Jul 7, 2018 · 1 comment
Open

Handle untrusted certificates #93

shawnmjones opened this issue Jul 7, 2018 · 1 comment
Labels
question Further information is requested

Comments

@shawnmjones
Copy link
Member

When trying the URI https://www.cs.odu.edu, which is a valid URI-R, MementoEmbed displays the error MementoEmbed could not reach the server to download https://www.cs.odu.edu.

In response, the application logs this message:

[2018-07-07 00:44:45,922] WARNING in __init__: The server for URI-M https://www.cs.odu.edu could not be reached, details: HTTPSConnectionPool(host='www.cs.odu.edu', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)'),))

This is because the certificate authority is not registered with certifi, the package that requests uses to do certificate verification. The certifi package gets its certificates from the Mozilla Included CA Certificate List.

The application has no issues with HTTPS URIs with domains that correspond to trusted certificates (e.g., https://www.google.com, https://www.odu.edu, https://www.washingtonpost.com).

Certificates can be ignored by passing verify=False to requests.get. Here is an example from the requests documentation:

>>> requests.get('https://kennethreitz.org', verify=False)
<Response [200]>

This is easy to centralize thanks to changes included from pull request #92.

At a minimum, the error message displayed to the user should change and I am already working on an interface update.

The question is, should we ignore all certificate verification issues?

@shawnmjones shawnmjones added the question Further information is requested label Jul 7, 2018
@shawnmjones
Copy link
Member Author

Maybe we make this configurable by the administrator, or, even better, we allow the user to specify it as an option when requesting a surrogate.

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

No branches or pull requests

1 participant