|Operating System||Debian stretch 9.8|
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:
I'd be happy to submit that to Gerrit if it's useful and I figure out how it works.
Thanks for your time.