You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "phanikumv (via GitHub)" <gi...@apache.org> on 2023/08/16 10:42:56 UTC
[GitHub] [airflow] phanikumv commented on a diff in pull request #33433: feat(providers/microsoft): add DefaultAzureCredential to data_lake
phanikumv commented on code in PR #33433:
URL: https://github.com/apache/airflow/pull/33433#discussion_r1295710721
##########
airflow/providers/microsoft/azure/hooks/data_lake.py:
##########
@@ -308,18 +310,18 @@ def get_conn(self) -> DataLakeServiceClient: # type: ignore[override]
# connection_string auth takes priority
return DataLakeServiceClient.from_connection_string(connection_string, **extra)
+ credential: Credentials
tenant = self._get_field(extra, "tenant_id")
if tenant:
# use Active Directory auth
app_id = conn.login
app_secret = conn.password
- token_credential = ClientSecretCredential(tenant, app_id, app_secret)
- return DataLakeServiceClient(
- account_url=f"https://{conn.host}.dfs.core.windows.net", credential=token_credential, **extra
- )
+ credential = ClientSecretCredential(tenant, app_id, app_secret)
+ elif conn.password:
+ credential = conn.password
+ else:
+ credential = DefaultAzureCredential()
Review Comment:
Can you post a screenshot of a task working successfully with the `DefaultAzureCredential` that you introduced
--
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