* Check OpenSSL environment variables before defaulting to certifi
Signed-off-by: Roger Aiudi <aiudirog@gmail.com>
* Fix formatting
Signed-off-by: Roger Aiudi <aiudirog@gmail.com>
* Moved CA_CERTS to the base Connection module
Signed-off-by: Roger Aiudi <aiudirog@gmail.com>
* Updated requests Connection to use common CA_CERTS by default
Signed-off-by: Roger Aiudi <aiudirog@gmail.com>
* Pass nox linting
Signed-off-by: Roger Aiudi <aiudirog@gmail.com>
* Update CHANGELOG.md and USER_GUIDE.md
Signed-off-by: Roger Aiudi <aiudirog@gmail.com>
* Updated AIOHttpConnection to only load CA_CERTS if verify_certs is True
Signed-off-by: Roger Aiudi <aiudirog@gmail.com>
* Added test cases for CA_CERTS handling in each Connection implementation
Signed-off-by: Roger Aiudi <aiudirog@gmail.com>
* Move CA cert handling to Connection.default_ca_certs()
Add test cases for the different CA cert configurations
Signed-off-by: Roger Aiudi <aiudirog@gmail.com>
* Update actions to test unsupported Python versions on ubuntu-20.04
Signed-off-by: Roger Aiudi <aiudirog@gmail.com>
* Fix Python versions being interpreted as floats
Signed-off-by: Roger Aiudi <aiudirog@gmail.com>
* Workaround Monkeypatch not available on old pytest versions
Signed-off-by: Roger Aiudi <aiudirog@gmail.com>
Signed-off-by: Roger Aiudi <aiudirog@gmail.com>
Co-authored-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>
Some OpenSearch REST APIs will return a Content-Type of text/plain for certain
status codes which will trigger logging when the response is not parsable as
JSON. Checking the content-type first avoids this error.
This frequently happens with 401s, which occurs when we rotate user keys.
The input that triggers this behaviour can be triggered with `curl`:
```
$ curl -k -u"admin:wrong" -w"\n%{http_code}\n%{content_type}\n" https://localhost:9200/_cluster/health
Unauthorized
401
text/plain; charset=UTF-8
```
Signed-off-by: Trevor McCulloch <trevor.mcculloch@benchling.com>