Skip to content
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

[Security] Add support for Certificate Transparency in Brave #22482

Closed
fmarier opened this issue Apr 21, 2022 · 6 comments · Fixed by brave/brave-core#17944
Closed

[Security] Add support for Certificate Transparency in Brave #22482

fmarier opened this issue Apr 21, 2022 · 6 comments · Fixed by brave/brave-core#17944

Comments

@fmarier fmarier added OS/Android Fixes related to Android browser functionality OS/Desktop labels Apr 21, 2022
@fmarier
Copy link
Member Author

fmarier commented Apr 26, 2022

From https://source.chromium.org/chromium/chromium/src/+/main:net/docs/certificate-transparency.md?q=CERTIFICATE_TRANSPARENCY_REQUIRED&ss=chromium%2Fchromium%2Fsrc&start=31:

However, as Google Chrome looks to roll out a more rigorous enforcement of Certificate Transparency, by enforcing that newly-issued certificates are disclosed as a condition of being trusted, the risks to the CA and CT ecosystem significantly increase if embedders implement CT without the ability for reliable, rapid updates, keeping track with ongoing development in the main tree and reliably delivering security updates on the same cadence as Chromium branches and Google Chrome releases.

For this reason, the CT implementation is undergoing a refactoring to reduce those risks through code and implementation. As a result, Chromium embedders will NOT have CT enforcement enabled by default, and are NOT encouraged to manually enable it at this time.

@fmarier fmarier self-assigned this Apr 30, 2022
@fmarier
Copy link
Member Author

fmarier commented May 14, 2022

The reason CT enforcement is disabled in Brave is that the RequireCTDelegate doesn't change the default CT policy. This delegate is set based on params_->enforce_chrome_ct_policy which is set based on IsCertificateTransparencyEnabled().

Removing the GOOGLE_CHROME_BRANDING and OFFICIAL_BUILD checks:

diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/sys>
index 0269a74140c80..7b72a383bc279 100644
--- a/chrome/browser/net/system_network_context_manager.cc
+++ b/chrome/browser/net/system_network_context_manager.cc
@@ -896,7 +896,8 @@ bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() {
   return true;
 #endif
 #else
-  return false;
+  //return false;
+  return true;
 #endif
 }

I was able to make the test page work.

@fmarier
Copy link
Member Author

fmarier commented Jun 2, 2022

Before we enable this, we need to ensure that SCT auditing is turned off and not sending any data.

See https://source.chromium.org/chromium/chromium/src/+/main:chrome/common/chrome_features.cc;l=864-872;drc=a8473792f0f00c3574886d861118219f54fd3620 for the feature flag.

@fmarier fmarier added the priority/P3 The next thing for us to work on. It'll ride the trains. label Aug 4, 2022
@fmarier fmarier added QA/Yes release-notes/include and removed OS/Android Fixes related to Android browser functionality labels Apr 7, 2023
@fmarier fmarier changed the title Investigate adding support for Certificate Transparency in Brave Add support for Certificate Transparency in Brave Apr 7, 2023
fmarier added a commit to brave/brave-core that referenced this issue Apr 12, 2023
This makes Brave follow the same Certificate Transparency policy
as Chrome for TLS certificates.

It also excludes Brave hostnames which are involved with browser
updates in order to ensure that updates always work even if the
certificate transparency code breaks in the future.
fmarier added a commit to brave/brave-core that referenced this issue Apr 13, 2023
This makes Brave follow the same Certificate Transparency policy
as Chrome for TLS certificates.

It also excludes Brave hostnames which are involved with browser
updates in order to ensure that updates always work even if the
certificate transparency code breaks in the future.
fmarier added a commit to brave/brave-core that referenced this issue Apr 18, 2023
This makes Brave follow the same Certificate Transparency policy
as Chrome for TLS certificates.

It also excludes Brave hostnames which are involved with browser
updates in order to ensure that updates always work even if the
certificate transparency code breaks in the future.
fmarier added a commit to brave/brave-core that referenced this issue May 4, 2023
This makes Brave follow the same Certificate Transparency policy
as Chrome for TLS certificates.

It also excludes Brave hostnames which are involved with browser
updates in order to ensure that updates always work even if the
certificate transparency code breaks in the future.
fmarier added a commit to brave/brave-core that referenced this issue May 8, 2023
This makes Brave follow the same Certificate Transparency policy
as Chrome for TLS certificates.

It also excludes Brave hostnames which are involved with browser
updates in order to ensure that updates always work even if the
certificate transparency code breaks in the future.
fmarier added a commit to brave/brave-core that referenced this issue May 15, 2023
This makes Brave follow the same Certificate Transparency policy
as Chrome for TLS certificates.

It also excludes Brave hostnames which are involved with browser
updates in order to ensure that updates always work even if the
certificate transparency code breaks in the future.
fmarier added a commit to brave/brave-core that referenced this issue May 19, 2023
This makes Brave follow the same Certificate Transparency policy
as Chrome for TLS certificates.

It also excludes Brave hostnames which are involved with browser
updates in order to ensure that updates always work even if the
certificate transparency code breaks in the future.
@brave-builds brave-builds added this to the 1.53.x - Nightly milestone May 19, 2023
@stephendonner
Copy link

Verification PASSED using

Brave 1.53.67 Chromium: 114.0.5735.53 (Official Build) beta (x86_64)
Revision c499d7ea22c8b2dba278465a5df7b86a8efa4e64-refs/branch-heads/5735@{#970}
OS macOS Version 11.7.7 (Build 20G1345)

Steps:

  1. installed 1.53.67
  2. launched Brave
  3. opened https://no-sct.badssl.com in Brave
  4. confirmed the TLS error page with code NET::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED
  5. opened https://sct-exempted.bravesoftware.com in Chrome
  6. confirmed the TLS error page NET::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED
  7. opened https://sct-exempted.bravesoftware.com in Brave
  8. confirmed that the page loaded fine
  9. opened the same page in Chrome
  10. confirmed I got the above ERR_CERTIFICATE... page
no-sct.badssl.com Brave no-sct.badssl.com Chrome sct-exempted.bravesoftware.com/ Brave sct-exempted.bravesoftware.com Chrome
Screen Shot 2023-05-26 at 10 47 21 PM Screen Shot 2023-05-26 at 10 52 54 PM Screen Shot 2023-05-26 at 10 53 59 PM Screen Shot 2023-05-26 at 10 54 16 PM

@MadhaviSeelam
Copy link

Verification PASSED using

Brave | 1.53.76 Chromium: 114.0.5735.90 (Official Build) beta (64-bit)
-- | --
Revision | 386bc09e8f4f2e025eddae123f36f6263096ae49-refs/branch-heads/5735@{#1052}
OS | Windows 11 Version 22H2 (Build 22621.1702)

Steps:

  1. installed 1.53.76
  2. launched Brave
  3. opened https://no-sct.badssl.com in Brave
  4. confirmed the TLS error page with code NET::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED
  5. opened https://sct-exempted.bravesoftware.com in Chrome
  6. confirmed the TLS error page NET::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED
  7. opened https://sct-exempted.bravesoftware.com in Brave
  8. confirmed that the page loaded fine
Brave (step 4) Chrome (step 6) Brave(step 8)
image image image

@stephendonner
Copy link

stephendonner commented Jun 9, 2023

Verification PASSED using

Brave 1.53.87 Chromium: 114.0.5735.110 (Official Build) beta (64-bit) 
Revision 1c828682b85bbc70230a48f5e345489ec447373e-refs/branch-heads/5735_90@{#13}
OS Linux

Steps:

  1. installed 1.53.87
  2. launched Brave
  3. opened https://no-sct.badssl.com in Brave
  4. confirmed the TLS error page with code NET::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED
  5. opened https://sct-exempted.bravesoftware.com in Chrome
  6. confirmed the TLS error page NET::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED
  7. opened https://sct-exempted.bravesoftware.com in Brave
  8. confirmed that the page loaded fine
  9. opened the same page in Chrome
  10. confirmed I got the above ERR_CERTIFICATE... page
no-sct.badssl.com Brave no-sct.badssl.com Chrome sct-exempted.bravesoftware.com/ Brave sct-exempted.bravesoftware.com Chrome
Screen Shot 2023-06-09 at 4 05 05 PM Screen Shot 2023-06-09 at 4 06 51 PM Screen Shot 2023-06-09 at 3 45 38 PM Screen Shot 2023-06-09 at 4 08 20 PM

@stephendonner stephendonner added QA/In-Progress Indicates that QA is currently in progress for that particular issue QA Pass-Linux and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Jun 9, 2023
@LaurenWags LaurenWags changed the title Add support for Certificate Transparency in Brave [Security] Add support for Certificate Transparency in Brave Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants