Add --ca-cert flag for HTTPS interception proxy support#1026
Open
Add --ca-cert flag for HTTPS interception proxy support#1026
Conversation
Adds support for trusting specific CA certificates when using HTTPS-intercepting proxies (corporate egress proxies, security appliances like Zscaler/Netskope, development tools like mitmproxy). ## Problem agent-browser fails with `ERR_CERT_AUTHORITY_INVALID` behind HTTPS-intercepting proxies that use custom CAs. The current `--ignore-https-errors` workaround disables ALL certificate validation, creating security risks. ## Changes - Added `--ca-cert <path>` CLI flag and `AGENT_BROWSER_CA_CERT` environment variable - Added `caCert` field to JSON configuration - Implemented CA certificate validation via Chromium's `--ignore-certificate-errors-spki-list` flag - Added early validation to check CA certificate file exists - Added comprehensive test coverage for flag parsing and configuration merging - Updated documentation in README and configuration pages ## Implementation Details - Computes SHA-256 hash of the CA certificate's Subject Public Key Info (SPKI) - Passes the hash to Chromium via launch args for targeted certificate trust - Validates certificate file exists before daemon spawn to provide early feedback - Maintains security by only trusting the specified CA, not disabling all validation Fixes #1022
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@ctate Any plan on landing this anytime soon ? |
…3689932 # Conflicts: # cli/src/flags.rs # cli/src/native/actions.rs # cli/src/native/browser.rs # cli/src/native/cdp/chrome.rs # cli/src/output.rs
…st)] - Revert unrelated removal of "Console log cleared" match arm in output.rs - Add #[cfg(test)] to decode_pem_certificate since it's only used in tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for trusting specific CA certificates when using HTTPS-intercepting proxies (corporate egress proxies, security appliances like Zscaler/Netskope, development tools like mitmproxy).
Problem
agent-browser fails with
ERR_CERT_AUTHORITY_INVALIDbehind HTTPS-intercepting proxies that use custom CAs. The current--ignore-https-errorsworkaround disables ALL certificate validation, creating security risks.Changes
--ca-cert <path>CLI flag andAGENT_BROWSER_CA_CERTenvironment variablecaCertfield to JSON configuration--ignore-certificate-errors-spki-listflagImplementation Details
Fixes #1022