mirror of
https://github.com/apple/foundationdb.git
synced 2025-06-02 03:12:12 +08:00
* REST KmsConnector implementation Description diff-1: Address review comments. Add utility interface to Platform namespace to create and operate on tmpfile diff-2: Address review comments Link Boost::filesystem to CMake build process Major changes includes: 1. Implement REST based KmsConnector implementation. 2. Salient features of the connector: 2.1. Two required configuration are: a. Discovery KMS URLs - enable KMS discovery on bootstrap b. Endpoint path configuration to construct URI to fetch/refresh encryption keys c. Configuration to provide "validationTokens" to connect with external KMS. Patch implements file-based token validation scheme. 2.2. On startup, RESTKmsConnector discovers KMS Urls and caches them in-memory. Extracts "validationTokens" based on input config. 2.3. Expose endpoints to allow fetch/refresh of encryption keys. 2.4. Defines JSON format to interact with external KMS - request & response payload format. 3. Extend Platform namespace with an interface to create and operate on tmp files. 4. Update Platform 'readFileBytes' and 'writeFileBytes' to leverage fstream supported implementation. NOTE: KMS URLs fetched after initial discovery will be persisted using DynamicKnobs. It is TODO at the moment and shall be completed once DynamicKnobs is feature complete Testing Unit test to validation following: 1. Parsing on "validation tokens" logic. 2. Construction and parsing of REST JSON request and response strings.