This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 4ee02947ea Improve documentation for WasbHook DefaultAzureCredential 
support (#34103)
4ee02947ea is described below

commit 4ee02947ea0a9f79e59d413be0fbc35da58488ae
Author: Wei Lee <[email protected]>
AuthorDate: Tue Sep 5 22:41:23 2023 +0800

    Improve documentation for WasbHook DefaultAzureCredential support (#34103)
    
    * docs(providers/microsoft): improve documentation for WasbHook 
DefaultAzureCredential support
    
    * docs(providers/microsoft): extract links to end of the doc
---
 .../connections/wasb.rst                           | 35 ++++++++++++++--------
 1 file changed, 23 insertions(+), 12 deletions(-)

diff --git a/docs/apache-airflow-providers-microsoft-azure/connections/wasb.rst 
b/docs/apache-airflow-providers-microsoft-azure/connections/wasb.rst
index 8efdeef362..4ab7f2f43f 100644
--- a/docs/apache-airflow-providers-microsoft-azure/connections/wasb.rst
+++ b/docs/apache-airflow-providers-microsoft-azure/connections/wasb.rst
@@ -27,20 +27,18 @@ The Microsoft Azure Blob Storage connection type enables 
the Azure Blob Storage
 Authenticating to Azure Blob Storage
 ------------------------------------
 
-There are four ways to connect to Azure Blob Storage using Airflow.
+There are five ways to connect to Azure Blob Storage using Airflow.
 
-1. Use `token credentials
-   
<https://docs.microsoft.com/en-us/azure/developer/python/azure-sdk-authenticate?tabs=cmd#authenticate-with-token-credentials>`_
+1. Use `token credentials`_
    i.e. add specific credentials (client_id, secret, tenant) and subscription 
id to the Airflow connection.
-2. Use `Azure Shared Key Credential
-   
<https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key>`_
+2. Use `Azure Shared Key Credential`_
    i.e. add shared key credentials to ``shared_access_key`` the Airflow 
connection.
-3. Use a `SAS Token
-   
<https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas>`_
+3. Use a `SAS Token`_
    i.e. add a key config to ``sas_token`` in the Airflow connection.
-4. Use a `Connection String
-   
<https://docs.microsoft.com/en-us/azure/data-explorer/kusto/api/connection-strings/storage>`_
+4. Use a `Connection String`_
    i.e. add connection string to ``connection_string`` in the Airflow 
connection.
+5. Fallback on DefaultAzureCredential_.
+   This includes a mechanism to try different options to authenticate: Managed 
System Identity, environment variables, authentication through Azure CLI, etc.
 
 Only one authorization method can be used at a time. If you need to manage 
multiple credentials or keys then you should
 configure multiple connections.
@@ -55,31 +53,37 @@ Configuring the Connection
 
 Login (optional)
     Specify the login used for Azure Blob Storage. Strictly needed for Active 
Directory (token) authentication as Service principle credential. Optional for 
the rest if host (account url) is specified.
+    It can be left out to fall back on DefaultAzureCredential_.
 
 Password (optional)
     Specify the password used for Azure Blob Storage. For use with
     Active Directory (token credential) and shared key authentication.
+    It can be left out to fall back on DefaultAzureCredential_.
 
 Host (optional)
-    Specify the account url for Azure Blob Storage. Strictly needed for Active 
Directory (token) authentication as Service principle credential. Optional for 
the rest if login (account name) is specified.
+    Specify the account url for Azure Blob Storage. Strictly needed for Active 
Directory (token) and DefaultAzureCredential_ authentication as Service 
principle credential. Optional for the rest if login (account name) is 
specified.
 
 Blob Storage Connection String (optional)
-    Connection string for use with connection string authentication.
+    Connection string for use with connection string authentication
+    It can be left out to fall back on DefaultAzureCredential_..
 
 Blob Storage Shared Access Key (optional)
     Specify the shared access key. Needed only for shared access key 
authentication.
+    It can be left out to fall back on DefaultAzureCredential_.
 
 SAS Token (optional)
     SAS Token for use with SAS Token authentication.
+    It can be left out to fall back on DefaultAzureCredential_.
 
 Tenant Id (Active Directory Auth) (optional)
     Specify the tenant to use. Required only for Active Directory (token) 
authentication.
+    It can be left out to fall back on DefaultAzureCredential_.
 
 Extra (optional)
     Specify the extra parameters (as json dictionary) that can be used in 
Azure connection.
     The following parameters are all optional:
 
-    * ``client_secret_auth_config``: Extra config to pass while authenticating 
as a service principal using `ClientSecretCredential 
<https://learn.microsoft.com/en-in/python/api/azure-identity/azure.identity.clientsecretcredential?view=azure-python>`_
+    * ``client_secret_auth_config``: Extra config to pass while authenticating 
as a service principal using `ClientSecretCredential`_ It can be left out to 
fall back on DefaultAzureCredential_.
 
 When specifying the connection in environment variable you should specify
 it using URI syntax.
@@ -91,3 +95,10 @@ For example connect with token credentials:
 .. code-block:: bash
 
    export 
AIRFLOW_CONN_WASB_DEFAULT='wasb://blob%20username:blob%[email protected]?tenant_id=tenant+id'
+
+.. _token credentials: 
https://docs.microsoft.com/en-us/azure/developer/python/azure-sdk-authenticate?tabs=cmd#authenticate-with-token-credentials
+.. _Azure Shared Key Credential: 
https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key
+.. _SAS Token: 
https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas
+.. _Connection String: 
https://docs.microsoft.com/en-us/azure/data-explorer/kusto/api/connection-strings/storage
+.. _DefaultAzureCredential: 
https://docs.microsoft.com/en-us/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential
+.. _ClientSecretCredential: 
https://learn.microsoft.com/en-in/python/api/azure-identity/azure.identity.clientsecretcredential?view=azure-python

Reply via email to