influxdata / influxdata/influx-cli
--org-id and --org behave differently from one another depending on token type
- Dominant language
- Go
- Stars
- 75
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
Attempting to run a command such as `influx export all` with an improperly-scoped token, e.g. a token with read/write access to a single bucket in a cloud2 account, gives different behavior depending on whether `-o`/`--org` or `--org-id` are passed.
If `-o `.
If `--org-id ` is passed, the CLI reports no error message, but the output it produces is a useless subset of the metadata one expects from `influx export all`.
If the token passed by the user has insufficient privileges to even discover the org name, then this lack of permissions should be presented in the same way to the user regardless of whether they have passed an org-name or an org-id. Possibly something along the lines of "your token has insufficient permissions. Please create ."
This is also partly a docs issue and is related to influxdata/docs-v2#3267.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the `influx export all` entry point and trace how `--org` and `--org-id` resolve organization access with an improperly scoped token. Compare both paths and their error handling, then verify that insufficient permissions produce equivalent user-facing guidance; review the related documentation issue, influxdata/docs-v2#3267, as well.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- authorization, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100