Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pubsub): streaming pull shouldn't require subscriptions.get permission #9360

Merged
merged 1 commit into from
Sep 30, 2019

Conversation

plamut
Copy link
Contributor

@plamut plamut commented Sep 30, 2019

Closes #9339
Re-introduces #9252.

This PR fixes a regression from the 1.0.1 release that caused the streaming pull to additionally require the subscriptions.get permission (the default pubsub.subscriber role was not sufficient anymore for the streaming pull).

By avoiding the call that fetched a subscription and read its ACK deadline, and replacing that deadline with a fixed value of 60 seconds, this will re-introduce #9252, albeit in a less severe manner.

How to test

Using an account that has no roles assigned other than roles/pubsub.subscriber, try opening a streaming pull (subscriber.subscribe()). That call should succeed without a permission error.

@plamut plamut added the api: pubsub Issues related to the Pub/Sub API. label Sep 30, 2019
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 30, 2019
@plamut plamut requested a review from pradn September 30, 2019 17:27
Pulling the mesages with the streaming pull should work with the
default pubsub.subscriber role.

This commit removes the call to fetch a subscription, and replaces the
subscription's ACK deadline with a fixed deadline of 60 seconds.

That *will* re-introduce the issue googleapis#9252, but at least in a less severe
manner.
@plamut plamut merged commit 7cd36a5 into googleapis:master Sep 30, 2019
@plamut plamut deleted the iss-9339 branch September 30, 2019 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
3 participants