Google Cloud Professional Cloud Security Engineer — Question 34
An application running on a Compute Engine instance needs to read data from a Cloud Storage bucket. Your team does not allow Cloud Storage buckets to be globally readable and wants to ensure the principle of least privilege.
Which option meets the requirement of your team?
Answer options
- A. Create a Cloud Storage ACL that allows read-only access from the Compute Engine instance's IP address and allows the application to read from the bucket without credentials.
- B. Use a service account with read-only access to the Cloud Storage bucket, and store the credentials to the service account in the config of the application on the Compute Engine instance.
- C. Use a service account with read-only access to the Cloud Storage bucket to retrieve the credentials from the instance metadata.
- D. Encrypt the data in the Cloud Storage bucket using Cloud KMS, and allow the application to decrypt the data with the KMS key.
Correct answer: C
Explanation
Option C is correct because it uses a service account with the principle of least privilege by retrieving credentials from the instance metadata, ensuring secure access without exposing credentials. Option A is incorrect as it relies on IP address access, which does not adhere to least privilege principles. Option B stores credentials in the application config, which is less secure, and Option D involves encryption but does not address the specific access requirement to read data from the bucket.