-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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(dashboard_rbac): provide data access based on dashboard access #13992
Conversation
Is this the default behavior we want to support? I wonder if there's value in creating alternate SecurityManagerPlugins for different use cases, and then if you wanted Mainly asking as I haven't been following this work too closely, and this looks like a fairly specific change (for example it doesn't apply to Druid datasources and assumes that a BaseDatasource is always a SqlaTable) |
the entire feature is under the DASHBOARD_RBAC ff |
it's under the feature flag, but this check is added to the security manager without the feature flag right? should we be checking the flag here too? |
thank you for the input, I added the the FF restriction and the more generic support for table |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, much cleaner implementation! Happy to approve once the new method has some tests.
Codecov Report
@@ Coverage Diff @@
## master #13992 +/- ##
==========================================
- Coverage 79.76% 79.64% -0.12%
==========================================
Files 942 942
Lines 47675 47689 +14
Branches 5984 5984
==========================================
- Hits 38029 37984 -45
- Misses 9525 9584 +59
Partials 121 121
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass comments
Co-authored-by: Ville Brofeldt <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor comments. Should we update this string to state that granting a role access to a dashboard will bypass datasource level checks?
superset/superset/views/dashboard/mixin.py
Lines 68 to 69 in 2c96c5b
"These roles are always applied in addition to restrictions on dataset " | |
"level access. " |
IMO we should just change the string the explains instead of an additional feature flag. That way both use cases could live on different dashboards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the adjustments, looks good!
* master: (53 commits) test: Adds tests to the UndoRedoKeyListeners component (#13919) chore: Adds dataMask reducer to reducerIndex (#13951) test: Tests audit for the Dashboard FilterBar (#13916) fix: unable to apply logging format (#14074) refactor: Bootstrap to AntD - Slider (#13989) chore(spa refactor): refactoring dashboard to use api's instead of bootstrapdata (#13306) fix(listview): update listview feature flag (#13906) Add docs for configuring Docker Compose setup (#13961) feat: invalid password error message (Postgres) (#14038) fix: flacky test in test_update_dataset_item_w_override_columns (#14082) feat: Implement Celery SoftTimeLimit handling (#13740) feat: only send alert error emails to owners of the alert (#13862) feat: add descriptions to report emails (#13827) Make chart exclude itself from cross filtering (#14046) fix: fix bug when remove chart not removing it's related cross filter data (#14081) feat(native-filters): Add default first value to select filter (#13726) feat: Make async query JWT cookie domain configurable (#14007) fix: add exception to catch session not having JWT (#14036) Use consistent chart value (#14031) fix: Use superset generic db to catch external_metadata queries (#13974) ...
Just here to say thanks! I was just starting to implement a rather complex role + user API integration to automate access from our IoT platform. This solves half the problem 👍🏾 |
…pache#13992) * feat: provide data access based onb dashboard access * chore: adjust code after CR comments * fix: add brackets * fix: type * chore: add tests * fix: pre-commit * fix: pre-commit and lint * fix: fix test * fix: pre-commit * fix: fix local pylint warnings * revert: birth_names pylint change bc it affects tests * Update superset/security/manager.py Co-authored-by: Ville Brofeldt <[email protected]> * Update superset/security/manager.py * Update tests/utils_tests.py * fix: after CR * fix: after CR from ville * chore: update roles description Co-authored-by: Ville Brofeldt <[email protected]>
The fallback (to dataset perms) doesn't seem to work on v1.4.1 |
Thank you for pull request on role based controls. I am trying to extend to our(my company) requirement to chart level. |
should we check the
|
SUMMARY
This is the second milestone in dashboard_rbac support where having a dashboard role entitles the user data access to all of the datasets within a dashboard
following @suddjian recommendation on an existing PR, I decided to take a simpler solution
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
dashboard_data_access.mov
TEST PLAN
ADDITIONAL INFORMATION