A cloud engineering team is using a continuous integration service account to automate infrastructure deployment in Google Cloud. The deployment pipeline must create Cloud KMS key rings and crypto keys, as well as configure key rotation schedules. However, security policy strictly prohibits this service account from having permissions to encrypt or decrypt data payloads, enforcing the principle of least privilege. Which identity and access management strategy meets these requirements?
- Grant the Cloud KMS Admin role (roles/cloudkms.admin) to the service account on the specific project or key ring.Answer
- BGrant the primitive Editor role (roles/editor) to the service account at the project level to ensure full deployment capabilities.
- CGrant the Cloud KMS CryptoKey Encrypter/Decrypter role (roles/cloudkms.cryptoKeyEncrypterDecrypter) to the service account and delete key rings after deployment.
- DGrant the primitive Owner role (roles/owner) at the project level and rely on revoking encrypt/decrypt permissions at the key ring level.
Answer
Granting the Cloud KMS Admin role (roles/cloudkms.admin) to the service account allows it to create and manage key rings and crypto keys without granting data encryption or decryption permissions.
The Cloud KMS Admin role (roles/cloudkms.admin) grants administrative control over Cloud KMS resources (creating key rings, keys, setting rotation schedules) without granting permissions to perform encryption or decryption operations (which require roles/cloudkms.cryptoKeyEncrypterDecrypter or similar). This achieves separation of duties and adheres to the principle of least privilege.
Step-by-Step Solution
Key Concept
Separation of duties in Cloud KMS IAM roles