Add anonymous flag to prevent logging sensitive information (#6899)

This commit is contained in:
Anis Elleuch
2018-12-19 01:08:11 +01:00
committed by kannappanr
parent 4f31a9a33b
commit 99b843a64e
8 changed files with 84 additions and 46 deletions

View File

@@ -123,7 +123,7 @@ func printServerCommonMsg(apiEndpoints []string) {
// Colorize the message and print.
logger.StartupMessage(colorBlue("Endpoint: ") + colorBold(fmt.Sprintf(getFormatStr(len(apiEndpointStr), 1), apiEndpointStr)))
if isTerminal() {
if isTerminal() && !globalCLIContext.Anonymous {
logger.StartupMessage(colorBlue("AccessKey: ") + colorBold(fmt.Sprintf("%s ", cred.AccessKey)))
logger.StartupMessage(colorBlue("SecretKey: ") + colorBold(fmt.Sprintf("%s ", cred.SecretKey)))
if region != "" {