You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BROWSER Probes error with ERR_CERT_AUTHORITY_INVALID #1360
Describe the bug
When attempting to use a BROWSER probe to test an endpoint that is secured with a certificate from a custom CA, the page.goto executions fail with the error ERR_CERT_AUTHORITY_INVALID.
We have tried the following:
Ensure that any valid certificates are included in the /usr/local/share/ca-certificates/ and execute update-ca-certificates.
Specify the NODE_EXTRA_CA_CERTS environment variable to point to a certificate bundle including all required certificates.
Create NSS certificate database and import all required certificates using certutil -d sql:$HOME/.pki/nssdb -A -t "CT,C,C" -n "<CERT_NAME>" -i <CERT_PATH>
Is there a specific pattern that we should be following to get Cloudprober BROWSER probes to trust these certificates? We don't want to use ignoreHTTPSErrors as validating that these endpoints are properly configured and secured is part of the goal.
@aholden85, the NSS-database approach you tried is the right mechanism in principle, but there are two pitfalls that produce the symptoms you're seeing:
$HOME mismatch. The NSS DB has to live under the $HOME of the user the container actually runs as when Chromium launches. If you build the DB as root but the container (or k8s runAsUser) switches to a non-root uid at runtime, Chrome won't find it.
Read-only root filesystem. cert9.db is a SQLite database, and SQLite needs write access to its directory even just to open it for reads (journal/WAL files). If your deployment runs with a read-only root filesystem (common in k8s setups), an NSS DB baked into the image at $HOME/.pki/nssdb will fail to open at runtime even though certutil succeeded at build time. The fix is to copy the pre-built DB to a writable location (e.g. /tmp/.pki/nssdb) at container startup — before cloudprober's Playwright subprocess launches — and point $HOME there.
Thank you @manugarg! Apologies for not responding to this for a while, I was busy with a few other things.
I'll give this a shot and see if it works. I believe the correct approach here would be to make these changes in the Dockerfile we create (using Dockerfile.pw as the base) - is that the right assumption here?
FYI @manugarg - we went back and investigated this, following your guidance, and got it working. Thank you for taking the time to provide such a detailed write-up - it was the key to fixing this and being able to rely on these custom CAs again!
Activity
manugarg commentedon Jun 25, 2026
@aholden85, the NSS-database approach you tried is the right mechanism in principle, but there are two pitfalls that produce the symptoms you're seeing:
aholden85 commentedon Jul 3, 2026
Thank you @manugarg! Apologies for not responding to this for a while, I was busy with a few other things.
I'll give this a shot and see if it works. I believe the correct approach here would be to make these changes in the
Dockerfilewe create (usingDockerfile.pwas the base) - is that the right assumption here?manugarg commentedon Jul 27, 2026
@aholden85 I'll go ahead and close this for now. Feel free to re-open if it's still an issue.
aholden85 commentedon Aug 18, 2026
FYI @manugarg - we went back and investigated this, following your guidance, and got it working. Thank you for taking the time to provide such a detailed write-up - it was the key to fixing this and being able to rely on these custom CAs again!
[docs] FAQ: add BROWSER probe custom CA (ERR_CERT_AUTHORITY_INVALID) …
manugarg commentedon Aug 19, 2026
@aholden85 Thanks for confirming. Added a FAQ entry: https://cloudprober.org/docs/faq/troubleshooting/#browser-probes-fail-with-err_cert_authority_invalid-against-a-custom-ca