lukecwik commented on a change in pull request #17244:
URL: https://github.com/apache/beam/pull/17244#discussion_r840768114



##########
File path: sdks/python/apache_beam/internal/gcp/auth.py
##########
@@ -125,30 +139,22 @@ def get_service_credentials(cls):
           "socket default timeout is %s seconds.", socket.getdefaulttimeout())
 
       cls._credentials = cls._get_service_credentials()
+      cls._add_impersonation_credentials()
       cls._credentials_init = True
 
     return cls._credentials
 
   @staticmethod
-  def _get_service_credentials():
+  def _get_service_credentials(cls):
     if not _GOOGLE_AUTH_AVAILABLE:
       _LOGGER.warning(
           'Unable to find default credentials because the google-auth library '
           'is not available. Install the gcp extra (apache_beam[gcp]) to use '
           'Google default credentials. Connecting anonymously.')
       return None
 
-    client_scopes = [
-        'https://www.googleapis.com/auth/bigquery',

Review comment:
       CC: @chamikaramj 
   Would it make sense to combine the scopes in Java 
(GcpCredentialFactory.java) and in Python in a properties file or proto enum so 
that XLang will have the same scopes irregardless of whether the Pipeline is 
constructed using Python or Java. 
   
   We can combine the two lists together. Feel free top create a different JIRA 
about this and defer to later.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to