diff --git a/relay/cmd/config.go b/relay/cmd/config.go index 2d9b670794..dcff08499b 100644 --- a/relay/cmd/config.go +++ b/relay/cmd/config.go @@ -106,3 +106,10 @@ func NewConfig(ctx *cli.Context) (Config, error) { } return config, nil } + +// SanitizedConfig returns a copy of the Config with sensitive information removed or obfuscated. +func (c Config) SanitizedConfig() Config { + sanitized := c + sanitized.RelayConfig.AuthenticationKeyCacheSize = 0 // Obfuscate sensitive information + return sanitized +} diff --git a/relay/cmd/main.go b/relay/cmd/main.go index bffdd9fa9e..43f3cead7c 100644 --- a/relay/cmd/main.go +++ b/relay/cmd/main.go @@ -54,7 +54,7 @@ func RunRelay(ctx *cli.Context) error { if err != nil { return fmt.Errorf("failed to create logger: %w", err) } - logger.Info(fmt.Sprintf("Relay configuration: %#v", config)) + logger.Info(fmt.Sprintf("Relay configuration: %#v", config.SanitizedConfig())) dynamoClient, err := dynamodb.NewClient(config.AWS, logger) if err != nil {