astronomer / astro-provider-databricks

Orchestrate your Databricks notebooks in Airflow and execute them as Databricks Workflows
Apache License 2.0
20 stars 10 forks source link

Enhancement - Authentication using OAuth tokens for service principals. #46

Open ganeshrohan opened 1 year ago

ganeshrohan commented 1 year ago

The current implementation utilizes Databricks CLI - ApiClient for authentication, which requires the user to provide a username and password or a Personal Access Token (PAT). It would help if the token generation and refreshing process could be automated using Azure service principal credentials. This would simplify the authentication process.

For example - The below function call can be implemented: _get_token .

(https://github.com/apache/airflow/blob/da4912b5e562c7a30e0c54f79220c99a32e69ab9/airflow/providers/databricks/hooks/databricks_base.py#L213)