influxdata / influxdata/influx-cli
[bug] user option ignored when listing tokens with `influx auth list`
- Dominant language
- Go
- Stars
- 75
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
When listing tokens with the `auth list` subcommand, the `--user ` option is ignored and all API tokens are shown.
```
$ influxdb@0ca4c50d8554:/$ influx auth list --user 'ab2caf54-3448-48f1-976e-6e43a47b7f0b' --token 'T8gsHR0CE2WDEvZNPUBFhdyRZcpsvLcH'
ID Description Token User Name User ID Permissions
0b52dbdc8c4ab000 admin-ab2caf54-3448-48f1-976e-6e43a47b7f0b's Token T8gsHR0CE2WDEvZNPUBFhdyRZcpsvLcH admin-ab2caf54-3448-48f1-976e-6e43a47b7f0b 0b52dbdc6a4ab000 [read:/authorization
s write:/authorizations read:/buckets write:/buckets read:/dashboards write:/dashboards read:/orgs write:/orgs read:/sources write:/sources read:/tasks write:/tasks read:/telegrafs write:/telegrafs read:/users write:/users read:/variables write:/variables read:/scrape
rs write:/scrapers read:/secrets write:/secrets read:/labels write:/labels read:/views write:/views read:/documents write:/documents read:/notificationRules write:/notificationRules read:/notificationEndpoints write:/notificationEndpoints read:/checks write:/checks re
ad:/dbrp write:/dbrp read:/notebooks write:/notebooks read:/annotations write:/annotations read:/remotes write:/remotes read:/replications write:/replications]
0b52dbdca40ab000 ans9VygkxaCjm8aD8O73zmVi6_8ZMFqBN24C3xl1mf3FAhhcr_5SFXbR8_avgtaJ4PX0lKR2CTDUcTt2gX-jxQ== ab2caf54-3448-48f1-976e-6e43a47b7f0b 0b52dbdc924ab000 [read:orgs/f31e29d3c
c66a46f/buckets read:orgs/f31e29d3cc66a46f/dashboards read:/orgs read:orgs/f31e29d3cc66a46f/tasks read:orgs/f31e29d3cc66a46f/telegrafs read:/users read:orgs/f31e29d3cc66a46f/notificationRules read:orgs/f31e29d3cc66a46f/notificationEndpoints read:orgs/f31e29d3cc66a46f/
checks read:orgs/f31e29d3cc66a46f/dbrp read:orgs/f31e29d3cc66a46f/remotes read:orgs/f31e29d3cc66a46f/replications]
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the `influx auth list` subcommand and reproduce the issue with the shown `--user` option and token. Trace how the user filter is passed to the token-listing request, then verify that the command output contains only tokens for the requested user.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100