QuestionQ115

VerifiedConfiguring access and security

You need to configure permissions for a group of Compute Engine instances so that they can write data into a specific Cloud Storage bucket. You want to follow Google-recommended practices. What should you do?

Explanation

Google recommends managing access to Cloud Storage buckets through IAM roles assigned to service accounts rather than through legacy VM access scopes, and recommends granting the least-privilege role needed for the task. Because the instances only need to write (create) objects in the bucket, the appropriate least-privilege role is roles/storage.objectCreator, which permits creating objects without granting broader permissions such as reading, overwriting, or deleting existing objects (which roles/storage.objectAdmin would allow). Access scopes are considered a legacy, coarse-grained mechanism and are not the recommended way to control resource-level permissions when fine-grained IAM roles are available.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!