You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/08/31 21:26:56 UTC

[GitHub] [beam] chunyang commented on a change in pull request #15004: [BEAM-12641] Use google-auth instead of oauth2client for GCP auth

chunyang commented on a change in pull request #15004:
URL: https://github.com/apache/beam/pull/15004#discussion_r699685121



##########
File path: sdks/python/apache_beam/internal/gcp/auth.py
##########
@@ -115,29 +131,32 @@ def get_service_credentials(cls):
 
   @staticmethod
   def _get_service_credentials():
-    if is_running_in_gce:
-      # We are currently running as a GCE taskrunner worker.
-      return _GceAssertionCredentials(user_agent='beam-python-sdk/1.0')

Review comment:
       Thanks for the review @tvalentyn. My understanding is that the `google.auth.default()` call in [line 151](https://github.com/apache/beam/pull/15004/files#diff-21a78a52eca0c898070d58302127a9bb5cdb5de512ec16b9b3d945e0b84b694cR151) will attempt to find credentials on GCE VMs using the instance Metadata Server so we don't need a special case within the Beam code. Is this something we can check via the existing integration tests?
   
   https://github.com/googleapis/google-auth-library-python/blob/08c987d0215c9d3e230efe5b7c13e6b8197267bc/google/auth/_default.py#L386-L389




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org