client-py icon indicating copy to clipboard operation
client-py copied to clipboard

Cannot bypass https certificate verification in development

Open mgian opened this issue 2 years ago • 1 comments

While developing with a test server (in this case the IBM fhir-server) which came with only https enabled by default and a self signed certificate, the library cannot connect to the server with the error

[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain

which is of course correct given the situation.

Python however allow to bypass the certificate verification by explititally setting some flags in the request library, but it seems that there is no way to do it using this library (or I was not able to find how to do it)

It would be nice to have an explicit way to avoid all the certificate verification process while connecting to the server, mimicking what python itself does, skipping it only if a specific parameters is passed or a flag is set.

I understand that it would possibly be a security risk (if a developer does not remove the parameter while deploying to production, the prod system will never check for the certificate validity and then cannot verify that the server is legit), but from a development point of view it can be usefull

mgian avatar May 12 '22 09:05 mgian

What would be a suitable workaround to bypass verification? maybe it's possible to prepare a request session up-front?

MM-Lehmann avatar Nov 04 '22 08:11 MM-Lehmann