Databricks client unified authentication centralizes setting up and automating authentication to Databricks as part of OAuth authorization. It enables you to configure Databricks authentication once and then use that configuration across multiple Databricks tools and SDKs without further authentication configuration changes.
Participating Databricks tools and SDKs include:
All participating tools and SDKs accept special environment variables and Databricks configuration profiles for authentication. The Databricks Terraform provider and the Databricks SDKs for Python, Java, and Go also accept direct configuration of authentication settings within code. For details, see Local development tools for the tool's or SDK's documentation.
Default methods for client unified authenticationâWhenever a tool or SDK must authorize access to Databricks, it tries the following types of authentication in the following order by default. When the tool or SDK succeeds with the type of authentication it tries, it stops trying to authenticate with the remaining authentication types. To force an SDK to authenticate with a specific authentication type, set the Config
API's Databricks authentication type field.
For each authentication type that the participating tool or SDK tries, the tool or SDK tries to find authentication credentials in the following locations, in the following order. When the tool or SDK succeeds in finding authentication credentials that can be used, the tool or SDK stops trying to find authentication credentials in the remaining locations.
Config
API fields (for SDKs).DEFAULT
configuration profile within the .databrickscfg
file. To set configuration profile fields, see Databricks configuration profiles.To provide maximum portability for your code, Databricks recommends that you create a custom configuration profile within the .databrickscfg
file, add the required fields below for your target Databricks authentication type to the custom configuration profile, and then set the DATABRICKS_CONFIG_PROFILE
environment variable to the name of the custom configuration profile.
The following tables list the names and descriptions of the supported environment variables and fields for Databricks client unified authentication. In the following tables:
.databrickscfg
field, where applicable, is the name of the field within a Databricks configuration profiles file. To set .databrickscfg
fields, see Databricks configuration profiles.Config
field is the name of the field within the Config
API for the specified SDK.Use these environment variables or fields to specify non-default settings for .databrickscfg
. See also Databricks configuration profiles.
Use this environment variable or field to force an SDK to use a specific type of Databricks authentication.
Supported Databricks authentication type field values include:
oauth-m2m
: Set this value if you are using a Databricks service principal for M2M authentication with OAuth 2.0. See Authorize unattended access to Databricks resources with a service principal using OAuth.pat
: Set this value if you are using Databricks personal access tokens. See Databricks personal access token authentication.databricks-cli
: Set this value if you are using the Databricks CLI with OAuth 2.0. See Authorize user access to Databricks with OAuth.oidc-token
: Set this value if you are using OAuth token federation. See Authenticate access to Databricks using OAuth token federation.env-oidc
: Set this value if you are using OAuth token federation. See Authenticate access to Databricks using OAuth token federation.github-oidc
: Set this value if you are using OAuth token federation with GitHub. For an example, see Enable workload identity federation in CI/CD.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4