public class PicketBoxSecurityVault extends Object implements SecurityVault
SecurityVault that uses
a KeyStore
The shared key just uses a concatenation of a java.uti.UUID
and a keystore alias.
The following options are expected in the SecurityVault.init(Map) call:
ENC_FILE_DIR: the location where the encoded files will be kept. End with "/" or "\" based on your platform
KEYSTORE_URL: location where your keystore is located
KEYSTORE_PASSWORD: Masked keystore password. Has to be prepended with MASK-
KEYSTORE_ALIAS: Alias where the keypair is located
SALT: salt of the masked password. Ensured it is 8 characters in length
ITERATION_COUNT: Iteration Count of the masked password.
KEY_SIZE: Key size of encryption. Default is 128 bytes.| Modifier and Type | Field and Description |
|---|---|
protected static String |
ADMIN_KEY |
protected String |
decodedEncFileDir |
static String |
ENC_FILE_DIR |
protected static String |
ENCODED_FILE |
protected String |
encryptionAlgorithm |
protected boolean |
finishedInit |
static String |
ITERATION_COUNT |
static String |
KEY_SIZE |
protected int |
keySize |
protected KeyStore |
keystore |
static String |
KEYSTORE_ALIAS |
static String |
KEYSTORE_PASSWORD |
static String |
KEYSTORE_URL |
protected String |
LINE_BREAK |
protected static org.jboss.logging.Logger |
log |
static String |
PASS_MASK_PREFIX |
static String |
PUBLIC_CERT |
static String |
SALT |
protected static String |
SHARED_KEY_FILE |
protected Map<String,byte[]> |
sharedKeyMap |
protected Map<String,byte[]> |
theContent |
| Constructor and Description |
|---|
PicketBoxSecurityVault() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists(String vaultBlock,
String attributeName)
Check whether an attribute value exists in the vault
|
byte[] |
handshake(Map<String,Object> handshakeOptions)
Retrieve the shared key from the vault
|
void |
init(Map<String,Object> options)
Initialize the vault
|
boolean |
isInitialized()
Determine if the vault is initialized
|
Set<String> |
keyList()
Get the currently vaulted VaultBlock_attribute Names
|
boolean |
remove(String vaultBlock,
String attributeName,
byte[] sharedKey)
Remove an existing attribute value
|
char[] |
retrieve(String vaultBlock,
String attributeName,
byte[] sharedKey)
Retrieve the attribute value
|
void |
store(String vaultBlock,
String attributeName,
char[] attributeValue,
byte[] sharedKey)
Store an attribute value
|
protected static org.jboss.logging.Logger log
protected boolean finishedInit
protected KeyStore keystore
protected String encryptionAlgorithm
protected int keySize
public static final String ENC_FILE_DIR
public static final String KEYSTORE_URL
public static final String KEYSTORE_PASSWORD
public static final String KEYSTORE_ALIAS
public static final String SALT
public static final String ITERATION_COUNT
public static final String PASS_MASK_PREFIX
public static final String PUBLIC_CERT
public static final String KEY_SIZE
protected static final String ENCODED_FILE
protected static final String SHARED_KEY_FILE
protected static final String ADMIN_KEY
protected String decodedEncFileDir
protected String LINE_BREAK
public void init(Map<String,Object> options) throws SecurityVaultException
SecurityVaultinit in interface SecurityVaultSecurityVaultExceptionpublic boolean isInitialized()
SecurityVaultisInitialized in interface SecurityVaultpublic byte[] handshake(Map<String,Object> handshakeOptions) throws SecurityVaultException
SecurityVaulthandshake in interface SecurityVaulthandshakeOptions - a set of options that the vault identifies for handshakeSecurityVaultExceptionpublic Set<String> keyList() throws SecurityVaultException
SecurityVaultkeyList in interface SecurityVaultSecurityVaultExceptionpublic void store(String vaultBlock, String attributeName, char[] attributeValue, byte[] sharedKey) throws SecurityVaultException
SecurityVaultstore in interface SecurityVaultvaultBlock - a string value that brings in the uniquenessattributeName - name of the attributeSecurityVaultExceptionpublic char[] retrieve(String vaultBlock, String attributeName, byte[] sharedKey) throws SecurityVaultException
SecurityVaultretrieve in interface SecurityVaultSecurityVaultExceptionpublic boolean exists(String vaultBlock, String attributeName) throws SecurityVaultException
SecurityVaultexists in interface SecurityVaultSecurityVaultExceptionSecurityVault.exists(String, String)public boolean remove(String vaultBlock, String attributeName, byte[] sharedKey) throws SecurityVaultException
SecurityVaultremove in interface SecurityVaultSecurityVaultExceptionCopyright © 2012 JBoss Inc.. All Rights Reserved.