Skip to content

Fix : [ISSUE] databricks auth login - Invalid Databricks Account configuration when host does not specify scheme #1403 #1196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lakshiya
Copy link

What changes are proposed in this pull request?

This PR addresses an issue where the Databricks authentication process fails when the host URL does not explicitly include the https:// scheme.

  • WHAT

    The following changes were made:

    1. Updated the logic in the IsAccountClient function in [./config/config.go](config/config.go) to account for host URLs without the https:// scheme (e.g., accounts.cloud.databricks.com).
    2. Added more prefixes to the check to allow authentication with valid hosts that omit the https:// scheme.
    3. Created test cases to validate the fix by checking for authentication with both aws and aws-dod host URLs without the https:// scheme.
  • WHY

    Previously, the authentication failed for users who did not specify https:// in their host URL, even though this should have been allowed. The change ensures that authentication works seamlessly even when the URL is missing the scheme, avoiding unnecessary errors.

How is this tested?

Added unit tests functions in [./config/config_test.go](config/config_test.go) to validate the changes:

  • TestIsAccountClient_WithoutHTTPSInHost_AWSAccount: Validates that the IsAccountClient function works for AWS accounts without the https:// scheme.
  • TestIsAccountClient_WithoutHTTPSInHost_AwsDodAccount: Tests the same functionality for AWS DOD accounts.
  • Both tests were successful, confirming the issue has been resolved. A screenshot showing the test results before and after the fix has been included for reference.

After:

Screenshot 2025-03-30 at 7 57 36 PM

Before:

Screenshot 2025-03-30 at 7 57 53 PM

…iguration when host does not specify scheme #1403
…iguration when host does not specify scheme #1403
Copy link

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-go

Inputs:

  • PR number: 1196
  • Commit SHA: 2c1896a3f2afa5ea0e49d1ffaf11da0190e0487a

Checks will be approved automatically on success.

Copy link

Please ensure that the NEXT_CHANGELOG.md file is updated with any relevant changes.
If this is not necessary for your PR, please include the following in your PR description:
NO_CHANGELOG=true
and rerun the job.

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