-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Include the GCP scope when creating a scoped credential token. #23410
Conversation
Include the GCP scope when creating a scoped credential token.
The Workflow run is cancelling this PR. It is an earlier duplicate of 2083803 run. |
R: @chamikaramj |
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control |
Run Python 3.8 postcommit |
LGTM. Thanks. |
(also mention in the PR description that this scope is already included for Java SDK). |
Codecov Report
@@ Coverage Diff @@
## master #23410 +/- ##
==========================================
- Coverage 73.41% 73.40% -0.01%
==========================================
Files 718 718
Lines 95652 95652
==========================================
- Hits 70222 70216 -6
- Misses 24119 24125 +6
Partials 1311 1311
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -45,6 +45,7 @@ | |||
_LOGGER = logging.getLogger(__name__) | |||
|
|||
CLIENT_SCOPES = [ | |||
'https://www.googleapis.com/auth/cloud-platform', | |||
'https://www.googleapis.com/auth/bigquery', | |||
'https://www.googleapis.com/auth/cloud-platform', |
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.
Looks like the scope is already there, so this PR isn't actually doing anything.
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.
Yeah, you are right. This would not have any affect.
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 PR is adding a line that was already there.
oops, my bad. |
It's recommended to use GCP scope in clients talking to GCP: https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam . This scope is used in Java SDK: https://github.com/apache/beam/blob/master/sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/auth/GcpCredentialFactory.java#L47