evidentlyai / evidently

Evidently is ​​an open-source ML and LLM observability framework. Evaluate, test, and monitor any AI-powered system or data pipeline. From tabular data to Gen AI. 100+ metrics.
https://www.evidentlyai.com/evidently-oss
Apache License 2.0
5.2k stars 586 forks source link

SSL_Verify Disbale for Connecting with the Evidently Remote Client (Within VPN) #1184

Open Annamalaisaravanan opened 3 months ago

Annamalaisaravanan commented 3 months ago

Right now, I'm running the Evidently remote server in a Kubernetes cluster within a Organisation VPN space. When I try to reach out to the evidently Server URL with evidently Client, I'm getting an SSL_verify error. I wanted to know how we can disable the ssl authentication to connect with the same client Or can you avail a mathod to disable the ssl verify method.

ERROR: SSLError: HTTPSConnectionPool(host='evidentlyui.gpu.<domain-name>.com', port=443): Max retries exceeded with url: /api/version (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)'))).

brennantolman commented 2 months ago

I am also running into this issue. Here's what a colleague of mine and I found:

I went into evidently.ui.workspace.remote::RemoteBase._request and altered line 132:

FROM: response = s.send(request.prepare()) TO: response = s.send(request.prepare(), verify=os.environ["SSL_CERT_FILE"])

It works with that change.

We think the issue is that Evidently creates a Session. From that session, it calls session.send(). send() does NOT use self.request to send a thing... Why do you care? - It's the request function within the Session which calls the self.merge_environment_settings to pull ssl bundle through REQUESTS_CA_BUNDLE env var...

Without that call, I don't see the ssl certs injected/used.

AnnamalaiC5I commented 2 months ago

how to repackage the library with new changes??