apache / apache/iotdb

Non-root users with correct query privileges are unable to select a empty timesereis

Open
#4,387 1 comment 0 reactions 0 assignees View on GitHub
Easy-Fixed
Dominant language
Java
Stars
6.4k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
115

Description

How to reproduce:

```sql
# user: root
CREATE USER steve 'steve'

GRANT ROLE application_role PRIVILEGES 'SET_STORAGE_GROUP','CREATE_TIMESERIES','INSERT_TIMESERIES','READ_TIMESERIES','DELETE_TIMESERIES','DROP_FUNCTION','CREATE_FUNCTION','CREATE_TRIGGER','DROP_TRIGGER','START_TRIGGER','STOP_TRIGGER' ON root.test

GRANT application_role TO steve
```

```sql
# user: steve
select sin(s1) from root.test where time >= 2021-01-01 and time<= 2021-01-31 23:59:59
```

Then, you will get:
![image](https://user-images.githubusercontent.com/30497621/141757345-d3439af9-9b36-45a9-9e82-97c09aa08e85.png)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the SQL setup and SELECT as user steve, then compare the behavior with the root user on the empty root.test timeseries. Review the closed pull request #4423 for prior context; done means a non-root user with the listed query privileges can select from the empty timeseries without an authorization error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
authorization, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.