Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required --user flag problems: prevents token creation on cloud2 offering using cli #506

Open
reidkaufmann opened this issue Apr 27, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@reidkaufmann
Copy link

reidkaufmann commented Apr 27, 2023

It seems I cannot create tokens on a cloud2 instance. I might be missing something here…

user@host:~/pa$ influx auth create --write-bucket testdata -d "token description"
Error: could not find user with name "": %!w(<nil>)
user@host:~/pa$ influx user create --name bob
Error: failed to create user "bob": 401 Unauthorized: write:users is unauthorized

Furthermore, the user flag, if actually required, is not handled well:
The --user flag is missing, but the output is a little cryptic and indicates it executed with unset variables.

$ influx auth create --write-bucket testdata
Error: could not find user with name "": %!w(<nil>)

What might be nicer:
Error: Required flag “user” not set

Also, usage is usually printed when a required parameter is missing, but not in this instance. This is annoying.

$ influx auth create
Error: could not find user with name "": %!w(<nil>)

This was observed using the 2.7.1-2 amd64 package available at https://portal.influxdata.com/downloads/ with build_date: 2023-04-06T15:31:37Z

There are other methods/interfaces for creating authorization tokens, so the impact is limited.

@reidkaufmann reidkaufmann added the bug Something isn't working label Apr 27, 2023
@reidkaufmann reidkaufmann changed the title Required --user flag problems: prevents token creation on cloud2 offering Required --user flag problems: prevents token creation on cloud2 offering using cli Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant