aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-09-05 14:23:49 -0700
committerChris Lu <chris.lu@gmail.com>2021-09-05 14:23:49 -0700
commitc7356086853f7b1216c5aab9eea748e0d2e2d77c (patch)
tree6c3da301d2434aecaaffdecab096c669d6850b2c
parent32e94de86a6014b236f0017b1ac392ab65344972 (diff)
downloadseaweedfs-c7356086853f7b1216c5aab9eea748e0d2e2d77c.tar.xz
seaweedfs-c7356086853f7b1216c5aab9eea748e0d2e2d77c.zip
obfuscate secret keys on display
-rw-r--r--weed/shell/command_remote_configure.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/weed/shell/command_remote_configure.go b/weed/shell/command_remote_configure.go
index 4f0469d5f..3fa905237 100644
--- a/weed/shell/command_remote_configure.go
+++ b/weed/shell/command_remote_configure.go
@@ -160,7 +160,14 @@ func (c *commandRemoteConfigure) listExistingRemoteStorages(commandEnv *CommandE
return fmt.Errorf("unmarshal %s/%s: %v", filer.DirectoryEtcRemote, entry.Name, err)
}
+ // change secret key to stars
conf.S3SecretKey = strings.Repeat("*", len(conf.S3SecretKey))
+ conf.AliyunSecretKey = strings.Repeat("*", len(conf.AliyunSecretKey))
+ conf.BaiduAccessKey = strings.Repeat("*", len(conf.BaiduAccessKey))
+ conf.FilebaseSecretKey = strings.Repeat("*", len(conf.FilebaseSecretKey))
+ conf.StorjSecretKey = strings.Repeat("*", len(conf.StorjSecretKey))
+ conf.TencentSecretKey = strings.Repeat("*", len(conf.TencentSecretKey))
+ conf.WasabiSecretKey = strings.Repeat("*", len(conf.WasabiSecretKey))
m := jsonpb.Marshaler{
EmitDefaults: false,