Skip to content

How to make WebDriver trust our internal CAs #85

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

Open
vctqs1anz opened this issue Mar 19, 2025 · 2 comments
Open

How to make WebDriver trust our internal CAs #85

vctqs1anz opened this issue Mar 19, 2025 · 2 comments

Comments

@vctqs1anz
Copy link

vctqs1anz commented Mar 19, 2025

As a result of setting up internal CAs, we have successfully verified the Typesense server by setting the REQUESTS_CA_BUNDLE inside the Docker container. https://www.selenium.dev/documentation/webdriver/

REQUESTS_CA_BUNDLE="/etc/ssl/certs/ca-certificates.crt" 

However, the issue persists when we start crawling a site that is under internal CAs. We receive the following error

Turn on enhanced protection\u003C/a> to get Chrome's highest level of security","errorCode":"net::ERR_CERT_AUTHORITY_INVALID","expirationDate":"May 12, 2025","explanationParagraph":"This server could not prove that it is \u003Cstrong>\u003C/strong>; its security certificate is not trusted by your computer's operating system. This may be caused by a misconfiguration or an attacker intercepting your connection.\

without REQUESTS_CA_BUNDLE points to Typesense server (Request python error)

requests.exceptions.SSLError: HTTPSConnectionPool(host='....................', port=443): Max retries exceeded with url: /collections/oceanblue_k8s_job (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)')))

@vctqs1anz
Copy link
Author

vctqs1anz commented Mar 19, 2025

Alternative way is ignore ssl error, and accept insecure certs but better way is somehow config trust internal CAs

   chrome_options = Options()
            chrome_options.accept_insecure_certs = True
            chrome_options.add_argument('--no-sandbox')
            chrome_options.add_argument('--headless')

            chrome_options.add_argument('user-agent={0}'.format(user_agent))

@vctqs1
Copy link
Contributor

vctqs1 commented Mar 20, 2025

Resolve in here #86

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

No branches or pull requests

2 participants