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

Test cross origin isolation with webview extensions #158792

Closed
10 tasks done
jrieken opened this issue Aug 22, 2022 · 4 comments
Closed
10 tasks done

Test cross origin isolation with webview extensions #158792

jrieken opened this issue Aug 22, 2022 · 4 comments

Comments

@jrieken
Copy link
Member

jrieken commented Aug 22, 2022

Refs: #137884

Complexity: 4

Create Issue


Background: On vscode.dev, we have the ability to enable cross origin isolation - that's the enabler for shared array buffers which unlocks many interesting scenarios (like "vscode-wasi") and 1st level TypeScript/Pylance support. Enabling cross origin isolation (COI) requires us to set two http header COOP and COEP. The latter means only resources that are OK with being embedded will load. This doesn't affect resources from VS Code itself but can affect resources that extensions load. They need to be served with the CORP header.

Testing: Check-off one of the extensions below and play around with their webview (or notebook renderering) features, like GitLens settings editor etc. Observe dev tools for errors

  • load https://insiders.vscode.dev/ with the ?vscode-coi-query part
  • open Developer Tool, select the "Network" tab, and check "Blocked Request"
  • Keep an eye open for blocked requests
  • ℹ️ we cannot fix these errors but we need to reach out to the server/CDN that serve these resources. Just append the blocked domains/urls to this issue, only file an issue against the extension if you are certain that they can fix it (inside knowledge)

The sample below is GitHub issue notebook. Notice how avatars aren't loading and how each request shows as blocked.

Screenshot 2022-08-22 at 19 31 14


@jrieken jrieken added this to the August 2022 milestone Aug 22, 2022
@jrieken
Copy link
Member Author

jrieken commented Aug 22, 2022

Servers that don't set the CORP header:

  1. https://avatars.githubusercontent.com/ (see sample above)
  2. https://ms-toolsai.gallery.vsassets.io/_apis/public/gallery/publisher/ms-toolsai/extension/jupyter-renderers/1.0.9/assetbyname/Microsoft.VisualStudio.Services.Icons.Default (Example of just one, but all extension gallery icons)
  3. https://raw.githubusercontent.com/
  4. https://microsoft.github.io

@lramos15 lramos15 self-assigned this Aug 22, 2022
@Tyriar Tyriar self-assigned this Aug 22, 2022
@kieferrm kieferrm self-assigned this Aug 22, 2022
@lramos15 lramos15 removed their assignment Aug 23, 2022
@eleanorjboyd
Copy link
Member

ExcelViewer did not have any blocked request when running the extension on .xlsx or .csv files. When searching for and selecting to install the extension I did run into some blocked requests which came from the images and icons on the profile of ExcelViewer on our extension storefront. I included a screenshot below of the number and an example of the image icon for ExcelViewer not rendering.
Screen Shot 2022-08-23 at 10 00 07 AM

@rzhao271 rzhao271 assigned rzhao271 and unassigned justschen Aug 23, 2022
@rzhao271
Copy link
Contributor

Volar

Blocked links

https://cdn.jsdelivr.net/gh/johnsoncodehk/sponsors/sponsors.png
https://user-images.githubusercontent.com/3253920/145134536-7bb090e9-9dcd-4a61-8096-3c47d6c1a699.png

Other issues

I'm unable to get the extension working in the web. The volar.activated context key is true, but when I try running a Volar command, I get "command not found". There already seems to be an upstream issue at vuejs/language-tools#612.

@Tyriar Tyriar removed their assignment Aug 23, 2022
@kieferrm
Copy link
Member

I worked through the golden scenario of jupyter. Everything worked as expected in regards to COI. However, the surface area of Jupyter is much bigger, so there can still be surprises.

@kieferrm kieferrm removed their assignment Aug 25, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants