apache / apache/kyuubi

[Bug] Currently executing SQL: select count(1) from xxx Permissions cannot be controlled

Open
#7,173 0 comments 0 reactions 0 assignees View on GitHub
kind:bug priority:major
Dominant language
Scala
Stars
2.4k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

### Code of Conduct

- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

### Search before asking

- [x] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues.

### Describe the bug

Ordinary users do not have permission to a certain table. Under normal circumstances, executing the following SQL will result in an error:
select *from test.

However, if the following SQL is executed, it can be executed successfully. The permission is not controlled:
select count(1) from test;
select *from test where id="222"

### Affects Version(s)

1.9.0

### Kyuubi Server Log Output

```logtalk

```

### Kyuubi Engine Log Output

```logtalk

```

### Kyuubi Server Configurations

```yaml

```

### Kyuubi Engine Configurations

```yaml

```

### Additional context

_No response_

### Are you willing to submit PR?

- [x] 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.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported behavior on Kyuubi 1.9.0 with the three SQL examples and an ordinary user who lacks access to the table. Trace how table permissions are checked for direct selection, COUNT, and the filtered query; done means each unauthorized query is rejected consistently, with focused regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala, sql
Domain
authorization, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.