-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Remove frame-ancestors * CSP directive
#4332
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
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
@googlebot I signed it! |
|
I will try to cherry pick this change to make sure it does not negatively impact Colab and other services. |
|
Manually checked internal version and Colab and noticed no regression. LGTM! |
|
Weird. Thanks for filing the upstream issue! |
|
…and congrats on the launch! :-) |
This PR essentially reverses #2797. Currently this doesn't work because the `frame-ancestors *` directive prevents VS Code from framing TensorBoard. This is because VS Code is an Electron application, and Electron appears to be unable to frame websites which set `frame-ancestors *` in its response headers: electron/electron#26369 If I'm reading the CSP specification correctly, omitting the frame-ancestors directive altogether is equivalent to setting `frame-ancestors *`, so to my knowledge this PR should not result in a behavior change for environments which correctly implement the CSP spec. From https://w3c.github.io/webappsec-csp/2/#directive-frame-ancestors: > The term allowed frame ancestors refers to the result of parsing the frame-ancestors directive’s value as a source list. If a frame-ancestors directive is not explicitly included in the policy, then allowed frame ancestors is "*".
Backport of #4332 to 2.4. Cf. #4547. --- This PR essentially reverses #2797. Currently this doesn't work because the `frame-ancestors *` directive prevents VS Code from framing TensorBoard. This is because VS Code is an Electron application, and Electron appears to be unable to frame websites which set `frame-ancestors *` in its response headers: electron/electron#26369 If I'm reading the CSP specification correctly, omitting the frame-ancestors directive altogether is equivalent to setting `frame-ancestors *`, so to my knowledge this PR should not result in a behavior change for environments which correctly implement the CSP spec. From https://w3c.github.io/webappsec-csp/2/#directive-frame-ancestors: > The term allowed frame ancestors refers to the result of parsing the frame-ancestors directive’s value as a source list. If a frame-ancestors directive is not explicitly included in the policy, then allowed frame ancestors is "*". Co-authored-by: Joyce Er <joyceerhuiling@gmail.com>
Motivation for features / changes
Hi! I'm a dev working on adding TensorBoard support to the Python and Jupyter extensions for VS Code. We'd like to enable users to view TensorBoard inline in our Jupyter notebook experience within VS Code.
Currently this doesn't work because the
frame-ancestors *directive prevents VS Code from framing TensorBoard. This is because VS Code is an Electron application, and Electron appears to be unable to frame websites which setframe-ancestors *in its response headers: electron/electron#26369Technical description of changes
This PR essentially reverses #2797.
If I'm reading the CSP specification correctly, omitting the frame-ancestors directive altogether is equivalent to setting
frame-ancestors *, so to my knowledge this PR should not result in a behavior change for environments which correctly implement the CSP spec. From https://w3c.github.io/webappsec-csp/2/#directive-frame-ancestors:Screenshots of UI changes
With this PR, users can now display TensorBoard inline in a Jupyter notebook in VS Code:


Detailed steps to verify changes work correctly (as executed by you)
frame-ancestors *from backend/http_util.pycode --install-extension ms-python.pythonin your shellThank you and please let me know if you have questions about this proposed change!