An enterprise security architect is designing an automated deployment pipeline to provision Cloud SQL database instances encrypted with Customer-Managed Encryption Keys (CMEK). The encryption keys reside in a centralized Cloud KMS key ring within a dedicated security project, while the databases are deployed in separate workload projects. During deployment, the Cloud SQL instance creation fails due to missing access permissions on the encryption key. A DevOps engineer recommends assigning the Editor primitive IAM role on the security project to resolve the access issue. Which solution complies with Google Cloud security best practices while enforcing the principle of least privilege?
- Grant the Cloud KMS CryptoKey Encrypter/Decrypter role (roles/cloudkms.cryptoKeyEncrypterDecrypter) on the specific KMS key to the Cloud SQL Service Agent account ([email protected]).Cevap
- BAssign the Editor primitive IAM role on the centralized security project to the Cloud SQL Service Agent account and the deployment pipeline service account.
- CReconfigure the database creation pipeline to use Customer-Supplied Encryption Keys (CSEK) by passing raw 256-bit AES encryption key strings directly in the deployment parameters.
- DConfigure a VPC Service Controls perimeter encompassing both the workload project and the security project to automatically authorize key access across project boundaries.
Cevap
Grant the Cloud KMS CryptoKey Encrypter/Decrypter role on the specific key to the Cloud SQL Service Agent account for the workload project.
The correct solution grants the predefined Cloud KMS CryptoKey Encrypter/Decrypter role directly on the specific encryption key to the target project's Cloud SQL Service Agent. In Google Cloud, service-managed operations like database disk encryption require the service agent identity to have explicit key usage permissions. Applying this role at the key resource level adheres strictly to the principle of least privilege.
Adım Adım Çözüm
Anahtar Kavram
CMEK Integration with Service Agents and Least-Privilege IAM Roles