A developer is building a compliance utility that runs on an Amazon EC2 instance. The utility must encrypt database backup files of approximately client-side before sending them to an external partner's storage server. The developer wants to use envelope encryption with a Customer Managed Key (CMK) stored in AWS KMS.
Which TWO actions must the developer perform in the application code to implement this client-side encryption workflow? (Select TWO.)
- Call the GenerateDataKey API operation of AWS KMS, specifying the Customer Managed Key, to retrieve both a plaintext data key and an encrypted copy of the data key.Cevap
- Encrypt the backup file locally using the plaintext data key, immediately delete the plaintext data key from memory, and package the encrypted data key alongside the encrypted backup file.Cevap
- CCall the Encrypt API operation of AWS KMS, passing the database backup file payload directly to KMS, to retrieve the encrypted ciphertext.
- DCall the GenerateDataKeyWithoutPlaintext API operation of AWS KMS, and use the returned ciphertext data key to encrypt the database backup file.
- EStore the database backup file in AWS Secrets Manager, and configure Secrets Manager to automatically rotate the data key after each backup operation.
Cevap
Calling the GenerateDataKey API to obtain both the plaintext and encrypted data keys, encrypting the backup file locally with the plaintext key, and then deleting the plaintext key from memory while storing the encrypted key with the ciphertext.
For client-side envelope encryption, the developer must call the GenerateDataKey API to obtain both the plaintext data key and the encrypted version of the data key. The plaintext key is used to perform the actual local encryption of the large backup file. Once the encryption completes, the plaintext data key must be discarded from the system memory. The encrypted data key is then stored or sent alongside the ciphertext so that it can be used for decryption in the future.
Adım Adım Çözüm
Anahtar Kavram
AWS KMS Envelope Encryption Workflow