In Google Cloud Pub/Sub, topics and subscriptions are resources that live in a Cloud project. As such, topics and subscriptions inherit policies from their containing project. The “pubsub.subscriptions.create” and “pubsub.topics.attachSubscription” permissions are two pieces to the same call. The former allows the creation of subscriptions, and the latter allows for attaching those subscriptions to topics.
If you have potential permission creep or escalation associated with having the project-level permission, I recommend you file a feature request [1] so that proper attention will be given to it.
[1] https://issuetracker.google.com--
You received this message because you are subscribed to the Google Groups "Google Cloud Pub/Sub Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-pubsub-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-pubsub-discuss/3e5d2fcc-8e9d-41c7-a5b5-8ad38733b90f%40googlegroups.com.
a subscription seems to evaporate after 7 days if nobody pulls from it
But the only role listed with pubsub.subscriptions.create in it is pubsub.editor, which seems like a crazy permission to give at project level.
I just run into the same issue. My code creates a new subscription if there isn't one for it's hostname. What is the recommended way to setup the subscriptions? Is it recommended to do that outside of the subscriber worker?
--
You received this message because you are subscribed to the Google Groups "Google Cloud Pub/Sub Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-pubsub-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-pubsub-discuss/4fe01864-f3f7-49c5-8461-a18f2c14c4d3%40googlegroups.com.
But the only role listed with pubsub.subscriptions.create in it is pubsub.editor, which seems like a crazy permission to give at project level.Creating a subscription creates a new object in the containing project, which effectively consumes resources in the containing project (given that currently there is a limit of 10,000 subscriptions per project: https://cloud.google.com/pubsub/quotas#other_limits). Hence, Editor role is required on the containing project.
On Monday, November 27, 2017 at 2:26:08 PM UTC-8, Alex Mordkovich wrote:But the only role listed with pubsub.subscriptions.create in it is pubsub.editor, which seems like a crazy permission to give at project level.Creating a subscription creates a new object in the containing project, which effectively consumes resources in the containing project (given that currently there is a limit of 10,000 subscriptions per project: https://cloud.google.com/pubsub/quotas#other_limits). Hence, Editor role is required on the containing project.That just seems like a huge violation of least privilege, since project editor can do a whole lot of destructive things in addition to creating subscriptions.
This seems like a conflict in "best practice" advice. since [some of] the SDKs appear to be designed to auto-create subscriptions, but I doubt the proper advice for IAM is to give project editor privileges to all of your application service accounts!Custom roles do solve the problem and (despite being in alpha) that's what we're going with for now.
Thanks,Walter
--
You received this message because you are subscribed to the Google Groups "Google Cloud Pub/Sub Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-pubsub-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-pubsub-discuss/2df35e65-3d1d-466b-b523-2d8c269a35c7%40googlegroups.com.