Access to Pub/Sub is secured with IAM. Let's have a look at the list of predefined roles together with a short description for each:
- Pubsub Publish: This has permission to publish a topic.
- Pubsub Subscriber: This has permission to consume a subscription or attach a subscription to a topic.
- Pubsub Viewer: This has the right to list topics and subscriptions.
- Pubsub Editor: This has the right to create, delete, and update topics, and create, delete, and update subscriptions.
- Pubsub Admin: This has the right to retrieve and set IAM policies for topics and subscriptions.