-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
RBAC not Working #18634
Comments
Perhaps I have not included a necessary permissions flag? That being said, I have tested user roles who are give all permissions (except datasource access obviously, as this is why I am using RBAC.....) |
DASHBOARD_RBAC is the feature flag you enabled right. |
I had a similar issue: User 1 - has access to a dataset via role AlphaCopy (all datasource access is removed) Now feature flag is enabled and access is set as follows: Outcome expected: User 1 will have access to Dashboard 1 and Dashboard 2, User 2 will have access to only Dashboard 1 I then gave specific access to Dashboard 1 to role AlphaCopy and GammaCopy. Same result How exactly is the FEATURE FASHBOARD_RBAC supposed to work? |
I can confirm @srinisubramanian's observation. Same for me. I also pulled a fresh image without any modification (apart from the FF) to double check. The FF is not stable! Please investigate. |
Ping @amitmiran137 , have you run into this? We're hoping to push out 1.5.1 in 1-2 weeks, so if this feature is currently broken it would be nice to get a fix for this in. |
Are you using the DASHBOARD_RBAC ff? Ehy not use the new UI for editing a dashboard We use it as one of the core features we use and it does work Please answer those questions sk we can proceed |
I just tested this again with 1.5.0 and it works. Maybe it was an older version issue? |
Thanks @amitmiran137 and @srinisubramanian ! so we're ok closing this with the assumption that upgrading to 1.5 should fix the problem? |
I guess so @villebro as of now the feature flag works after the upgrade to 1.5.0 that I did. |
Alright, this has become a bit unstructured. I was just picking up on parts of #18634 (comment) but actually my problem is described in #17227 |
As mentioned elsewhere it's working good for me. The only catch is I had to give access to users on each dashboard. Default access didn't work. Did you also run superset init? If not please try that. |
could be a duplicate ticket to #19988 (happens also on V2.0.0) |
The error is in in the has_rbac_access function
Delete the "not" and everything works as expected. Sorry, first post here, have to read up on how to officially post such things. |
Sorry @benjamin-mueller, that doesn't make sense. Your solution would completely bypass any role management introduced with the feature flag and grant all access, only because the FF is enabled. |
The role management is done somewhere else, as mentioned in the parent function
superset/superset/security/manager.py Line 1916 in 2d16100
We tested it on our systems with roles assigned and it worked as expected, sorry. |
FYI I believe I've hit this issue, and I'm working on a fix for it |
I can confirm that DASHBOARD_RBAC works on 1.5.1. We want to upgrade to 2.0.1 but fear that it will impact our production users if this is broken in 2.0.0. A fix will be really appreciated. |
Agreed that there is a gap in user access, we're on 2.0.0, with
This way all users can login, see the dashboard, but only see rows they are associated with. The issue now is we are getting the The other issue is datasets associated with native filters, when working around the above issue by adding my test user as an owner so it can hit the dashboard I'm getting permission errors on all native filters that utilize datasets NOT used by the dashboard. I believe the root of this is that hitting the dashboard/ID/datasets endpoint only returns chart datasets and not filters. |
Hey guys, I also had the same issue in both versions BUT after inspecting the code (specifically func ...
can_access = (
is_user_admin()
or is_owner(dashboard, g.user)
or (dashboard.published and has_rbac_access()). # <<HERE<<: dashboard.published
or (not dashboard.published and not dashboard.roles)
)
... If I set the dashboard status to I don't know if this solves your issues, but I hope it helps :) |
Which version should I use ? Feature flags still not working |
correct way to enable dashboard rbac is to add following to superset_config.py FEATURE_FLAGS = { |
@mdeshmu thank u a lot, it worked |
Hi @mdeshmu thank u a lot, it worked. I hope for this issue can be closed since it worked on my local. |
@villebro can we close this issue? |
Please take a look at #23586 |
it works for me and my superset verison is 2.1.0. it's interesting the dashboard rbac works on development like run it on PyCharm even though the status is draft, but on live you need to change it to Published. |
May I ask how did you resolve this RBAC issue? After publishing my dashboard, I still don't see the role-based access drop-down menu, mine just looks similar to this using v2.1.0 Did you change anything in .py files other than adding FEATURE_FLAGS = {"DASHBOARD_RBAC": True} to superset_config.py? |
+++ |
@wulfuric Our current workaround is to create a dummy chart from the filter dataset and hide it somewhere in the dashboard but that does not feel like a proper solution. :-/ |
Problem: Role Based Access Control is not enabling users to view Dashboards correctly.
Feature flag enabled: RBAC
Browser: Firefox
Superset Version 1.4
Background: I have assigned a user a role AlphaDG (essentially Gamma) and have assigned this role to a dashboard.
Expected outcome: Even though the user has not been assigned access to the underlying dataset(s), this user should be able to see the dashboard.
Actual outcome: The user is not able to see the dashboard (whether published or not)
The text was updated successfully, but these errors were encountered: