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

Add setting to accept self-signed certificates, for testing/pilot. #98

Open
nrmay opened this issue Jan 30, 2017 · 1 comment
Open

Add setting to accept self-signed certificates, for testing/pilot. #98

nrmay opened this issue Jan 30, 2017 · 1 comment

Comments

@nrmay
Copy link

nrmay commented Jan 30, 2017

Our deployment process includes implementing three MyTardis servers: development (Dev), non-production (NPE), and production (Prod). MyData instances are deployed to instruments and tested through the Dev and NPE servers before Prod, however, only Prod servers get signed certifications. This makes deployment and testing messy.

Please, add a setting to override the following message when using self-signed certificates:

Please enter a valid MyTardis URL.
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

The current work-around (to add the certificate into the cacert.pem file) is prone to error and too cumbersome when switching instruments between environments (Dev -> NPE -> Prod).

@wettenhj
Copy link
Contributor

Hi @nrmay,

Happy to look into this (support for self-signed certificates), but I don't think it's a quick fix - we would have to prioritize this work against other tasks. Every call to requests.get, requests.post etc. would need to be updated to include the verify argument, and there would be some security concerns we would have to consider in supporting this, e.g. someone could forget that they left the verify=False setting on, and be vulnerable to Man In The Middle attacks. Maybe a big watermark would be needed over the MyData main window's background to warn the user they are using the unsafe verify=False option.

Some of the workarounds I'm currently aware of are:

  • Adding your certificate to cacert.pem, as you already mentioned.
  • Using Let's Encrypt to generate free SSL certificates
  • Using HTTP instead of HTTPS for your Dev server.
  • Installing your production SSL certificate on both your production and test server and tricking /etc/hosts on your MyData test machine into thinking that your test server is actually your production server.

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

2 participants