Applications can need controlled access to sensitive data such as passphrases, cryptographic keys, access tokens, and passwords. This data is usually small in size, but needs to be stored and managed in a secure manner. Secure Storage allows users to store such sensitive information in a secure and encrypted manner. Data is encrypted upon submission to CDAP (via Microservices or programmatic APIs) and is decrypted upon retrieval.

Secure Storage Format

An entry in secure storage consists of:

CDAP provides two different implementations of secure storage, depending on the runtime:

File-backed Secure Storage

File-backed secure storage is available for use with in-memory CDAP (unit-test) and CDAP Sandbox modes. It uses the Sun JCEKS implementation for storing secure keys. This implementation is not available in Distributed CDAP because it stores the secure data in the local file system, and thus is not available on all nodes of a distributed cluster.

To use the file-backed secure storage mode, set these properties:

Hadoop Key Management Server-backed Secure Storage

Hadoop KMS (Key Management Server)-backed secure storage is available for use with Distributed CDAP.

To use this mode, set this property:

For additional information on integration with Hadoop KMS, see Apache Hadoop Key Management Server (KMS).

Accessing the Secure Storage

The Secure Storage Microservices has endpoints for the management and creation, retrieval, and deletion of secure keys.