databricks-sdk-java icon indicating copy to clipboard operation
databricks-sdk-java copied to clipboard

Add DatabricksOAuthTokenSource

Open emmyzhou-db opened this issue 7 months ago • 1 comments

What changes are proposed in this pull request?

  • Implemented DatabricksOAuthTokenSource class that handles the OAuth token exchange flow
  • This class manages the OAuth token exchange flow using ID tokens to obtain access tokens
  • The token exchange mechanism is essential for implementing OIDC-based authentication in Databricks

How is this tested?

The implementation is tested through unit tests that:

  • Mock the ID Token Source to simulate the token exchange flow
  • Mock the HTTP client to verify token exchange requests and responses
  • Test the complete token exchange flow including audience selection and error handling
  • Validate proper parameter handling and error responses
  • All tests are automated and part of the unit test suite. No manual testing was required.

NO_CHANGELOG=true

emmyzhou-db avatar Apr 30 '25 15:04 emmyzhou-db

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger: go/deco-tests-run/sdk-java

Inputs:

  • PR number: 439
  • Commit SHA: 28dca4f31b963e76cc4a7f3c7cb35573239bb79e

Checks will be approved automatically on success.

github-actions[bot] avatar May 07 '25 11:05 github-actions[bot]