diff --git a/CHANGELOG.md b/CHANGELOG.md index a2ddd5911..faac0e9d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ Canonical reference for changes, improvements, and bugfixes for Boundary. ## Next +### New and Improved + +* cli: Update authentication examples to remove password flag and make + subcommend selection a bit clearer + ([PR](https://github.com/hashicorp/boundary/pull/1835)) + ## 0.7.4 (2022/01/18) ### Deprecations/Changes diff --git a/internal/cmd/commands/authenticate/authenticate.go b/internal/cmd/commands/authenticate/authenticate.go index 53723aa48..846ed7ac4 100644 --- a/internal/cmd/commands/authenticate/authenticate.go +++ b/internal/cmd/commands/authenticate/authenticate.go @@ -22,9 +22,13 @@ func (c *Command) Help() string { "", " This command authenticates the Boundary commandline client using a specified auth method. Examples:", "", - " Authenticate with password auth method:", + " Authenticate with a password auth method:", "", - " $ boundary authenticate password -auth-method-id ampw_1234567890 -login-name foo -password \"bar\"", + " $ boundary authenticate password -auth-method-id ampw_1234567890 -login-name foo", + "", + " Authenticate with an OIDC auth method:", + "", + " $ boundary authenticate oidc -auth-method-id amoidc_1234567890", "", " Please see the auth method subcommand help for detailed usage information.", }) diff --git a/internal/cmd/commands/authenticate/oidc.go b/internal/cmd/commands/authenticate/oidc.go index bffe82d03..a9ad64b7b 100644 --- a/internal/cmd/commands/authenticate/oidc.go +++ b/internal/cmd/commands/authenticate/oidc.go @@ -34,7 +34,7 @@ func (c *OidcCommand) Help() string { return base.WrapForHelpText([]string{ "Usage: boundary authenticate oidc [options] [args]", "", - " Invoke the OIDC auth method to authenticate the Boundary CLI:", + " Invoke the OIDC auth method to authenticate the Boundary CLI. Example:", "", ` $ boundary authenticate oidc -auth-method-id amoidc_1234567890`, "", diff --git a/internal/cmd/commands/authenticate/password.go b/internal/cmd/commands/authenticate/password.go index dc0a38f83..91640e6bb 100644 --- a/internal/cmd/commands/authenticate/password.go +++ b/internal/cmd/commands/authenticate/password.go @@ -40,9 +40,9 @@ func (c *PasswordCommand) Help() string { return base.WrapForHelpText([]string{ "Usage: boundary authenticate password [options] [args]", "", - " Invoke the password auth method to authenticate the Boundary CLI:", + " Invoke the password auth method to authenticate the Boundary CLI. Example:", "", - ` $ boundary authenticate password -auth-method-id ampw_1234567890 -login-name foo -password "bar"`, + ` $ boundary authenticate password -auth-method-id ampw_1234567890 -login-name foo`, "", "", }) + c.Flags().Help()