Skip to content

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

Closed

Description

@wangxiaoxuan273

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.

Activity

  1. shizhMSFT commented on Apr 12, 2024

    @shizhMSFT
    Contributor

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

  2. wangxiaoxuan273 commented on Apr 12, 2024

    @wangxiaoxuan273
    ContributorAuthor

    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
  3. qweeah commented on Apr 15, 2024

    @qweeah
    Contributor

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

  4. qweeah commented on Apr 15, 2024

    @qweeah
    Contributor

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

  5. added this to the v1.2.0 milestone on Apr 15, 2024
  6. added
    enhancement
    on Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions