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(query): add privilege check for select #9924

Merged
merged 6 commits into from
Feb 10, 2023

Conversation

yufan022
Copy link
Contributor

@yufan022 yufan022 commented Feb 7, 2023

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

Summary about this PR

Closes #9923

@vercel
Copy link

vercel bot commented Feb 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated
databend ⬜️ Ignored (Inspect) Feb 10, 2023 at 11:16AM (UTC)

@yufan022
Copy link
Contributor Author

yufan022 commented Feb 7, 2023

@BohuTANG PTAL, if my way is right i will add more test

@yufan022 yufan022 changed the title add privilege check for select feat(query): add privilege check for select Feb 9, 2023
@mergify mergify bot added the pr-feature this PR introduces a new feature to the codebase label Feb 9, 2023
@yufan022 yufan022 marked this pull request as ready for review February 9, 2023 07:59
@yufan022
Copy link
Contributor Author

yufan022 commented Feb 9, 2023

Added stateless testing

@sundy-li sundy-li requested a review from TCeason February 9, 2023 08:13
@TCeason TCeason requested a review from flaneur2020 February 9, 2023 08:14
@BohuTANG
Copy link
Member

Conflicting files
src/query/service/src/interpreters/access/privilege_access.rs

@xudong963
Copy link
Member

Need someone who is familiar with privilege to review the related part. cc @BohuTANG

Copy link
Member

@BohuTANG BohuTANG left a comment

Choose a reason for hiding this comment

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

👍

@yufan022
Copy link
Contributor Author

view privilege check have not support too complex scenarios.

just support:

create database default;
create table default.test(a varchar);

create database default2;
create view default2.v_test as select * from default.test;

not support:

create view default2.v_test2 as select * from default.v_test;
or
create view default2.v_test2 as select * from (select * from default.test);
...

@BohuTANG BohuTANG merged commit 9e1b204 into databendlabs:main Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: privilege check for SELECT TABLE or VIEW
3 participants