Soru

Zorluk: OrtaAWS KMS and Encryption

A developer is building a containerized application running on Amazon ECS. The application must encrypt application log archives of approximately 12 MB12\text{ MB} each on the client side before uploading them to an Amazon S3 bucket. The developer wants to use a customer managed key in AWS KMS.

Which of the following steps are required to implement this client-side envelope encryption workflow? (Select TWO.)

  1. Call the GenerateDataKey API operation to receive both a plaintext data key and an encrypted copy of the data key.Cevap
  2. Encrypt the log archive locally using the plaintext data key, then immediately remove the plaintext data key from the application's memory.Cevap
  3. C
    Call the Encrypt API operation directly, passing the entire 12 MB12\text{ MB} log archive as the plaintext parameter.
  4. D
    Call the GenerateDataKeyWithoutPlaintext API operation, and use the customer managed key's public key to encrypt the log archive.
  5. E
    Store the plaintext data key in AWS Systems Manager Parameter Store with secure string parameters for future decryption processes.

Cevap

To perform client-side envelope encryption for files larger than 4 KB4\text{ KB}, the developer must call the GenerateDataKey API operation to obtain both a plaintext data key and an encrypted data key. The plaintext data key is used to encrypt the files locally and must be destroyed from memory immediately after use. The encrypted data key is stored alongside the encrypted files for future decryption.
The correct steps to implement client-side envelope encryption are to call the GenerateDataKey API operation to retrieve both the plaintext and encrypted data keys, encrypt the data locally with the plaintext key, and then delete the plaintext key from memory. This complies with security best practices and allows the encryption of files larger than the 4 KB4\text{ KB} KMS direct encryption limit.

Adım Adım Çözüm

1
Generate the data keys by calling AWS KMS.
The GenerateDataKey API returns a plaintext data key and a ciphertext (encrypted) data key.
A plaintext key is needed to perform the encryption algorithm locally, and the encrypted version is needed to store with the data for later decryption.
2
Encrypt the file locally and clean up memory.
The 12 MB12\text{ MB} log archive is encrypted using the plaintext data key, and the plaintext data key is discarded from memory.
Local encryption avoids the 4 KB4\text{ KB} KMS API limit, and deleting the plaintext key from memory minimizes the risk of key exposure.

Anahtar Kavram

AWS KMS Envelope Encryption Workflow
Bu soruyu puanla