public class DefaultSecureStoreService extends Object implements co.cask.cdap.api.security.store.SecureStore, co.cask.cdap.api.security.store.SecureStoreManager
| Modifier and Type | Method and Description |
|---|---|
void |
deleteSecureData(String namespace,
String name)
Deletes the key if the user has ADMIN privileges to the key.
|
co.cask.cdap.api.security.store.SecureStoreData |
getSecureData(String namespace,
String name)
Checks if the user has access to read the secure key and returns the
SecureStoreData associated
with the key if they do. |
Map<String,String> |
listSecureData(String namespace)
Lists all the secure keys in the given namespace that the user has access to.
|
void |
putSecureData(String namespace,
String name,
String value,
String description,
Map<String,String> properties)
Puts the user provided data in the secure store, if the user has write access to the namespace.
|
public final Map<String,String> listSecureData(String namespace) throws Exception
listSecureData in interface co.cask.cdap.api.security.store.SecureStoreNamespaceNotFoundException - If the specified namespace does not exist.IOException - If there was a problem reading from the store.Exceptionpublic final co.cask.cdap.api.security.store.SecureStoreData getSecureData(String namespace, String name) throws Exception
SecureStoreData associated
with the key if they do.getSecureData in interface co.cask.cdap.api.security.store.SecureStoreNamespaceNotFoundException - 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.UnauthorizedException - If the user does not have READ permissions on the secure key.Exceptionpublic final void putSecureData(String namespace, String name, String value, String description, Map<String,String> properties) throws Exception
putSecureData in interface co.cask.cdap.api.security.store.SecureStoreManagerBadRequestException - If the request does not contain the value to be stored.UnauthorizedException - If the user does not have write permissions on the namespace.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 underlying provider.Exceptionpublic final void deleteSecureData(String namespace, String name) throws Exception
deleteSecureData in interface co.cask.cdap.api.security.store.SecureStoreManagerUnauthorizedException - If the user does not have admin privileges required to delete the secure key.NamespaceNotFoundException - If the specified namespace does not exist.NotFoundException - If the key to be deleted is not found.IOException - If there was a problem deleting it from the underlying provider.ExceptionCopyright © 2017 Cask Data, Inc. Licensed under the Apache License, Version 2.0.