HomeElementl

[dagit] Enable limited frame-src

Description

[dagit] Enable limited frame-src

Summary:
As reported on Slack.

Re-enable frame-src CSP directive to allow showing ipynb iframes. Allowed on localhost for dev, otherwise 'self'. This has been broken since the CSP was released.

I've added sandbox to the iframe to keep it a bit more locked down, since I don't really know how dangerous the rendered contents actually are. It doesn't seem like they need any JavaScript, but I assume if they do, someone is going to report bugs to us fairly quickly.

Test Plan:
Run dagit with dagstermill repo:

$ dagit -p 3333 -m dagstermill.examples.repository

Use "View notebook" in job overviews to view the notebook dialog. Verify that there are no CSP issues, and that the notebook renders as expected, with appropriate styling.

Repeat with a prod build.

Reviewers: bengotow, max, yuhan, prha

Reviewed By: prha

Differential Revision: https://dagster.phacility.com/D9210

Details

Provenance
dishAuthored on Aug 9 2021, 2:25 PM
Reviewer
prha
Differential Revision
D9210: [dagit] Enable limited frame-src
Parents
R1:3d023de29da3: public api guidelines (#4446)
Branches
Unknown
Tags
Unknown