public class FileSecureStore extends Object implements co.cask.cdap.api.security.store.SecureStore, co.cask.cdap.api.security.store.SecureStoreManager
| Constructor and Description |
|---|
FileSecureStore(CConfiguration cConf,
SConfiguration sConf,
NamespaceQueryAdmin namespaceQueryAdmin) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteSecureData(String namespace,
String name)
Deletes the element with the given name.
|
co.cask.cdap.api.security.store.SecureStoreData |
getSecureData(String namespace,
String name)
Returns the data stored in the secure store.
|
Map<String,String> |
listSecureData(String namespace)
List of all the entries in the secure store belonging to the specified namespace.
|
void |
putSecureData(String namespace,
String name,
String data,
String description,
Map<String,String> properties)
Stores an element in the secure store.
|
@Inject public FileSecureStore(CConfiguration cConf, SConfiguration sConf, NamespaceQueryAdmin namespaceQueryAdmin) throws IOException
IOExceptionpublic void putSecureData(String namespace, String name, String data, String description, Map<String,String> properties) throws Exception
putSecureData in interface co.cask.cdap.api.security.store.SecureStoreManagernamespace - The namespace this key belongs to.name - Name of the element to store.data - The data that needs to be securely stored.description - User provided description of the entry.properties - Metadata associated with the data.NamespaceNotFoundException - If the specified namespace does not exist.AlreadyExistsException - If the key already exists in the namespace. Updating is not supported.IOException - If there was a problem storing the key to the in memory keystore
or if there was problem persisting the keystore.Exceptionpublic void deleteSecureData(String namespace, String name) throws Exception
deleteSecureData in interface co.cask.cdap.api.security.store.SecureStoreManagernamespace - The namespace this key belongs to.name - Name of the element to be deleted.NamespaceNotFoundException - If the specified namespace does not exist.NotFoundException - If the key to be deleted is not found.IOException - If their was a problem during deleting the key from the in memory store
or if there was a problem persisting the keystore after deleting the element.Exceptionpublic Map<String,String> listSecureData(String namespace) throws Exception
listSecureData in interface co.cask.cdap.api.security.store.SecureStorenamespace - The namespace this key belongs to.SecureStoreMetadata objects representing the data stored in the store.NamespaceNotFoundException - If the specified namespace does not exist.IOException - If there was a problem reading from the keystore.Exceptionpublic co.cask.cdap.api.security.store.SecureStoreData getSecureData(String namespace, String name) throws Exception
getSecureData in interface co.cask.cdap.api.security.store.SecureStorenamespace - The namespace this key belongs to.name - Name of the data element.NamespaceNotFoundException - If the specified namespace does not exist.NotFoundException - If the key is not found in the store.IOException - If there was a problem reading from the store.ExceptionCopyright © 2017 Cask Data, Inc. Licensed under the Apache License, Version 2.0.