A software developer on your team needs to create and manage Cloud Pub/Sub topics and subscriptions within a development project. The developer must not have access to modify project IAM permissions or create resources in other Google Cloud services. Following Google Cloud's principle of least privilege, which IAM role should you grant to the developer?
- Pub/Sub Editor (roles/pubsub.editor)Answer
- BEditor (roles/editor)
- CPub/Sub Admin (roles/pubsub.admin) granted at the Organization level
- DProject Billing Manager (roles/billing.projectManager)
Answer
Granting the Pub/Sub Editor (roles/pubsub.editor) role at the project level provides the required permissions to create and manage Cloud Pub/Sub topics and subscriptions while enforcing least privilege.
The Pub/Sub Editor (roles/pubsub.editor) role grants full access to create, modify, and delete Cloud Pub/Sub topics and subscriptions without granting administrative control over project IAM policies or other Google Cloud services.
Step-by-Step Solution
Key Concept
Applying Least Privilege with Predefined Roles