databricks / databricks-sql-nodejs

Databricks SQL Connector for Node.js
Apache License 2.0
24 stars 34 forks source link

[PECO-1431] Support Databricks OAuth in Azure #223

Closed jackyhu-db closed 9 months ago

jackyhu-db commented 10 months ago

Add optional property useDatabricksOAuthInAzure in the parameter ConnectionOptions of DBSQLClient.connect.

If it is set as true, it will use Databricks native OAuth rather than Azure AD OAuth in both OAuth U2M and M2M flow. If it is not set or set as false, it will still use the existing Azure AD OAuth.

To use this in OAuth M2M flow, the oauthClientId and oauthClientSecret in the ConnectionOptions must be Databricks service principal client ID and secret which can be created by Databricks API or Databricks Account UI.

kravets-levko commented 10 months ago

@jackyhu-db Is this related to databricks/databricks-sql-python#327 ?

jackyhu-db commented 9 months ago

@jackyhu-db Is this related to databricks/databricks-sql-python#327 ?

@kravets-levko no, it is to support Databrick native OAuth in Azure, the other PR does not cover this.

codecov-commenter commented 9 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (086f5bb) 90.41% compared to head (3f4ef7c) 90.55%. Report is 1 commits behind head on main.

Files Patch % Lines
...ib/connection/auth/DatabricksOAuth/OAuthManager.ts 93.75% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #223 +/- ## ========================================== + Coverage 90.41% 90.55% +0.14% ========================================== Files 61 62 +1 Lines 1408 1429 +21 Branches 232 241 +9 ========================================== + Hits 1273 1294 +21 Misses 84 84 Partials 51 51 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.