influxdata / influxdata/influxdb
/buckets GET new behavior with param `org=` does not also apply for `orgID=`
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.
1. prepare a GET to `/buckets` using the param `org=name` but use a name that does not match the current security token org
2. send the request. Response is now a reasonable 404 with the message `org name does not match with authenticated org`
3. now prepare GET to `/buckets` using the param `orgID=id` but use an id that does not match the current security token org
4. send the request
__Expected behavior:__
Since `orgID` and `name` in this case are both handles for an organization, would expect that the behavior, when using a token valid only for another organization, would be the same.
__Actual behavior:__
When using the param `orgID=id` with a token valid only for another organization the server returns HTTP 200 as it did previously for the param `org=name`. No error is thrown.
__Environment info:__
Testing against K8S-IDPE remocal,
```
commit 331bdf86253525594c8a3116dbfaf5883fc5617f (HEAD -> master, origin/master, origin/HEAD)
Author: influx-acs[bot] <107396960+influx-acs[bot]@users.noreply.github.com>
Date: Wed Nov 23 17:43:14 2022 +0000
```
Contributor guide
Research direction
Start by reproducing GET /buckets with an orgID that does not match the authenticated token's organization, then compare it with the documented org=name request. Trace the endpoint's handling of both organization parameters and verify that a mismatched orgID produces the same 404 response and message as org=name.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100