aaabramov commented on code in PR #46505:
URL: https://github.com/apache/airflow/pull/46505#discussion_r1950581744
##########
providers/hashicorp/src/airflow/providers/hashicorp/_internal_client/vault_client.py:
##########
@@ -299,13 +306,47 @@ def _auth_gcp(self, _client: hvac.Client) -> None:
)
scopes = _get_scopes(self.gcp_scopes)
- credentials, _ = get_credentials_and_project_id(
+ credentials, project_id = get_credentials_and_project_id(
key_path=self.gcp_key_path, keyfile_dict=self.gcp_keyfile_dict,
scopes=scopes
)
+
+ import time
+ import json
+ import googleapiclient
+
+ with open(self.gcp_key_path, 'r') as f:
Review Comment:
This will work only with a mounted credentials file. We also have to handle
cases when Airflow is running using workload identity (or Composer).
Maybe we can reuse gcloud SDK to create a signed JWT?
Please correct me if I am wrong
--
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]