GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — fix(storage): fix system test and change scope for iam access token by HemangChothani · Pull Request #47 · googleapis/python-storage
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
Conversation
Contributor
Fixes #46
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
System test throws 'Identity and Access Management (IAM) API has not been used in project before or it is disabled. ' error, so need (IAM) permission for this project. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| service_account_email = Config.CLIENT._credentials.service_account_email | ||
| name = client.service_account_path("-", service_account_email) | ||
| scope = ["https://www.googleapis.com/auth/devstorage.read_write"] | ||
| scope = ["https://www.googleapis.com/auth/cloud-platform"] |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
(we don't have to block merging on this as it is a test, but if this is needed it seems like a large scope for narrow use?)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I can confirm that both tests fail on master with a 403 without this patch.
Update: it fails even with the cloud-platform scope for me on master.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Could you narrow the scope down to: https://www.googleapis.com/auth/iam
Documented at the bottom of the following document: https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
To clarify, you can do join both:
scope = ['https://www.googleapis.com/auth/devstorage.read_write', 'https://www.googleapis.com/auth/iam']
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…oogleapis#47) * fix(storage): change scope for iam access token * fix: narrow scope * fix: trailing commas * chore: blacken Co-authored-by: Christopher Wilcox <[email protected]>
…oogleapis#47) * fix(storage): change scope for iam access token * fix: narrow scope * fix: trailing commas * chore: blacken Co-authored-by: Christopher Wilcox <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Storage: access token field is unused in system test 'test_create_signed_read_url_*_w_access_token'
There was an error while loading. Please reload this page.