You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/02/18 07:40:09 UTC

[GitHub] [airflow] eladkal commented on a change in pull request #21451: TrinoHook add authentication via JWT token and Impersonation

eladkal commented on a change in pull request #21451:
URL: https://github.com/apache/airflow/pull/21451#discussion_r809741809



##########
File path: tests/providers/trino/hooks/test_trino.py
##########
@@ -82,6 +83,21 @@ def test_get_conn_kerberos_auth(self, mock_get_connection, mock_connect, mock_au
         )
         TrinoHook().get_conn()
         self.assert_connection_called_with(mock_connect, auth=mock_auth)
+    

Review comment:
       ```suggestion
   
   ```

##########
File path: airflow/providers/trino/hooks/trino.py
##########
@@ -81,10 +84,14 @@ def get_conn(self) -> Connection:
                 delegate=_boolify(extra.get('kerberos__delegate', False)),
                 ca_bundle=extra.get('kerberos__ca_bundle'),
             )
+        

Review comment:
       ```suggestion
   
   ```

##########
File path: airflow/providers/trino/hooks/trino.py
##########
@@ -81,10 +84,14 @@ def get_conn(self) -> Connection:
                 delegate=_boolify(extra.get('kerberos__delegate', False)),
                 ca_bundle=extra.get('kerberos__ca_bundle'),
             )
+        
+        if _boolify(extra.get('impersonate_as_owner', False)):
+            user = os.getenv('AIRFLOW_CTX_DAG_OWNER', None)
+        

Review comment:
       ```suggestion
   
   ```




-- 
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: commits-unsubscribe@airflow.apache.org

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