Skip to content

BROWSER Probes error with ERR_CERT_AUTHORITY_INVALID #1360

Closed

Description

@aholden85

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.

Cloudprober Version

v0.14.2

Activity

  1. added
    bug
    on Jun 22, 2026
  2. manugarg commented on Jun 25, 2026

    @manugarg
    Contributor

    @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:

    1. $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.
    2. 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.
  3. added
    question
    on Jun 29, 2026
  4. aholden85 commented on Jul 3, 2026

    @aholden85
    ContributorAuthor

    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?

  5. manugarg commented on Jul 27, 2026

    @manugarg
    Contributor

    @aholden85 I'll go ahead and close this for now. Feel free to re-open if it's still an issue.

  6. aholden85 commented on Aug 18, 2026

    @aholden85
    ContributorAuthor

    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!

  7. manugarg commented on Aug 19, 2026

    @manugarg
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugquestion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions