HDFGroup / h5pyd

h5py distributed - Python client library for HDF Rest API
Other
111 stars 39 forks source link

https endpoints are not working #12

Closed jreadey closed 7 years ago

jreadey commented 7 years ago

Https endpoints fail with SSLError. E.g.:

requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
jreadey commented 7 years ago

This is actually a problem with the cert installation on data.hdfgroup.org. For some reason it doesn't verify, even though the same link in a browser works fine.

While that's getting sorted out, I made verify=False the option for http requests.

jreadey commented 7 years ago

Note data.hdfgroup.org:7253 is the non-SSL endpoint and data.hdfgroup.org:7258 is SSL.

After converting the data.hdfgroup.org server to use Amazon certificate, running requests works ok. E.g.:

requests.get('https://data.hdfgroup.org:7258')

The h5ls.py examples now fails with a different error:

$ python h5ls.py -e https://data.hdfgroup.org:7258 /Users/jreadey/anaconda/envs/py34/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py:821: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html InsecureRequestWarning) OSError: Forbidden

Need to investigate what is going wrong with h5ls.py.

jreadey commented 7 years ago

The problem was base.py was explicity setting verify to False. Fixed in https://github.com/HDFGroup/h5pyd/commit/1a9c913f4551f7bd32526c71dab282c196cf4c51.