Interface KeyStorePersistenceManager
- All Known Implementing Classes:
HybridKeyStorePersistenceManager,JDBCKeyStorePersistenceManager,RegistryKeyStorePersistenceManager
public interface KeyStorePersistenceManager
This interface supports the persistence/storage related logics of key stores.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddKeystore(KeyStoreModel keyStoreModel, int tenantId) Add the key store to the data storage.voiddeleteKeyStore(String keyStoreName, int tenantId) Delete the key store from the data storage.getEncryptedKeyStorePassword(String keyStoreName, int tenantId) Get the password as a character array for the given key store name.getEncryptedPrivateKeyPassword(String keyStoreName, int tenantId) Get the private key password as a character array for the given key store name.getKeyStore(String keyStoreName, int tenantId) Get the key store from the data storage.getKeyStoreLastModifiedDate(String keyStoreName, int tenantId) Get the last modified date of the key store.booleanisKeyStoreExists(String keyStoreName, int tenantId) Check whether the given keystore exists or not.listKeyStores(int tenantId) Method to retrieve list of keystore metadata of all the keystores in a tenant.voidupdateKeyStore(KeyStoreModel keyStoreModel, int tenantId) Update the key store in the data storage.
-
Method Details
-
addKeystore
Add the key store to the data storage.- Parameters:
keyStoreModel- Key store model.tenantId- Tenant Id.- Throws:
SecurityException- If an error occurs while adding the key store.
-
getKeyStore
Get the key store from the data storage.- Parameters:
keyStoreName- Name of the key store.tenantId- Tenant Id.- Returns:
- Key store model.
- Throws:
SecurityException- If an error occurs while getting the key store.
-
isKeyStoreExists
Check whether the given keystore exists or not.- Parameters:
keyStoreName- Key store name.tenantId- Tenant ID.- Returns:
- whether the tenant primary keystore exists or not.
- Throws:
SecurityException- If an error occurs.
-
listKeyStores
Method to retrieve list of keystore metadata of all the keystores in a tenant.- Parameters:
tenantId- tenantId.- Returns:
- List of KeyStoreMetaData objects.
- Throws:
SecurityException- If an error occurs while retrieving the keystore data.
-
updateKeyStore
Update the key store in the data storage.- Parameters:
keyStoreModel- Key store model.tenantId- Tenant Id.- Throws:
SecurityException
-
deleteKeyStore
Delete the key store from the data storage.- Parameters:
keyStoreName- Name of the key store.tenantId- Tenant Id.- Throws:
SecurityException- If an error occurs while deleting the key store.
-
getKeyStoreLastModifiedDate
Get the last modified date of the key store.- Parameters:
keyStoreName- Key store name.- Returns:
- Last modified date of the key store.
-
getEncryptedKeyStorePassword
Get the password as a character array for the given key store name.- Parameters:
keyStoreName- key store name.tenantId- Tenant Id.- Returns:
- KeyStore Password as a character array.
- Throws:
SecurityException- If there is an error while getting the key store password.
-
getEncryptedPrivateKeyPassword
Get the private key password as a character array for the given key store name.- Parameters:
keyStoreName- Key store name.tenantId- Tenant Id.- Returns:
- Private key password as a character array.
- Throws:
SecurityException- If an error occurs while getting the private key password.
-