public class Util extends Object
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isPasswordCommand(char[] passwordCmd)
Checks whether password can be loaded by
loadPassword(String) . |
static boolean |
isPasswordCommand(String passwordCmd)
Checks whether password can be loaded by
loadPassword(String) . |
static char[] |
loadPassword(String passwordCmd)
Execute a password load command to obtain the char[] contents of a
password.
|
public static char[] loadPassword(String passwordCmd) throws Exception
passwordCmd
- - A command to execute to obtain the plaintext
password. The format is one of:
'{EXT}...' where the '...' is the exact command
'{EXTC[:expiration_in_millis]}...' where the '...' is the exact command
line that will be passed to the Runtime.exec(String) method to execute a
platform command. The first line of the command output is used as the
password.
EXTC variant will cache the passwords for expiration_in_millis milliseconds.
Default cache expiration is 0 = infinity.
'{CMD}...' or '{CMDC[:expiration_in_millis]}...' for a general command to execute. The general
command is a string delimited by ',' where the first part is the actual
command and further parts represents its parameters. The comma can be
backslashed in order to keep it as a part of the parameter.
'{CLASS[@jboss_module_spec]}classname[:ctorargs]' where the '[:ctorargs]' is an optional
string delimited by the ':' from the classname that will be passed to the
classname ctor. The ctorargs itself is a comma delimited list of strings.
The jboss_module is JBoss Modules module identifier to load the CLASS from.
The password is obtained from classname by invoking a
'char[] toCharArray()' method if found, otherwise, the 'String toString()'
method is used.Exception
public static boolean isPasswordCommand(String passwordCmd)
loadPassword(String)
.passwordCmd
- a potential password commandloadPassword(String)
, false otherwise.public static boolean isPasswordCommand(char[] passwordCmd)
loadPassword(String)
.passwordCmd
- a potential password commandloadPassword(String)
, false otherwise.Copyright © 2017 JBoss by Red Hat. All rights reserved.