An operations team needs to grant a application service account permissions to publish messages to Cloud Pub/Sub topics and manage Pub/Sub subscriptions within a dedicated staging project. The service account must not be granted full administrative control over Pub/Sub resources, nor broad access across the entire organization. Which TWO IAM roles should you grant to the service account to adhere to the principle of least privilege?
- Pub/Sub Publisher (roles/pubsub.publisher) on the staging projectCevap
- Pub/Sub Subscriber (roles/pubsub.subscriber) on the staging projectCevap
- CEditor (roles/editor) on the staging project
- DPub/Sub Admin (roles/pubsub.admin) at the Organization level
Cevap
To follow least privilege for messaging and subscription operations within a specific project, grant the Pub/Sub Publisher and Pub/Sub Subscriber predefined roles at the project level.
Combining the Pub/Sub Publisher and Pub/Sub Subscriber roles at the project level provides the exact permissions necessary to publish messages and create/manage subscriptions without granting unnecessary administrative permissions or broad project-wide access.
Adım Adım Çözüm
Anahtar Kavram
Applying Predefined IAM Roles at the Project Level under Least Privilege