A developer is writing an application that must encrypt a application configuration file client-side before uploading it to an Amazon S3 bucket. The security policy requires using envelope encryption with an AWS KMS Customer Managed Key (CMK).
Which of the following workflows should the developer implement to meet these requirements?
- Call the KMS GenerateDataKey API to obtain a plaintext data key and an encrypted data key. Use the plaintext data key to encrypt the file locally, destroy the plaintext key from memory, and upload the encrypted file along with the encrypted data key to Amazon S3.Cevap
- BCall the KMS Encrypt API directly, passing the configuration file's plaintext bytes and the CMK ID to receive the ciphertext, and then upload the ciphertext to Amazon S3.
- CCall the KMS GenerateDataKeyWithoutPlaintext API to receive an encrypted data key. Call the KMS Decrypt API with the encrypted data key to retrieve the plaintext data key, encrypt the file locally, and upload both the encrypted file and the encrypted data key to Amazon S3.
- DStore the configuration file content in AWS Systems Manager Parameter Store as a SecureString parameter referencing the CMK, and configure the application to retrieve it directly using the Parameter Store API.
Cevap
Call the KMS GenerateDataKey API to obtain a plaintext data key and an encrypted data key. Use the plaintext data key to encrypt the file locally, destroy the plaintext key from memory, and upload the encrypted file along with the encrypted data key to Amazon S3.
The correct workflow is to call the KMS GenerateDataKey API to retrieve both the plaintext and encrypted data keys. The plaintext key is used to encrypt the file client-side, after which it is deleted from memory. The encrypted data key is stored alongside the encrypted file in Amazon S3 for future decryption.
Adım Adım Çözüm
Anahtar Kavram
AWS KMS Envelope Encryption Workflow
Tahmini Süre:1m 30s