-
Notifications
You must be signed in to change notification settings - Fork 51
Description
Description
The error thrown here can mask the actual underlying issue
return nil, ErrOAuthNotSupported |
Reproduction
any network timeout will be masked as "databricks OAuth is not supported for this host"
Expected behavior
We should either
- distingush between network error or other lower level errors (SSL error etc) and let the user know what caused the error
OR at the min
- clarify the error message and say something like "databricks OAuth is not supported OR the host is not responding due to a network connectivity issue"
Is it a regression?
No
Debug Logs
Logs from Terraform provider where this error was thrown
│ Error: cannot read secret scope: failed during request visitor: default auth: oauth-m2m: oidc: databricks OAuth is not supported for this host. Config: host=https://adb-3478526915382991.11.azuredatabricks.net/, actions_id_token_request_url=https://run-actions-2-azure-eastus.actions.githubusercontent.com/47//idtoken/6c40b6f0-0af9-43dc-b045-82a57c8d6b86/58a8496b-2fda-5c1b-bde4-7612f115de74?api-version=2.0, actions_id_token_request_token=*** client_id=36db242e-2316-413c-926c-263b621ca9f0, client_secret=***. Env: DATABRICKS_HOST, ACTIONS_ID_TOKEN_REQUEST_URL, ACTIONS_ID_TOKEN_REQUEST_TOKEN, DATABRICKS_CLIENT_ID, DATABRICKS_CLIENT_SECRET
Other Information
Additional context
The error pasted above initially was thrown by terraform. We spent a great amount of time looking at the Terraform or credentials passed assuming the error is either due to databricks workspace/credentials/ or terraform. We had no luck figuring out the issue. We ended up enabling Terraform DEBUG logs and saw the following:
2025-07-09T23:09:44.893Z [DEBUG] provider.terraform-provider-databricks_v1.56.0: GET /oidc/.well-known/oauth-authorization-server
< Error: Get "https://adb-removed.azuredatabricks.net/oidc/.well-known/oauth-authorization-server": request timed out after 30s of inactivity: tf_mux_provider=tf5to6server.v5tov6Server @caller=/home/runner/work/terraform-provider-
request timed out after 30s of inactivity gave us a hint that this could be due to databricks workspace being behind firewall.
This issue would have been resolved much faster if the error message had been more indicative of the problem. The message of "databricks OAuth is not supported for this host." was deceiving