Package sk.iway.iwcm.helpers
Class DataSanitizer
java.lang.Object
sk.iway.iwcm.helpers.DataSanitizer
Replaces sensitive informations in logs and other outputs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isSensitive
(String fieldName) Test if name is sensitivestatic String
sanitizeIfNameIsSensitive
(String fieldName, String value) Replace sensitive information in value if the name is on the sensitive keywords list
-
Constructor Details
-
DataSanitizer
public DataSanitizer()
-
-
Method Details
-
isSensitive
Test if name is sensitive- Parameters:
fieldName
- - name of the field, eg. user_password, userPassword, pwd, logonToken etc.- Returns:
-
sanitizeIfNameIsSensitive
Replace sensitive information in value if the name is on the sensitive keywords list- Parameters:
fieldName
- - name of the field/configuration key, eg. user_password, userPassword, pwd, logonToken etc.value
- - value to replace- Returns:
- - asterisk if name is sensitive otherwise the value
-