Skip to content

Comments

feat(database): add databricks oauth support#34619

Draft
drummerwolli wants to merge 7 commits intoapache:masterfrom
drummerwolli:databricks-oauth
Draft

feat(database): add databricks oauth support#34619
drummerwolli wants to merge 7 commits intoapache:masterfrom
drummerwolli:databricks-oauth

Conversation

@drummerwolli
Copy link
Contributor

SUMMARY

OAuth 2.0 support for Databricks

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

tbd

TESTING INSTRUCTIONS

  • set up oauth config in superset_config.py for databricks as described in the newly added docs
  • install databricks dependencies
  • run superset
  • set up a DB connection to Databricks
  • run a Query with that newly created connection and notice the Oauth login screen.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@github-actions github-actions bot added the doc Namespace | Anything related to documentation label Aug 8, 2025
@dosubot dosubot bot added the data:connect Namespace | Anything related to db connections / integrations label Aug 8, 2025
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Design Duplicated OAuth2 Configuration ▹ view ✅ Fix detected
Security OAuth Client Secrets Exposed in Config File ▹ view 🧠 Incorrect
Functionality Hardcoded OAuth2 endpoints limit cloud provider support ▹ view ✅ Fix detected
Files scanned
File Path Reviewed
superset/db_engine_specs/databricks.py
docs/docs/configuration/databases.mdx

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

Comment on lines 455 to 460
oauth2_authorization_request_uri = (
"https://accounts.cloud.databricks.com/oidc/accounts/{}/v1/authorize"
)
oauth2_token_request_uri = (
"https://accounts.cloud.databricks.com/oidc/accounts/{}/v1/token" # noqa: S105
)

This comment was marked as resolved.

Comment on lines 455 to 457
oauth2_authorization_request_uri = (
"https://accounts.cloud.databricks.com/oidc/accounts/{}/v1/authorize"
)

This comment was marked as resolved.

Comment on lines 539 to 546
DATABASE_OAUTH2_CLIENTS = {
"Databricks (legacy)": {
"id": "your-databricks-client-id",
"secret": "your-databricks-client-secret",
"scope": "sql",
"authorization_request_uri": "https://accounts.cloud.databricks.com/oidc/accounts/{account_id}/v1/authorize",
"token_request_uri": "https://accounts.cloud.databricks.com/oidc/accounts/{account_id}/v1/token",
},

This comment was marked as resolved.

@codecov
Copy link

codecov bot commented Aug 8, 2025

Codecov Report

❌ Patch coverage is 39.34426% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.17%. Comparing base (76d897e) to head (0b786fc).
⚠️ Report is 3252 commits behind head on master.

Files with missing lines Patch % Lines
superset/db_engine_specs/databricks.py 39.34% 37 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #34619       +/-   ##
===========================================
+ Coverage   60.48%   72.17%   +11.68%     
===========================================
  Files        1931      574     -1357     
  Lines       76236    41921    -34315     
  Branches     8568     4424     -4144     
===========================================
- Hits        46114    30256    -15858     
+ Misses      28017    10483    -17534     
+ Partials     2105     1182      -923     
Flag Coverage Δ
hive 46.99% <39.34%> (-2.16%) ⬇️
javascript ?
mysql 71.68% <39.34%> (?)
postgres 71.75% <39.34%> (?)
presto 50.68% <39.34%> (-3.12%) ⬇️
python 72.13% <39.34%> (+8.63%) ⬆️
sqlite 71.30% <39.34%> (?)
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@drummerwolli drummerwolli marked this pull request as draft August 8, 2025 13:56
@drummerwolli
Copy link
Contributor Author

I'm currently testing this internally and will report back here, hence there might not be any visible activity in this PR in the next days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:connect Namespace | Anything related to db connections / integrations doc Namespace | Anything related to documentation review:draft size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants