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

Security: table permission #30906

Open
3 tasks done
hardstuding opened this issue Nov 13, 2024 · 5 comments
Open
3 tasks done

Security: table permission #30906

hardstuding opened this issue Nov 13, 2024 · 5 comments
Labels
authentication:access-control Rlated to access control

Comments

@hardstuding
Copy link

hardstuding commented Nov 13, 2024

Bug description

User can get limit asccess on tables but when he(r) create datasets on it, himself(or herself) can't view the datesets

Use Admin User to set role "test", then set user "test test" the role "test".
The user "test test" do not have the access to the database or schema.

Give two permissions, you can see on the picture.
image

Then, user "test test" can access the the physical table on sql lab. I can use this method to authorize permission on tables, even it is not efficient.
image

But, when I use user "test test" using the table to create a virtual dataset "test_can_use_table", the user can't see it on datasets tab.
image
image

I think that user "test test" should see the dataset it created. And it need not the Admin authority again.
So I think it is a bug.

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@hardstuding hardstuding changed the title Security: user can get limit asccess on tables but when he(r) create datasets on it self can't view the datesets Security: user can get limit asccess on tables but when he(r) create datasets on it, himself(or herself) can't view the datesets Nov 13, 2024
@dosubot dosubot bot added the authentication:access-control Rlated to access control label Nov 13, 2024
Copy link

dosubot bot commented Nov 13, 2024

@hardstuding Hello there! I'm here to assist you with any bugs, questions, or contributions you have for the project. Let's tackle this together!

The issue you're experiencing might be related to the permissions set for the user role "test." In Apache Superset, when a user creates a virtual dataset, they need specific permissions to view it. Here are a few things to check:

  1. Dataset Permissions: Ensure that the role "test" has the necessary permissions to access the newly created virtual dataset. This includes permissions like "datasource_access" for the specific dataset.

  2. Role Configuration: Verify that the role "test" is configured to allow viewing datasets. You might need to explicitly grant access to the virtual dataset after it's created.

  3. Permission Updates: When a virtual dataset is created, Superset should automatically update permissions. However, if there are issues with this process, you might need to manually adjust permissions for the dataset.

  4. Check Logs: Review the Superset logs for any errors or warnings related to permission handling when the dataset is created. This might provide more insight into what's going wrong.

If these steps don't resolve the issue, it might be a bug in the current version you're using, and further investigation or a workaround might be necessary.

To continue talking to Dosu, mention @dosu.

@hardstuding hardstuding changed the title Security: user can get limit asccess on tables but when he(r) create datasets on it, himself(or herself) can't view the datesets Security: table permission Nov 13, 2024
@AnTapTanhCode
Copy link

i think you can try add permission access for database of table you use.

@hardstuding
Copy link
Author

i think you can try add permission access for database of table you use.

But I want the user can only get limit permission on some tables, not all database.

@AnTapTanhCode
Copy link

AnTapTanhCode commented Nov 14, 2024

But I want the user can only get limit permission on some tables, not all database.

I need to clarify a little. Can you tell me the permissions granted to user "test test" ? Because I see that the "test test" user can access other datasets as well.

@hardstuding
Copy link
Author

But I want the user can only get limit permission on some tables, not all database.

I need to clarify a little. Can you tell me the permissions granted to user "test test" ? Because I see that the "test test" user can access other datasets as well.

I just give user "test test" two databases permission, include "superset_upload" and "example". The other permission which about database is the first picture you can see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authentication:access-control Rlated to access control
Projects
None yet
Development

No branches or pull requests

2 participants