public class PasswordUtils
extends java.lang.Object
JobDefinitions and
StreamDefinitions (BaseDefinition), e.g. the masking
of passwords in definition parameters.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MASK_CHARACTER |
static java.lang.String[] |
PASSWORD_PARAMETER_NAMES |
static java.util.regex.Pattern |
passwordParameterPattern |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
maskPasswordsInDefinition(java.lang.String definition)
This method takes a definition String as input parameter.
|
static void |
maskPropertiesIfNecessary(java.util.Properties properties)
Will mask property values if they contain keys that contain the values specified
in
PASSWORD_PARAMETER_NAMES. |
static java.lang.String |
maskString(java.lang.String stringToMask)
Masks provided
Strings with the MASK_CHARACTER. |
public static final java.lang.String[] PASSWORD_PARAMETER_NAMES
public static final java.lang.String MASK_CHARACTER
public static java.util.regex.Pattern passwordParameterPattern
public static java.lang.String maskPasswordsInDefinition(java.lang.String definition)
--password and will masked them
using the * character.definition - Must not be emptypublic static java.lang.String maskString(java.lang.String stringToMask)
Strings with the MASK_CHARACTER.stringToMask - Must not be nullpublic static void maskPropertiesIfNecessary(java.util.Properties properties)
PASSWORD_PARAMETER_NAMES.
Be aware that this is a mutable operation and the passed-in Properties
will be modified.properties - Must not be null.