Skip to content

feat(spark): add Databricks OAuth M2M authentication - #3453

Draft
rohitrsh wants to merge 2 commits into
flyteorg:masterfrom
rohitrsh:feat/databricks-oauth-m2m
Draft

feat(spark): add Databricks OAuth M2M authentication#3453
rohitrsh wants to merge 2 commits into
flyteorg:masterfrom
rohitrsh:feat/databricks-oauth-m2m

Conversation

@rohitrsh

@rohitrsh rohitrsh commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Stacked draft 2/4 — do not merge out of order.

This branch currently includes the commit from #3452. After #3452 merges, this branch will be rebased onto master so the final review contains only the OAuth M2M change.

Summary

  • Adds explicit oauth_m2m authentication while keeping PAT as the default.
  • Resolves service-principal credentials from a workflow-namespace Secret or connector environment.
  • Caches short-lived tokens and refreshes once after an HTTP 401 for get/delete operations.
  • Adds task configuration, focused documentation, metadata persistence, and connector-level tests.

Stack order:

  1. refactor(spark): isolate Databricks PAT authentication #3452 — PAT strategy refactor
  2. OAuth M2M authentication (this PR)
  3. Connector workload OIDC federation
  4. Workflow-namespace ServiceAccount OIDC federation

Test plan

  • Focused Databricks connector suite — 62 passed
  • Full Spark plugin suite in Linux, Python 3.12, and OpenJDK 17 — 87 passed
  • make lint
  • Ruff lint and format hooks run twice on changed Python files
  • git diff --check
  • Spark plugin sdist/wheel build and import smoke test
  • Changed-file, full-patch, commit-metadata, confidentiality, secret-pattern, and attribution audits

This PR remains draft until #3452 merges, the branch is rebased, all local gates are repeated, and hosted CI is green.

rohitrsh added 2 commits July 30, 2026 15:23
Introduce an authentication strategy boundary while preserving the existing PAT resolution and connector behavior, enabling subsequent auth methods to be reviewed independently.

Signed-off-by: Rohit Sharma <rohitrsh@gmail.com>
Allow connectors and individual tasks to opt into short-lived service-principal tokens while keeping PAT as the unchanged default authentication mode.

Signed-off-by: Rohit Sharma <rohitrsh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant