You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "adamwhitneysoftwire (via GitHub)" <gi...@apache.org> on 2023/03/08 15:46:02 UTC
[GitHub] [airflow] adamwhitneysoftwire opened a new issue, #29980: ADLS Gen2 Hook incorrectly forms account URL when using Active Directory authentication method (Azure Data Lake Storage V2)
adamwhitneysoftwire opened a new issue, #29980:
URL: https://github.com/apache/airflow/issues/29980
### Apache Airflow Provider(s)
microsoft-azure
### Versions of Apache Airflow Providers
apache-airflow-providers-microsoft-azure 5.2.1
### Apache Airflow version
2.5.1
### Operating System
Ubuntu 18.04
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
_No response_
### What happened
When attempting to use Azure Active Directory application to connect to Azure Data Lake Storage Gen2 hook, the generated account URL sent to the DataLakeServiceClient is incorrect.
It substitutes in the Client ID (`login` field) where the storage account name should be.
### What you think should happen instead
The `host` field on the connection form should be used to store the storage account name and should be used to fill the account URL for both Active Directory and Key-based authentication.
### How to reproduce
1. Create an "Azure Data Lake Storage V2" connection (adls) and put the AAD application Client ID into `login` field, Client secret into `password` field and Tenant ID into `tenant_id` field.
2. Attempt to perform any operations with the `AzureDataLakeStorageV2Hook` hook.
3. Notice how it fails, and that the URL in the logs is incorrectly `https://{client_id}.dfs.core.windows.net/...`, when it should be `https://{storage_account}.dfs.core.windows.net/...`
This can be fixed by:
1. Making your own copy of the hook.
2. Entering the storage account name into the `host` field (currently labelled "Account Name (Active Directory Auth)").
3. Editing the `get_conn` method to substitute `conn.host` into the `account_url` (instead of `conn.login`).
### Anything else
_No response_
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on issue #29980: ADLS Gen2 Hook incorrectly forms account URL when using Active Directory authentication method (Azure Data Lake Storage V2)
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #29980:
URL: https://github.com/apache/airflow/issues/29980#issuecomment-1460364167
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
--
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
[GitHub] [airflow] potiuk closed issue #29980: ADLS Gen2 Hook incorrectly forms account URL when using Active Directory authentication method (Azure Data Lake Storage V2)
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed issue #29980: ADLS Gen2 Hook incorrectly forms account URL when using Active Directory authentication method (Azure Data Lake Storage V2)
URL: https://github.com/apache/airflow/issues/29980
--
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