Skip to content

Commit

Permalink
Mask passwords when written as json (#2302)
Browse files Browse the repository at this point in the history
Signed-off-by: Gary Brown <[email protected]>
  • Loading branch information
objectiser authored Jun 22, 2020
1 parent 126701a commit 049d202
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/cassandra/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type Authenticator struct {
// BasicAuthenticator holds the username and password for a password authenticator for a Cassandra cluster
type BasicAuthenticator struct {
Username string `yaml:"username" mapstructure:"username"`
Password string `yaml:"password" mapstructure:"password"`
Password string `yaml:"password" mapstructure:"password" json:"-"`
}

// ApplyDefaults copies settings from source unless its own value is non-zero.
Expand Down
2 changes: 1 addition & 1 deletion pkg/es/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import (
type Configuration struct {
Servers []string `mapstructure:"server_urls"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
Password string `mapstructure:"password" json:"-"`
TokenFilePath string `mapstructure:"token_file"`
AllowTokenFromContext bool `mapstructure:"-"`
Sniffer bool `mapstructure:"sniffer"` // https://github.com/olivere/elastic/wiki/Sniffing
Expand Down

0 comments on commit 049d202

Please sign in to comment.