fix(cli): correctly print secrets in authorize-session for current vault credential source subtypes (#3218)

* updates authorize-session case statement with current vault credential source types
pull/3234/head
Haotian 3 years ago committed by GitHub
parent 48fb60adef
commit d4bcdd8a06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,6 +17,8 @@ import (
"github.com/hashicorp/boundary/globals"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/credential"
"github.com/hashicorp/boundary/internal/credential/static"
"github.com/hashicorp/boundary/internal/credential/vault"
"github.com/hashicorp/boundary/internal/types/scope"
"github.com/hashicorp/go-secure-stdlib/strutil"
"github.com/mitchellh/go-wordwrap"
@ -731,7 +733,7 @@ func printCustomActionOutputImpl(c *Command) (bool, error) {
var secretStr []string
switch cred.CredentialSource.Type {
case "vault", "static":
case vault.Subtype.String(), vault.GenericLibrarySubtype.String(), static.Subtype.String():
switch {
case cred.Credential != nil:
maxLength := 0

Loading…
Cancel
Save