Class PasswordMaskingUtil
java.lang.Object
org.apache.activemq.artemis.utils.PasswordMaskingUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SensitiveDataCodec<String>Loading the codec class.static DefaultSensitiveStringCodecstatic DefaultSensitiveStringCodecgetDefaultCodec(Map<String, String> params) static HashProcessorstatic HashProcessorgetHashProcessor(String storedPassword) static HashProcessorgetHashProcessor(String storedPassword, HashProcessor secureHashProcessor) static booleanisEncMasked(String password) static StringresolveMask(Boolean maskPassword, String password, String codecClass) This method deals with password masking and returns the password in its plain text form.static StringresolveMask(String password, String codecClass) This method deals with password masking and returns the password in its plain text form.static Stringstatic String
-
Field Details
-
BEGIN_ENC
- See Also:
-
END_ENC
- See Also:
-
-
Method Details
-
resolveMask
This method deals with password masking and returns the password in its plain text form.- Parameters:
password- : the original value of password string; interpreted as masked if wrapped in ENC() or as plain text otherwise.codecClass- : the codec used to decode the password. Only when the password is interpreted as masked will this codec be used. Ignored otherwise.- Throws:
Exception
-
resolveMask
public static String resolveMask(Boolean maskPassword, String password, String codecClass) throws Exception This method deals with password masking and returns the password in its plain text form.- Parameters:
maskPassword- : explicit mask flag. If it's true, the password is interpreted as masked. If it is false, the password is interpreted as plain text. if it is null, the password will be interpreted as masked if the password is wrapped in ENC(), or as plain text otherwise.password- : the original value of password stringcodecClass- : the codec used to decode the password. Only when the password is interpreted as masked will this codec be used. Ignored otherwise.- Throws:
Exception
-
isEncMasked
-
unwrap
-
wrap
-
getHashProcessor
-
getHashProcessor
public static HashProcessor getHashProcessor(String storedPassword, HashProcessor secureHashProcessor) -
getHashProcessor
-
getCodec
Loading the codec class.- Parameters:
codecDesc- This parameter must have the following format:<full qualified class name>;key=value;key1=value1;...where only<full qualified class name>is required. key/value pairs are optional- Throws:
ActiveMQException
-
getDefaultCodec
-
getDefaultCodec
-