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

SSL Error Discovery V2 CP4D despite disabling SSL Verification #850

Open
giacomobartoli opened this issue Sep 9, 2024 · 0 comments
Open

Comments

@giacomobartoli
Copy link

> pip show ibm-watson

Name: ibm-watson
Version: 7.0.1
Summary: Client library to use the IBM Watson Services
Home-page: https://github.com/watson-developer-cloud/python-sdk
Author: IBM Watson
Author-email: watdevex@us.ibm.com
License: Apache 2.0
Location: /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages
Requires: ibm-cloud-sdk-core, python-dateutil, requests, websocket-client

Code implemented in Python:

username, password = get_discovery_credentials()
        authenticator = CloudPakForDataAuthenticator(
            username,
            password,
            'https://BASE_URI/icp4d-api/v1/authorize'
        )

        discovery = DiscoveryV2(
            version='2023-03-31',
            authenticator=authenticator
        )
        discovery.set_service_url('https://BASE_URI/discovery/ibm-cpd-wd/instances/<instance_no>/api')
        discovery.set_disable_ssl_verification(True)
        discovery_conn = discovery

You can clearly see that I disable the SSL verification, but I still run into the error:

Exception in Discovery communication: HTTPSConnectionPool(host='cpd-ibm-cpd.apps.___.com', port=443): Max retries exceeded with url: /icp4d-api/v1/authorize (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1006)')))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant