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

refactor: Move raise_for_dashboard_access to security manager #13235

Merged
merged 1 commit into from
Feb 23, 2021

Conversation

bolkedebruin
Copy link
Contributor

@bolkedebruin bolkedebruin commented Feb 19, 2021

SUMMARY

Access policies might be stored or obtained externally from Superset (e.g. by a sidecar with Open Policy Agent or Apache Ranger). raise_for_dashboard_access was located in "dashboard" so it could not be overridden by a security manager implementation. This aligns the implementation with other security features.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

This has the same logic as before so same tests apply.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

cc @amitmiran137

@codecov-io
Copy link

codecov-io commented Feb 19, 2021

Codecov Report

Merging #13235 (0e7dfee) into master (2ce7982) will increase coverage by 27.07%.
The diff coverage is 79.77%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #13235       +/-   ##
===========================================
+ Coverage   53.06%   80.13%   +27.07%     
===========================================
  Files         489      298      -191     
  Lines       17314    24194     +6880     
  Branches     4482        0     -4482     
===========================================
+ Hits         9187    19388    +10201     
+ Misses       8127     4806     -3321     
Flag Coverage Δ
cypress ?
python 80.13% <79.77%> (?)

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

Impacted Files Coverage Δ
superset/constants.py 100.00% <ø> (ø)
superset/examples/birth_names.py 73.19% <ø> (ø)
superset/models/dashboard.py 76.77% <ø> (ø)
superset/connectors/sqla/views.py 62.43% <4.34%> (ø)
superset/views/datasource.py 88.70% <16.66%> (ø)
superset/viz.py 58.61% <27.27%> (ø)
superset/views/core.py 71.80% <71.42%> (ø)
superset/charts/commands/exceptions.py 92.85% <77.77%> (ø)
superset/utils/core.py 88.26% <87.50%> (ø)
superset/db_engine_specs/trino.py 90.47% <90.47%> (ø)
... and 695 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 fcd443d...0e7dfee. Read the comment docs.

@bolkedebruin bolkedebruin changed the title Move raise_for_dashboard_access to security manager refactor: Move raise_for_dashboard_access to security manager Feb 19, 2021
raise_for_dashboard_access is part of dashboard and cannot
be overridden by a security manager.
Copy link
Member

@amitmiran137 amitmiran137 left a comment

Choose a reason for hiding this comment

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

LGTM!

@junlincc junlincc added the dashboard:security:access Related to the security access of the Dashboard label Feb 23, 2021
@dpgaspar
Copy link
Member

LGMT Thank you @bolkedebruin

@dpgaspar dpgaspar merged commit 99a0c8a into apache:master Feb 23, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 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 dashboard:security:access Related to the security access of the Dashboard size/M 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants