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

[release/8.0] Add support for Chromium Snap cert trust #57257

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 10, 2024

Backport of #57256 to release/8.0

/cc @amcasey

Add support for Chromium Snap cert trust

This adds one more well-known browser trust store location.

Description

This is a follow-up to #57108. That change didn't properly cover the Snap version of Chromium. When I was testing locally, I was launching Chromium from the command line so I could use strace to see how it was querying trust. It turns out that running the same exe via the command line is not equivalent to launching it via the GUI - the GUI wraps it in some sort of "confinement" that forces it to use a snap-specific trust database, rather than the one shared by regular Chromium-based browsers.

Customer Impact

If you install Chrome or Edge via .deb/.rpm, the dev cert works as expected but, if you install it via snap, it will report localhost as untrusted.

The mitigation is export DOTNET_DEV_CERTS_NSSDB_PATHS=$HOME/snap/chromium/current/.pki/nssdb

Regression?

  • Yes
  • No

This functionality hasn't shipped yet.

Risk

  • High
  • Medium
  • Low

We already have a list of well-known folders - this is just one more.

Verification

  • Manual (required)
  • Automated

CTI caught it in manual validation and I validated the fix myself. I'll let them know about the update.

Packaging changes reviewed?

  • Yes
  • No
  • N/A

I thought this already worked, but it turns out it behaves differently depending on how you launch it.  When it is launched as a snap (vs from the command line), it can only access things in its own folder, so it looks in a different NSS DB for trusted certs.  Fixing this is as simple as adding one more well-known location to the list.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI label Aug 10, 2024
@dotnet-policy-service dotnet-policy-service bot added this to the 8.0.x milestone Aug 10, 2024
@amcasey amcasey added the Servicing-consider Shiproom approval is required for the issue label Aug 10, 2024
@amcasey
Copy link
Member

amcasey commented Aug 10, 2024

This does not cover Chrome or Edge snaps, which AFAICT, do not exist. We'd need to know their folder structures to support them pre-emptively, so those will have to light up in future releases (or we can direct people to use DOTNET_DEV_CERTS_NSSDB_PATHS).

@amcasey
Copy link
Member

amcasey commented Aug 11, 2024

Looks like whatever fix/quarantine we applied to the E2E tests in main didn't make it to release/8.0?

@amcasey
Copy link
Member

amcasey commented Aug 12, 2024

Probably #57153

@amcasey amcasey added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Aug 12, 2024
@amcasey
Copy link
Member

amcasey commented Aug 12, 2024

Approved over email.

@wtgodbe wtgodbe merged commit 16374e2 into release/8.0 Aug 12, 2024
23 of 25 checks passed
@wtgodbe wtgodbe deleted the backport/pr-57256-to-release/8.0 branch August 12, 2024 17:11
@dotnet-policy-service dotnet-policy-service bot modified the milestones: 8.0.x, 8.0.9 Aug 12, 2024
@rbhanda rbhanda modified the milestones: 8.0.9, 8.0.10 Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants