Package org.apache.zookeeper.common
Class LogRedactor
java.lang.Object
org.apache.zookeeper.common.LogRedactor
-
Method Summary
Modifier and TypeMethodDescriptionstatic PropertiesredactSensitiveValues(Map<?, ?> properties) Redacts all values which ends with "password" from the given properties / map.static StringredactValue(String key, String value) Returns redacted value when the key ends with "password".
-
Method Details
-
redactSensitiveValues
Redacts all values which ends with "password" from the given properties / map. Other values are not changed.- Parameters:
properties- the properties in which all passwords should be redacted.- Returns:
- new Properties object containing all values, passwords redacted.
-
redactValue
Returns redacted value when the key ends with "password". Otherwise, just returns the value.- Parameters:
key- the key to check if it ends with "password".- Returns:
- redacted value when the key ends with "password". Otherwise, the value.
-