In certain non-SaaS deployments we'd like to run the server in HTTPS but with (possibly) dummy or self-signed certificates. This PR adds a simle option like curl's --insecure, wget's --no-check-certificate etc.
Tested by -
running a "simple HTTPS server" with self signed certificate per this link
Testing with curl - without -k I get curl: (60) SSL certificate problem: self-signed certificate, with -k the connection is established.
Testing with gprofiler w/o this PR - getting SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)') for the get_health check.
Testing with gprofiler with this PR without --no-verify - same error as the above ^^
Testing with gprofiler with this PR with --no-verify - connection is established (and then gProfiler whines on "unexpected response").
Did the same tests for the glogger - with --no-verify I get Unsupported method ('POST') for url (because my dummy server is GET only), without --no-verify I get requests.exceptions.SSLError: HTTPSConnectionPool(host='127.0.0.1', port=3333): Max retries exceeded with url: /api/v1/logs (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)'))).
In certain non-SaaS deployments we'd like to run the server in HTTPS but with (possibly) dummy or self-signed certificates. This PR adds a simle option like curl's
--insecure
, wget's--no-check-certificate
etc.Tested by -
-k
I getcurl: (60) SSL certificate problem: self-signed certificate
, with-k
the connection is established.SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)')
for theget_health
check.--no-verify
- same error as the above ^^--no-verify
- connection is established (and then gProfiler whines on "unexpected response").--no-verify
I getUnsupported method ('POST') for url
(because my dummy server isGET
only), without--no-verify
I getrequests.exceptions.SSLError: HTTPSConnectionPool(host='127.0.0.1', port=3333): Max retries exceeded with url: /api/v1/logs (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)')))
.