Skip to main content

Basic authentication (End of Life)

note

Basic authentication using a Databricks username and password reached end of life on July 10, 2024. See End of life for Databricks-managed passwords.

Basic authentication uses a Databricks username and password to authenticate the target Databricks user account. Basic authentication is legacy and not recommended in production.

To configure basic authentication, you must set the following associated environment variables, .databrickscfg fields, Terraform fields, or Config fields:

  • The Databricks host.
    • For account operations, specify https://accounts.cloud.databricks.com.
    • For workspace operations, specify the workspace URL, for example https://dbc-a1b2345c-d6e7.cloud.databricks.com.
  • The username of the Databricks user account.
  • The password of the Databricks user account.
  • For Databricks account operations, the Databricks account ID.

The password of a Databricks user account must meet the following complexity requirements:

  • Must be greater than 8 characters and less than 50 characters

  • Must contains at least one character from each of the following categories:

    • Base 10 digits (0 through 9).

    • Lowercase letters

    • Uppercase letters

    • Non-alphanumeric characters (special characters):

      '-!"#$%&()*,./:;?@[]^_`{|}~+<=>

Complexity requirements are enforced when passwords are changed or created.

To perform basic authentication, integrate the following within your code, based on the participating tool or SDK:

To use environment variables for a specific Databricks authentication type with a tool or SDK, see Authorizing access to Databricks resources or the tool’s or SDK’s documentation. See also Environment variables and fields for client unified authentication and the Default methods for client unified authentication.

For account-level operations, set the following environment variables:

  • DATABRICKS_HOST, set to the Databricks account console URL, https://accounts.cloud.databricks.com.
  • DATABRICKS_ACCOUNT_ID
  • DATABRICKS_USERNAME
  • DATABRICKS_PASSWORD

For workspace-level operations, set the following environment variables:

  • DATABRICKS_HOST, set to the Databricks workspace URL, for example https://dbc-a1b2345c-d6e7.cloud.databricks.com.
  • DATABRICKS_USERNAME
  • DATABRICKS_PASSWORD