Cumin version | 3.0.2 |
Python version | 3.5.3 |
Operating System | Debian stretch 9.8 |
Issue:
In our environment, the PuppetDB server isn't accessible from the network, only from localhost. We have therefore not bothered creating a valid HTTPS certificate for the server, and usually query it over HTTP locally, or through an SSH tunnel.
When we try to use PuppetDB against the server, it crashes with the following error:
Caught SSLError exception: HTTPSConnectionPool(host='localhost', port=8081): Max retries exceeded with url: /pdb/query/v4/nodes (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:720)'),))
Note thta this error is impossible to work around with the urllib3_disable_warnings documented in the example config file: even if we add SSLError to the list, the exception still trips up to the user.
Therefore, I have made the following simple patch to allow the configuration to override the scheme as well:
https://github.com/anarcat/cumin/commit/508551f4f259cc5251c2d7f3c175bbbc21e2fe69
I'd be happy to submit that to Gerrit if it's useful and I figure out how it works.
Thanks for your time.