Skip to content

Browser: allow temporary certificate trust#299797

Merged
kycutler merged 7 commits intomainfrom
kycutler/certerrors
Mar 17, 2026
Merged

Browser: allow temporary certificate trust#299797
kycutler merged 7 commits intomainfrom
kycutler/certerrors

Conversation

@kycutler
Copy link
Contributor

@kycutler kycutler commented Mar 6, 2026

Closes #298982

Same as Chromium, trust is based on hostname+fingerprint and valid for 1 week.

Trust is per-session, persisted in storage, and gets cleared with session data.

image image

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables a Chromium-like “proceed anyway” flow for TLS certificate errors in the integrated browser (Simple Browser tab), with temporary trust scoped to a browser session (hostname + certificate fingerprint) and expiring after 1 week.

Changes:

  • Adds main-process session trust tracking/persistence (BrowserSessionTrust) and exposes certificate-error state via navigation/state payloads.
  • Updates the integrated browser UI to show a certificate error page with “Proceed anyway (unsafe)” and a URL-bar site-info indicator with revoke support.
  • Adds electron-main unit tests covering trust persistence, expiration, and clearing behavior.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/vs/workbench/contrib/browserView/electron-browser/siteInfoWidget.ts New URL-bar indicator widget + hover UI for cert trust status and revoke action.
src/vs/workbench/contrib/browserView/electron-browser/media/browser.css Styles for site-info indicator, URL display mode, and certificate error page UI.
src/vs/workbench/contrib/browserView/electron-browser/browserEditor.ts Adds cert-error UX (error page proceed link, URL-bar display mode, site-info widget hookup).
src/vs/workbench/contrib/browserView/common/browserView.ts Extends workbench model to track certificateError and proxy trust/untrust calls.
src/vs/platform/browserView/test/electron-main/browserSessionTrust.test.ts New unit tests for trust persistence/expiration and cert-error handling.
src/vs/platform/browserView/electron-main/browserViewMainService.ts Wires application storage into browser sessions; exposes trust/untrust operations; clears via clearData().
src/vs/platform/browserView/electron-main/browserView.ts Plumbs certificateError into events/state; reload on trust; close on untrust; installs cert-error handler.
src/vs/platform/browserView/electron-main/browserSessionTrust.ts Implements hostname+fingerprint trust store with 1-week TTL and persisted storage.
src/vs/platform/browserView/electron-main/browserSession.ts Refactors session registry/lifetime management; adds trust + clearData() and storage connection.
src/vs/platform/browserView/common/browserView.ts Adds API types for IBrowserViewCertificateError + trust/untrust methods and state fields.

@kycutler kycutler modified the milestones: 1.112.0, 1.113.0 Mar 15, 2026
@kycutler kycutler removed the request for review from jruales March 17, 2026 00:18
@vs-code-engineering
Copy link
Contributor

vs-code-engineering bot commented Mar 17, 2026

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@jruales

Matched files:

  • src/vs/platform/browserView/common/browserView.ts
  • src/vs/platform/browserView/electron-main/browserSession.ts
  • src/vs/platform/browserView/electron-main/browserSessionTrust.ts
  • src/vs/platform/browserView/electron-main/browserView.ts
  • src/vs/platform/browserView/electron-main/browserViewMainService.ts
  • src/vs/platform/browserView/test/electron-main/browserSessionTrust.test.ts
  • src/vs/workbench/contrib/browserView/common/browserView.ts
  • src/vs/workbench/contrib/browserView/electron-browser/browserEditor.ts
  • src/vs/workbench/contrib/browserView/electron-browser/media/browser.css
  • src/vs/workbench/contrib/browserView/electron-browser/siteInfoWidget.ts

@kycutler kycutler marked this pull request as draft March 17, 2026 17:04
@kycutler kycutler marked this pull request as ready for review March 17, 2026 17:04
@kycutler kycutler enabled auto-merge (squash) March 17, 2026 19:00
@kycutler kycutler merged commit a320ebf into main Mar 17, 2026
26 of 31 checks passed
@kycutler kycutler deleted the kycutler/certerrors branch March 17, 2026 19:04
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

Successfully merging this pull request may close these issues.

ERR_CERT_AUTHORITY_INVALID for localhost HTTPS in Simple Browser Tab despite working fine in MS Edge

3 participants