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

Need to improve error message when basic auth flags are used with identity token flags #1340

Closed
wangxiaoxuan273 opened this issue Apr 12, 2024 · 4 comments · Fixed by #1345
Closed
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@wangxiaoxuan273
Copy link
Contributor

After #1294 is completed, cmd.MarkFlagsMutuallyExclusive is used to prevent --identity-token / --identity-token-stdin to be used with --username/ --password / --password-stdin. However, the default error message is confusing for the users. We need to improve the error messages.

@shizhMSFT
Copy link
Contributor

@wangxiaoxuan273 Can you note down the current error message in this issue?

@wangxiaoxuan273
Copy link
Contributor Author

Current error message: Error: if any flags in the group [password identity-token identity-token-stdin password-stdin] are set none of the others can be; [identity-token password] were all set

Screenshot 2024-04-12 at 16 45 53

@qweeah
Copy link
Contributor

qweeah commented Apr 15, 2024

Also need to improve MarkFlagsRequiredTogether as it's used by mTLS flag parsing.

@qweeah
Copy link
Contributor

qweeah commented Apr 15, 2024

The returned error should be compliant to the error guideline proposed in #1163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants