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

feat(embedded): enforce allow domains #20251

Merged

Conversation

lilykuang
Copy link
Member

SUMMARY

  • enforce allow domains list for embedded

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Jun 3, 2022

Codecov Report

Merging #20251 (c507336) into master (d1c24f8) will decrease coverage by 0.16%.
The diff coverage is 0.00%.

❗ Current head c507336 differs from pull request most recent head d0d0010. Consider uploading reports for the commit d0d0010 to get more accurate results

@@            Coverage Diff             @@
##           master   #20251      +/-   ##
==========================================
- Coverage   66.65%   66.49%   -0.17%     
==========================================
  Files        1729     1726       -3     
  Lines       64906    64799     -107     
  Branches     6842     6831      -11     
==========================================
- Hits        43266    43090     -176     
- Misses      19891    19977      +86     
+ Partials     1749     1732      -17     
Flag Coverage Δ
javascript 51.32% <0.00%> (-0.26%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset-frontend/src/embedded/index.tsx 0.00% <0.00%> (ø)
superset-frontend/src/types/bootstrapTypes.ts 100.00% <ø> (ø)
...nd/plugins/plugin-chart-table/src/controlPanel.tsx 16.66% <0.00%> (-34.08%) ⬇️
superset-frontend/src/explore/store.js 58.33% <0.00%> (-33.34%) ⬇️
superset/db_engine_specs/trino.py 71.42% <0.00%> (-20.51%) ⬇️
...et-ui-chart-controls/src/shared-controls/index.tsx 37.03% <0.00%> (-17.60%) ⬇️
...tend/plugins/plugin-chart-echarts/src/controls.tsx 56.66% <0.00%> (-6.67%) ⬇️
...et-frontend/src/explore/reducers/exploreReducer.js 28.75% <0.00%> (-6.04%) ⬇️
...ontend/src/explore/controlUtils/getControlState.ts 85.18% <0.00%> (-5.56%) ⬇️
...-frontend/src/components/CopyToClipboard/index.jsx 96.00% <0.00%> (-4.00%) ⬇️
... and 75 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1c24f8...d0d0010. Read the comment docs.

Copy link
Member

@suddjian suddjian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this check in the backend, on the /embedded/:uuid view. If the domain is not in the list, we can return an error message instead of rendering the embedded page at all.

@pull-request-size pull-request-size bot added size/S and removed size/M labels Jun 7, 2022
@lilykuang lilykuang requested a review from suddjian June 7, 2022 23:18
@lilykuang lilykuang merged commit f53018c into apache:master Jun 17, 2022
@lilykuang lilykuang deleted the lily/enforce-embedded-allowed-domains branch June 17, 2022 19:57
akshatsri pushed a commit to charan1314/superset that referenced this pull request Jul 19, 2022
* feat(embedded): enforce allow domains

* check referrer in view

* remove frontend check
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels preset-io size/S 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants