-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
influx secret list returns misleading error message when user isn't authorized to view secrets #20054
Comments
@tara-influxdata |
I tried again and get the same "Error: Organization not found." result. |
I can't reproduce this. |
|
Still running 2.0.1? or can you repro on 2.0.2? |
I can repro on 2.0.2. |
You must use an all access token in order to access the secrets. If you do not have an all access token -- you receive the organization not found error message. |
@timhallinflux is the current behavior a bug? It looks we could at least improve the error message |
yes, error message needs improvement. It's not that the org isn't found it's that the user isn't authorized to make that API call, I believe. |
This is trickier than I expected. The secrets API is never even being called in this case because:
IMO the ideal fix would be to extend the secrets API (and others) to accept either org ID or org name, so the server could provide relevant & specific error messages for these cases without compromising on auth for direct uses of the org APIs, but that would be a significant chunk of work & require coordination with cloud. In the short-term, I think we can add more context to the CLI-side error to make the source of the error more clear. |
Steps to reproduce:
I have a configuration listed under
influx config
, and its organization exists / has been verified to exist in-browser.influx secret list
Expected behavior:
Secrets to be listed.
Actual behavior:
Environment info:
The text was updated successfully, but these errors were encountered: