| 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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSecuredAttribute(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.
|
void |
encryptValueWithCRYPT(String encryptionPassword,
String valueToEncrypt)
Encrypt a value using the CRYPT feature.
|
void |
outputConfig(PrintStream out)
Print AS7 configuration file to stream.
|
void |
removeSecuredAttribute(String vaultBlock,
String attributeName)
Remove secured attribute with given vault block and 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() |
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 - Exceptionprotected void validateKeystorePassword()
throws Exception
Exceptionprotected void validateEncryptionDirectory()
throws Exception
Exceptionpublic void startVaultSession(String vaultAlias) throws Exception
vaultAlias - Exceptionpublic void addSecuredAttribute(String vaultBlock, String attributeName, char[] attributeValue) throws Exception
vaultBlock - attributeName - attributeValue - Exceptionpublic boolean checkSecuredAttribute(String vaultBlock, String attributeName) throws Exception
vaultBlock - attributeName - Exceptionpublic void removeSecuredAttribute(String vaultBlock, String attributeName) throws Exception
vaultBlock - attributeName - Exceptionpublic void encryptValueWithCRYPT(String encryptionPassword, String valueToEncrypt) throws Exception
encryptionPassword - Encryption password; could be stored in the vaultvalueToEncrypt - Exception - if there is an issue retrieving the encryptionPassword from the vault.public void vaultConfigurationDisplay()
public void outputConfig(PrintStream out)
out - stream to print config.Copyright © 2021. All rights reserved.