A backend development team requires permissions to publish messages to existing Cloud Pub/Sub topics and pull messages from existing subscriptions within the `app-messaging-prod` project. The team must not be permitted to create, modify, or delete Pub/Sub topics or subscriptions, nor should they receive access to any other projects within the resource hierarchy. Which TWO IAM role bindings should be granted to the team's principal group to adhere to the Principle of Least Privilege?
- Grant the Pub/Sub Publisher role (roles/pubsub.publisher) on project app-messaging-prod.Cevap
- Grant the Pub/Sub Subscriber role (roles/pubsub.subscriber) on project app-messaging-prod.Cevap
- CGrant the Editor role (roles/editor) on project app-messaging-prod.
- DGrant the Pub/Sub Admin role (roles/pubsub.admin) at the parent Folder level containing app-messaging-prod.
Cevap
Granting the Pub/Sub Publisher role (roles/pubsub.publisher) and the Pub/Sub Subscriber role (roles/pubsub.subscriber) bound at the specific project level (app-messaging-prod).
To satisfy least privilege requirements for message publishing and consumption in a single project, specific predefined roles—Pub/Sub Publisher and Pub/Sub Subscriber—must be assigned directly on the target project. This ensures the team can execute message data operations without receiving topic creation privileges or permissions on other projects.
Adım Adım Çözüm
Anahtar Kavram
Granting Granular Predefined IAM Roles at the Target Project Scope under Least Privilege