GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

@HemangChothani

@HemangChothani HemangChothani commented Feb 6, 2020

Copy link
Copy Markdown
Contributor

Fixes #46

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@HemangChothani
fix(storage): change scope for iam access token
20a315d
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 6, 2020
@HemangChothani

HemangChothani commented Feb 6, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@HemangChothani HemangChothani added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 6, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 6, 2020
@crwilcox crwilcox added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 6, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 6, 2020
@HemangChothani
HemangChothani requested review from crwilcox, frankyn and tseaver February 10, 2020 05:06
crwilcox
crwilcox reviewed Feb 11, 2020
View reviewed changes
Comment thread tests/system.py Outdated
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"]

@crwilcox crwilcox Feb 11, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a lot of access. @jkwlui @frankyn is this scope needed for this?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@crwilcox crwilcox Feb 11, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@tseaver tseaver Feb 11, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@frankyn frankyn Feb 11, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@frankyn frankyn Feb 11, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

crwilcox reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread tests/system.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

crwilcox added 2 commits February 11, 2020 21:26
@crwilcox
Merge branch 'master' into storage_fix_system_test
cc7aa31
@crwilcox
fix: narrow scope
2a52b97
crwilcox
crwilcox approved these changes Feb 11, 2020
View reviewed changes
frankyn
frankyn approved these changes Feb 11, 2020
View reviewed changes
crwilcox added 2 commits February 11, 2020 15:39
@crwilcox
fix: trailing commas
10adc53
@crwilcox
chore: blacken
90854a9
@HemangChothani HemangChothani added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 12, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 12, 2020
@crwilcox
Merge branch 'master' into storage_fix_system_test
ea9dca6
@crwilcox crwilcox added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 12, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 12, 2020
@crwilcox
crwilcox merged commit bc5375f into googleapis:master Feb 12, 2020
@yoshi-automation yoshi-automation mentioned this pull request Feb 19, 2020
chore: update to latest black (via synth) #65
Merged
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
@HemangChothani @crwilcox @cojenco
fix(storage): fix system test and change scope for iam access token (g…
9e3440c
…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]>
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
@HemangChothani @crwilcox @cojenco
fix(storage): fix system test and change scope for iam access token (g…
013c076
…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]>
@release-please release-please Bot mentioned this pull request Jan 12, 2022
chore(main): release 3.0.0 #688
Closed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@tseaver tseaver Awaiting requested review from tseaver
2 more reviewers
@crwilcox crwilcox crwilcox approved these changes
@frankyn frankyn frankyn approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

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'

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@HemangChothani @tseaver @crwilcox @frankyn @googlebot @yoshi-kokoro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.