Skip to content

Add an option to set a timeout for browser confirmation in the U2M authentication flow. #496

Merged
renaudhartert-db merged 10 commits into
mainfrom
renaud-hartert_data/tineout
Aug 8, 2025
Merged

Add an option to set a timeout for browser confirmation in the U2M authentication flow. #496
renaudhartert-db merged 10 commits into
mainfrom
renaud-hartert_data/tineout

Conversation

@renaudhartert-db

@renaudhartert-db renaudhartert-db commented Aug 7, 2025

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

This PR adds a configurable timeout for OAuth browser authentication in the Databricks SDK for Java.

The OAuth browser authentication flow currently waits indefinitely for user interaction, which can cause applications to hang indefinitely if users don't complete the authentication process.

The key changes include:

  • New configuration option: Added setOAuthBrowserAuthTimeout(Duration timeout) to DatabricksConfig with environment variable support via DATABRICKS_OAUTH_BROWSER_AUTH_TIMEOUT.
  • Timeout implementation: Modified the OAuth consent flow in Consent.CallbackResponseHandler to enforce the configured timeout when waiting for browser callback parameters.
  • Bug fixes: Fixed ConfigAttributeAccessor to properly handle Duration, Integer, and Boolean types from environment variables.

How is this tested?

Added unit tests to verify that env variables are properly loaded and that the timeout logic works as expected.

@github-actions

github-actions Bot commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

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: 496
  • Commit SHA: 3a54783be4f67538a6221d2923784f378d839b46

Checks will be approved automatically on success.

@renaudhartert-db renaudhartert-db added this pull request to the merge queue Aug 8, 2025
Merged via the queue into main with commit 7f9b0c8 Aug 8, 2025
16 checks passed
@renaudhartert-db renaudhartert-db deleted the renaud-hartert_data/tineout branch August 8, 2025 08:53
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.

3 participants