Skip to content

Commit

Permalink
Frontend Sandbox: Create a plugin sandbox enable registry. Use enable…
Browse files Browse the repository at this point in the history
… list instead of disable list (grafana#94809)

* Use a enable configuration to enable frontend sandbox

* Modify settings to load enableFrontendSandbox

* Check for signature type

* Update commment

* Fix e2e tests for the frontend sandbox

* Modify logic so a custom check function is used instead of a list of checks

* Fixes flaky test

* fix comment

* Update comment

* Empty commit

* Empty commit
  • Loading branch information
academo authored Oct 17, 2024
1 parent beac7de commit f248a55
Show file tree
Hide file tree
Showing 17 changed files with 203 additions and 424 deletions.
5 changes: 3 additions & 2 deletions conf/defaults.ini
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,9 @@ angular_support_enabled = false
# The CSRF check will be executed even if the request has no login cookie.
csrf_always_check = false

# Comma-separated list of plugins ids that won't be loaded inside the frontend sandbox
disable_frontend_sandbox_for_plugins = grafana-incident-app
# Comma-separated list of plugins ids that will be loaded inside the frontend sandbox
# Currently behind the feature flag pluginsFrontendSandbox
enable_frontend_sandbox_for_plugins =

# Comma-separated list of paths for POST/PUT URL in actions. Empty will allow anything that is not on the same origin
actions_allow_post_url =
Expand Down
5 changes: 3 additions & 2 deletions conf/sample.ini
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,9 @@
# The CSRF check will be executed even if the request has no login cookie.
;csrf_always_check = false

# Comma-separated list of plugins ids that won't be loaded inside the frontend sandbox
;disable_frontend_sandbox_for_plugins =
# Comma-separated list of plugins ids that will be loaded inside the frontend sandbox
# Currently behind the feature flag pluginsFrontendSandbox
;enable_frontend_sandbox_for_plugins =

# Comma-separated list of paths for POST/PUT URL in actions. Empty will allow anything that is not on the same origin
;actions_allow_post_url =
Expand Down
5 changes: 2 additions & 3 deletions docs/sources/setup-grafana/configure-grafana/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -729,10 +729,9 @@ List of allowed headers to be set by the user. Suggested to use for if authentic

Set to `true` to execute the CSRF check even if the login cookie is not in a request (default `false`).

### disable_frontend_sandbox_for_plugins
### enable_frontend_sandbox_for_plugins

Comma-separated list of plugins ids that won't be loaded inside the frontend sandbox. It is recommended to only use this
option for plugins that are known to have problems running inside the frontend sandbox.
Comma-separated list of plugins ids that will be loaded inside the frontend sandbox.

## [snapshots]

Expand Down
128 changes: 0 additions & 128 deletions e2e/old-arch/panels-suite/frontend-sandbox-panel.spec.ts

This file was deleted.

71 changes: 0 additions & 71 deletions e2e/old-arch/various-suite/frontend-sandbox-app.spec.ts

This file was deleted.

155 changes: 0 additions & 155 deletions e2e/old-arch/various-suite/frontend-sandbox-datasource.spec.ts

This file was deleted.

Loading

0 comments on commit f248a55

Please sign in to comment.