Skip to main content

Manage storage credentials

This page describes how to list, view, update, grant permissions on, and delete storage credentials.

Databricks recommends that you grant only CREATE EXTERNAL LOCATION and no other privileges on storage credentials.

This page describes how to manage storage credentials using Catalog Explorer and SQL commands. For information about using the Databricks CLI or Terraform instead, see the Databricks Terraform documentation and What is the Databricks CLI?.

List storage credentials

To view the list of all storage credentials in a metastore, you can use Catalog Explorer or a SQL command.

  1. In the sidebar, click Data icon. Catalog.
  2. On the Quick access page, click the External data > button and go to the Credentials tab.
  3. Sort the credentials by Purpose (STORAGE or SERVICE).

View a storage credential

To view the properties of a storage credential, you can use Catalog Explorer or a SQL command.

  1. In the sidebar, click Data icon. Catalog.
  2. On the Quick access page, click the External data > button and go to the Credentials tab.
  3. Click the name of a storage credential to see its properties.

Assign a storage credential to specific workspaces

By default, a storage credential is accessible from all of the workspaces in the metastore. This means that if a user has been granted a privilege (such as CREATE EXTERNAL LOCATION) on that storage credential, they can exercise that privilege from any workspace attached to the metastore. If you use workspaces to isolate user data access, you may want to allow access to a storage credential only from specific workspaces. This feature is known as workspace binding or storage credential isolation.

A typical use case for binding a storage credential to specific workspaces is the scenario in which a cloud admin configures a storage credential using a production cloud account credential, and you want to ensure that Databricks users use this credential to create external locations only in the production workspace.

For more information about workspace binding, see Limit catalog access to specific workspaces.

note

Workspace bindings are referenced when privileges against storage credentials are exercised. For example, if a user creates an external location using a storage credential, the workspace binding on the storage credential is checked only when the external location is created. After the external location is created, it will function independently of the workspace bindings configured on the storage credential.

Bind a storage credential to one or more workspaces

To assign a storage credential to specific workspaces, you can use Catalog Explorer or the Databricks CLI.

Permissions required: Metastore admin, storage credential owner, or MANAGE on the storage credential.

note

Metastore admins can see all storage credentials in a metastore using Catalog Explorer—and storage credential owners can see all storage credentials that they own in a metastore—regardless of whether the storage credential is assigned to the current workspace. Storage credentials that are not assigned to the workspace appear grayed out.

  1. Log in to a workspace that is linked to the metastore.

  2. In the sidebar, click Data icon. Catalog.

  3. On the Quick access page, click the External data > button and go to the Credentials tab.

  4. Select the storage credential and go to the Workspaces tab.

  5. On the Workspaces tab, clear the All workspaces have access checkbox.

    If your storage credential is already bound to one or more workspaces, this checkbox is already cleared.

  6. Click Assign to workspaces and enter or find the workspaces you want to assign.

To revoke access, go to the Workspaces tab, select the workspace, and click Revoke. To allow access from all workspaces, select the All workspaces have access checkbox.

Unbind a storage credential from a workspace

Instructions for revoking workspace access to a storage credential using Catalog Explorer or the workspace-bindings CLI command group are included in Bind a storage credential to one or more workspaces.

Show grants on a storage credential

To view the grants on a storage credential, you can use Catalog Explorer or a SQL command.

  1. In the sidebar, click Data icon. Catalog.
  2. On the Quick access page, click the External data > button and go to the Credentials tab.
  3. Click the name of a storage credential.
  4. Click Permissions.

Grant permissions to create external locations

To grant permission to create an external location using a storage credential, complete the following steps:

  1. In the sidebar, click Data icon. Catalog.
  2. On the Quick access page, click the External data > button and go to the Credentials tab.
  3. Click the name of a storage credential to open the details page.
  4. Click Permissions.
  5. To grant permission to users or groups, select each identity, then click Grant.
  6. To revoke permissions from users or groups, select each identity, then click Revoke.

Change the owner of a storage credential

A storage credential's creator is its initial owner. To change the owner to a different account-level user or group, you can use Catalog Explorer or a SQL command.

  1. In the sidebar, click Data icon. Catalog.
  2. On the Quick access page, click the External data > button and go to the Credentials tab.
  3. Click the name of a storage credential.
  4. Click Edit icon next to Owner.
  5. Type to search for a principal and select it.
  6. Click Save.

Mark a storage credential as read-only

If you want users to have read-only access to all data managed by a storage credential, you can use Catalog Explorer to mark the storage credential as read-only.

Making storage credentials read-only means that any storage configured with that credential is read-only.

You can mark storage credentials as read-only when you create them.

You can also use Catalog Explorer to change read-only status after creating a storage credential:

  1. In Catalog Explorer, find the storage credential, click the Kebab menu icon. kebab menu on the object row, and select Edit.
  2. On the edit dialog, select the Read only option.

Rename a storage credential

To rename a storage credential, you can use Catalog Explorer or a SQL command.

  1. In the sidebar, click Data icon. Catalog.
  2. On the Quick access page, click the External data > button and go to the Credentials tab.
  3. Click the name of a storage credential to open the edit dialog.
  4. Rename the storage credential and save it.

Delete a storage credential

To delete (drop) a storage credential you must be its owner. To delete a storage credential, you can use Catalog Explorer or a SQL command.

  1. In the sidebar, click Data icon. Catalog.
  2. On the Quick access page, click the External data > button and go to the Credentials tab.
  3. Click the name of a storage credential to open the edit dialog.
  4. Click the Delete button.