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

Pub / Sub clients don't add scopes to passed-in credentials #4479

Closed
dhermes opened this issue Nov 29, 2017 · 1 comment
Closed

Pub / Sub clients don't add scopes to passed-in credentials #4479

dhermes opened this issue Nov 29, 2017 · 1 comment
Assignees
Labels
api: pubsub Issues related to the Pub/Sub API. priority: p2 Moderately-important priority. Fix may not be included in next release. status: investigating The issue is under investigation, which is determined to be non-trivial.

Comments

@dhermes
Copy link
Contributor

dhermes commented Nov 29, 2017

This was reported in googleapis/google-auth-library-python#225 but I have yet to confirm.

@dhermes dhermes added api: pubsub Issues related to the Pub/Sub API. priority: p2 Moderately-important priority. Fix may not be included in next release. status: investigating The issue is under investigation, which is determined to be non-trivial. labels Nov 29, 2017
@dhermes dhermes changed the title Pub / Sub client's don't add scopes to passed-in credentials Pub / Sub clients don't add scopes to passed-in credentials Nov 29, 2017
@dhermes
Copy link
Contributor Author

dhermes commented Dec 13, 2017

/cc @jonparrott

The fix is probably in grpc_helpers, where we could use

if credentials is None:
    credentials, _ = google.auth.default(scopes=scopes)
elif not credentials.has_scopes(scopes):
    credentials = credentials.with_scopes(scopes)

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. priority: p2 Moderately-important priority. Fix may not be included in next release. status: investigating The issue is under investigation, which is determined to be non-trivial.
Projects
None yet
Development

No branches or pull requests

2 participants