[ 
https://issues.apache.org/jira/browse/BEAM-14014?focusedWorklogId=770291&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-770291
 ]

ASF GitHub Bot logged work on BEAM-14014:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/May/22 17:16
            Start Date: 13/May/22 17:16
    Worklog Time Spent: 10m 
      Work Description: tvalentyn commented on code in PR #17244:
URL: https://github.com/apache/beam/pull/17244#discussion_r870710311


##########
sdks/python/apache_beam/internal/gcp/auth.py:
##########
@@ -160,3 +167,26 @@ def _get_service_credentials():
           'Connecting anonymously.',
           e)
       return None
+
+  @staticmethod
+  def _add_impersonation_credentials(credentials, pipeline_options):
+    if not pipeline_options:
+      return credentials
+    if isinstance(pipeline_options, PipelineOptions):
+      gcs_options = pipeline_options.view_as(GoogleCloudOptions)
+      impersonate_service_account = gcs_options.impersonate_service_account
+    else:
+      impersonate_service_account = pipeline_options.get(

Review Comment:
   When would this param be not PipelineOptions?
   If somehow this value is dictionary,  this call will crash with key error.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 770291)
    Time Spent: 7h 10m  (was: 7h)

> Support impersonation credentials in Dataflow runner.
> -----------------------------------------------------
>
>                 Key: BEAM-14014
>                 URL: https://issues.apache.org/jira/browse/BEAM-14014
>             Project: Beam
>          Issue Type: Improvement
>          Components: runner-dataflow
>            Reporter: Valentyn Tymofieiev
>            Assignee: Ryan Thompson
>            Priority: P2
>          Time Spent: 7h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to