MINOR: Remove header and key/value converter config value logging (#6660)

The debug log lines in the `Plugins` class that log header and key/value converter configurations should be altered as the configurations for these converters may contain secrets that should not be logged in plaintext. Instead, only the keys for these configs are safe to expose.

Author: Chris Egerton <cegerton@oberlin.edu>
Reviewer: Randall Hauch <rhauch@gmail.com>
This commit is contained in:
Chris Egerton 2019-05-09 18:35:08 -07:00 committed by Randall Hauch
parent 36a5aba4ec
commit 7a4618a793
1 changed files with 3 additions and 3 deletions

View File

@ -246,8 +246,8 @@ public class Plugins {
// Configure the Converter using only the old configuration mechanism ... // Configure the Converter using only the old configuration mechanism ...
String configPrefix = classPropertyName + "."; String configPrefix = classPropertyName + ".";
Map<String, Object> converterConfig = config.originalsWithPrefix(configPrefix); Map<String, Object> converterConfig = config.originalsWithPrefix(configPrefix);
log.debug("Configuring the {} converter with configuration:{}{}", log.debug("Configuring the {} converter with configuration keys:{}{}",
isKeyConverter ? "key" : "value", System.lineSeparator(), converterConfig); isKeyConverter ? "key" : "value", System.lineSeparator(), converterConfig.keySet());
// Have to override schemas.enable from true to false for internal JSON converters // Have to override schemas.enable from true to false for internal JSON converters
// Don't have to warn the user about anything since all deprecation warnings take place in the // Don't have to warn the user about anything since all deprecation warnings take place in the
@ -315,7 +315,7 @@ public class Plugins {
String configPrefix = classPropertyName + "."; String configPrefix = classPropertyName + ".";
Map<String, Object> converterConfig = config.originalsWithPrefix(configPrefix); Map<String, Object> converterConfig = config.originalsWithPrefix(configPrefix);
converterConfig.put(ConverterConfig.TYPE_CONFIG, ConverterType.HEADER.getName()); converterConfig.put(ConverterConfig.TYPE_CONFIG, ConverterType.HEADER.getName());
log.debug("Configuring the header converter with configuration:{}{}", System.lineSeparator(), converterConfig); log.debug("Configuring the header converter with configuration keys:{}{}", System.lineSeparator(), converterConfig.keySet());
plugin.configure(converterConfig); plugin.configure(converterConfig);
return plugin; return plugin;
} }