Modifier and Type | Field and Description |
---|---|
static String |
VAULT_ENC_ALGORITHM |
Constructor and Description |
---|
VaultSession(String keystoreURL,
String keystorePassword,
String encryptionDirectory,
String salt,
int iterationCount)
Constructor to create VaultSession.
|
VaultSession(String keystoreURL,
String keystorePassword,
String encryptionDirectory,
String salt,
int iterationCount,
boolean createKeystore)
Constructor to create VaultSession with possibility to create keystore automaticaly.
|
Modifier and Type | Method and Description |
---|---|
String |
addSecuredAttribute(String vaultBlock,
String attributeName,
char[] attributeValue)
Add secured attribute to specified vault block.
|
void |
addSecuredAttributeWithDisplay(String vaultBlock,
String attributeName,
char[] attributeValue)
Add secured attribute to specified vault block.
|
boolean |
checkSecuredAttribute(String vaultBlock,
String attributeName)
Check whether secured attribute is already set for given vault block and attribute name.
|
String |
getKeystoreMaskedPassword()
Method to get keystore masked password to use further in configuration.
|
boolean |
removeSecuredAttribute(String vaultBlock,
String attributeName)
This method removes secured attribute stored in
SecurityVault . |
char[] |
retrieveSecuredAttribute(String vaultBlock,
String attributeName)
Retrieves secured attribute from specified vault block with specified attribute name.
|
void |
startVaultSession(String vaultAlias)
Start the vault with given alias.
|
protected void |
validateEncryptionDirectory() |
protected void |
validateIterationCount() |
protected void |
validateKeystorePassword() |
protected void |
validateKeystoreURL() |
protected void |
validateSalt() |
String |
vaultConfiguration()
Returns vault configuration string in user readable form.
|
void |
vaultConfigurationDisplay()
Display info about vault itself in form of AS7 configuration file.
|
public static final String VAULT_ENC_ALGORITHM
public VaultSession(String keystoreURL, String keystorePassword, String encryptionDirectory, String salt, int iterationCount) throws Exception
keystoreURL
- keystorePassword
- encryptionDirectory
- salt
- iterationCount
- Exception
public VaultSession(String keystoreURL, String keystorePassword, String encryptionDirectory, String salt, int iterationCount, boolean createKeystore) throws Exception
keystoreURL
- keystorePassword
- encryptionDirectory
- salt
- iterationCount
- createKeystore
- Exception
protected void validateKeystorePassword() throws Exception
Exception
protected void validateEncryptionDirectory() throws Exception
Exception
public void startVaultSession(String vaultAlias) throws Exception
vaultAlias
- Exception
public String addSecuredAttribute(String vaultBlock, String attributeName, char[] attributeValue) throws Exception
vaultBlock
- attributeName
- attributeValue
- Exception
public void addSecuredAttributeWithDisplay(String vaultBlock, String attributeName, char[] attributeValue) throws Exception
vaultBlock
- attributeName
- attributeValue
- Exception
public boolean checkSecuredAttribute(String vaultBlock, String attributeName) throws Exception
vaultBlock
- attributeName
- Exception
public boolean removeSecuredAttribute(String vaultBlock, String attributeName) throws Exception
SecurityVault
.
After successful remove operation returns true. Otherwise false.vaultBlock
- security vault blockattributeName
- Attribute name stored in security vaultException
public char[] retrieveSecuredAttribute(String vaultBlock, String attributeName) throws Exception
vaultBlock
- security vault blockattributeName
- Attribute name stored in security vaultException
public void vaultConfigurationDisplay()
public String vaultConfiguration()
public String getKeystoreMaskedPassword()
startVaultSession
method.Copyright © 2019 JBoss by Red Hat. All rights reserved.