Package org.apache.solr.crossdc.common
Class SensitivePropRedactionUtils
java.lang.Object
org.apache.solr.crossdc.common.SensitivePropRedactionUtils
Helper functionality related to redacting arbitrary properties which may contain sensitive
password information.
Used primarily as a safeguard before logging out configuration properties. Redaction logic
heavily depends on string matching against elements of the PATTERNS_REQUIRING_REDACTION_LOWERCASE block-list.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringflattenAndRedactForLogging(Map<String, Object> properties) static booleanpropertyRequiresRedaction(String propName) static StringredactPropertyIfNecessary(String propName, String propValue) Redacts a property value if necessary, and returns the result.
-
Constructor Details
-
SensitivePropRedactionUtils
public SensitivePropRedactionUtils()
-
-
Method Details
-
propertyRequiresRedaction
-
redactPropertyIfNecessary
Redacts a property value if necessary, and returns the result.Redaction only occurs when the property name matches a pattern on the
PATTERNS_REQUIRING_REDACTION_LOWERCASEblock-list.- Parameters:
propName- the name or key of the property being considered for redactionpropValue- the value of the property under consideration; returned verbatim if redaction is not necessary.
-
flattenAndRedactForLogging
-