influxdata / influx-cli

CLI for managing resources in InfluxDB v2
MIT License
65 stars 24 forks source link

[bug] user option ignored when listing tokens with `influx auth list` #515

Open brandon1024 opened 1 year ago

brandon1024 commented 1 year ago

When listing tokens with the auth list subcommand, the --user <username> 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]