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

[Bug] [Authz] The subquery authorization for the InsertIntoHiveDirCommand statement did not take effect. #4658

Closed
3 of 4 tasks
Karsonnel opened this issue Apr 4, 2023 · 0 comments
Labels
kind:bug This is a clearly a bug priority:major

Comments

@Karsonnel
Copy link
Contributor

Karsonnel commented Apr 4, 2023

Code of Conduct

Search before asking

  • I have searched in the issues and found no similar issues.

Describe the bug

When i don't have permission to execute sql: SELECT * FROM table_a,
i still have permission to execute the sql: INSERT OVERWRITE DIRECTORY '/tmp/test_dir' ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' SELECT * FROM table_a

Affects Version(s)

master

Kyuubi Server Log Output

No response

Kyuubi Engine Log Output

No response

Kyuubi Server Configurations

No response

Kyuubi Engine Configurations

No response

Additional context

No response

Are you willing to submit PR?

  • Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
  • No. I cannot submit a PR at this time.
@Karsonnel Karsonnel added kind:bug This is a clearly a bug priority:major labels Apr 4, 2023
@Karsonnel Karsonnel changed the title [Bug] The subquery authorization for the InsertIntoHiveDirCommand statement did not take effect. [Bug] [Authz] The subquery authorization for the InsertIntoHiveDirCommand statement did not take effect. Apr 4, 2023
@pan3793 pan3793 closed this as completed in 7a83901 Apr 4, 2023
pan3793 pushed a commit that referenced this issue Apr 4, 2023
…o that we can extract the query in it when authorization.

### _Why are the changes needed?_

To fix #4658.

### _How was this patch tested?_

Add ut that will run a InsertHiveDirCommand which query from a no permission table

- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4660 from Karsonnel/4658-authz-insert.

Closes #4658

1dfb60e [Karsonnel] fix style
8063ec0 [Karsonnel] Update PrivilegesBuilderSuite.scala
4c6c8e1 [Karsonnel] add a test in privilegeBuilderSuite
5c652d3 [root] fix InsertIntoHiveDirCommand classname

Lead-authored-by: Karsonnel <747100667@qq.com>
Co-authored-by: root <root@example.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit 7a83901)
Signed-off-by: Cheng Pan <chengpan@apache.org>
pan3793 pushed a commit that referenced this issue Apr 7, 2023
### _Why are the changes needed?_

To allow up the reviewer's comment in  #4660.

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4661 from Karsonnel/4658-authz-insert-follow-up.

Closes #4658

3ce7efc [Karsonnel] add e2e test for InsertIntoDatasourceCommand
2c8e346 [Karsonnel] rename test
1349c2b [Karsonnel] fix test assert text
d2f04ca [Karsonnel] fix test
8f86bb1 [Karsonnel] Resolve reviewer's comment in pr #4660

Authored-by: Karsonnel <747100667@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
pan3793 pushed a commit that referenced this issue Apr 7, 2023
### _Why are the changes needed?_

To allow up the reviewer's comment in  #4660.

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4661 from Karsonnel/4658-authz-insert-follow-up.

Closes #4658

3ce7efc [Karsonnel] add e2e test for InsertIntoDatasourceCommand
2c8e346 [Karsonnel] rename test
1349c2b [Karsonnel] fix test assert text
d2f04ca [Karsonnel] fix test
8f86bb1 [Karsonnel] Resolve reviewer's comment in pr #4660

Authored-by: Karsonnel <747100667@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit 5faebb1)
Signed-off-by: Cheng Pan <chengpan@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug This is a clearly a bug priority:major
Projects
None yet
1 participant