apigeeX - Roles for PubSub

Hi Google Community,
In our current project we are using Publish Message as policy to publish message in pub-sub GCP components. We are doing CI/CD deployment using apigee-cli cmd, so to use this policy we have to specify service account account detail while doing deployment of the proxy.

Currently we have enabled below roles in the assigned service account

role1: roles/apigee.environmentAdmin

role2: roles/apihub.admin

role3: **roles/apigee.apiAdminV2
**
But as we have not mentioned roles specific to pub sub, the apigee is not allowing to deploy.
Is the below roles will be sufficient.

  1. roles/pubsub.publisher

  2. roles/pubsub.editor

  3. roles/pubsub.subscriber

Can you suggest please.

Hi,

The needed role is pubsub.topics.publish

Ref: Publish Message: Authentication and Roles section

Also, please note that the Apigee specific roles are not needed unless the Proxy is also performing functions against Apigee’s management APIs, which is not recommended.

Cheers,

Hello @Sanghita_Chakraborty ,

The permissions noted should work, though they are all not required. Assuming your requirement is specifically an Apigee service account to publish messages via PubSub with minimal viable permissions, you should only need the PubSub.publisher role.

Best
Matt