Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add disable ssl verification to client instantiation #1260

Closed

Conversation

dudanogueira
Copy link
Contributor

@dudanogueira dudanogueira commented Aug 26, 2024

Initial work.
Still need to figure:

  • a way to pass disable_ssl_verification to aopen in __batch_send method of _BatchBase class.
  • Write some tests or at least check if the httpx client was initiated with the correct verify parameter

The idea is to print this message on exception with CERTIFICATE_VERIFY_FAILED

        We have identified a SSL CERTIFICATE_VERIFY_FAILED error.

        This error could be due to one of several reasons:
        - Weaviate client is under a corporate network that terminates ssl and issues it's own certificates.
        - You have a self signed certificate

        Weaviate python client uses certifi, and because of that, it will not be able to trust
        Potential fixes:
        - disable ssl verification by setting using `disable_ssl_verification=True` in client initialization
            - note that Weaviate will trust any certificate
        - Replace certifi cacert with the same cacert that is issued by your corporate network.
            - for example: cat MyCompanyRootCA.pem >> $(python -m certifi)

To test this, you can rename the cacert.pem inside certifi package, like so:

import certifi
right_path = certifi.where()
wrong_path = right_path + "renamed"

import os 
os.rename(right_path, wrong_path)

@dirkkul
Copy link
Collaborator

dirkkul commented Aug 28, 2024

Closing in favour of #1262

@dirkkul dirkkul closed this Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants