influxdata / influxdata/influxdb
Limiting buckets does not account for access
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
Listing buckets when using the `limit` option does not take into account what buckets the user has access to which leads to expected buckets not showing up.
__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.
1. Create 5 buckets (test1, test2 ... test5)
2. Create a new API token that only grants the user access to test4 and test5
3. Query the bucket list route with a limit of 5. You will note that no buckets are returned.
__Expected behavior:__
I would expect the limit option to account for which buckets a user can see and then reduce from there. If there are 10 total buckets, the user can only interact with 5, and a limit of 3 is passed, the user should see 3 of the 5.
__Actual behavior:__
Depending on the sort order of the buckets, in the above example the user may see anywhere from 0 to 3 buckets.
Contributor guide
Research direction
Start at the bucket list route and trace how the limit is applied relative to the user's bucket access. Reproduce with five buckets, a token restricted to test4 and test5, and a limit of 5; done means accessible buckets are considered before limiting, so the requested number of visible buckets is returned when available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, authorization, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100