---
title: Set up OpenSharing for your account (for providers)
description: "Set up OpenSharing in your Databricks account to share data securely: enable sharing, grant permissions, and configure materialization caching."
canonical_url: https://docs.databricks.com/aws/en/opensharing/set-up
---

# Set up OpenSharing for your account (for providers)

As a data provider, set up OpenSharing on Databricks to share data securely with other organizations. Enable sharing on a Unity Catalog metastore, grant permissions, configure materialization caching, and allow storage network access.

If you are a *data recipient* (an organization that receives data that is shared using OpenSharing), see [Read data shared using Databricks-to-Databricks OpenSharing (for recipients)](https://docs.databricks.com/aws/en/opensharing/read-data-databricks.md).

> [!IMPORTANT]
>
> OpenSharing requires a Unity Catalog-enabled workspace. You can create one Unity Catalog-enabled workspace for share management. In some accounts, new workspaces are enabled for Unity Catalog automatically. See [Get started with Unity Catalog](https://docs.databricks.com/aws/en/data-governance/unity-catalog/get-started.md).
>
> If creating a new Unity Catalog-enabled workspace is not an option, you can use the [open-source OpenSharing project](https://opensharing.io) to deploy your own OpenSharing server to share Delta tables from any platform.

Initial provider setup includes the following steps:

1. Enable OpenSharing on a Unity Catalog metastore.
2. (Optional) Install the Unity Catalog CLI.
3. Grant privileges to create and manager shares and recipients.
4. Configure time-to-live (TTL) of data materialization.
5. Configure storage network access.

## Requirements

As a data provider who is setting up your Databricks account to be able to share data, you must have:

* At least one Databricks workspace that is [enabled for Unity Catalog](https://docs.databricks.com/aws/en/data-governance/unity-catalog/get-started.md).

  You do not need to migrate all of your workspaces to Unity Catalog to take advantage of Databricks support for OpenSharing providers. See [Do I need Unity Catalog to use OpenSharing?](https://docs.databricks.com/aws/en/opensharing/index.md#uc-faq).

  Recipients do not need to have a Unity Catalog-enabled workspace.

* Account admin role to enable OpenSharing for your Unity Catalog metastore.

* Metastore admin role or the `CREATE SHARE` and `CREATE RECIPIENT` privileges. See [Metastore admins](https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/admin-privileges.md#metastore-admins).

  > [!NOTE]
  >
  > If your workspace was enabled for Unity Catalog automatically, you might not have a metastore admin. However, workspace admins in such workspaces have the `CREATE SHARE` and `CREATE RECIPIENT` privileges on the metastore by default.
  >
  > For more information, see [Get started with Unity Catalog](https://docs.databricks.com/aws/en/data-governance/unity-catalog/get-started.md) and [Workspace admin privileges when workspaces are enabled for Unity Catalog automatically](https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/admin-privileges.md#workspace-admins-auto).

* A cloud storage configuration that allows network access from the recipient.

## <a id="enable" />Enable OpenSharing on a metastore

You do not need to enable OpenSharing on your metastore if you intend to use OpenSharing only to share data with users on other Unity Catalog metastores in your account. Metastore-to-metastore sharing within a single Databricks account is enabled by default.

Otherwise, follow these steps for each Unity Catalog metastore that manages data that you plan to share using OpenSharing.

1. As a Databricks account admin, log in to the [account console](https://accounts.cloud.databricks.com).

2. In the sidebar, click ![Data icon.](https://docs.databricks.com/aws/en/images/product-icons/DataIcon.svg) **Catalog**.

3. Click the name of a metastore to open its details.

4. Click the checkbox next to **Allow OpenSharing with parties outside your organization**.

5. Configure the recipient token lifetime.

   This configuration sets the period of time after which all recipient tokens expire and must be regenerated. Recipient tokens are used only in the [Databricks-to-Open sharing](https://docs.databricks.com/aws/en/opensharing/index.md#open) protocol. Tokens are valid for a maximum of one year after creation.

   > [!NOTE]
   >
   > The recipient token lifetime for existing recipients is not updated automatically when you change the default recipient token lifetime for a metastore. In order to apply a new token lifetime to a given recipient, you must rotate their token. See [Manage recipient tokens](https://docs.databricks.com/aws/en/opensharing/create-recipient-token.md#rotate-credential).

   To set the default recipient token lifetime:

   1. Confirm that **Set expiration** is enabled (this is the default).
   2. Enter a number of seconds, minutes, hours, or days, and select the unit of measure. Tokens are valid for a maximum of one year after creation.
   3. Click **Enable**.

   For more information, see [Security considerations for tokens](https://docs.databricks.com/aws/en/opensharing/create-recipient-token.md#security-considerations).

6. When sharing with a Databricks recipient who is not in your account, enter an **Organization name**.

   > [!NOTE]
   >
   > Specifying a readable organization name helps recipients to identify their share providers and the corresponding provider objects in the recipient's provider list.

7. Click **Enable**.

## <a id="cli" />(Optional) Install the Unity Catalog CLI

To manage shares and recipients, you can use Catalog Explorer, SQL commands, or the Unity Catalog CLI. The CLI runs in your local environment and does not require Databricks compute resources.

To install the CLI, see [Databricks CLI](https://docs.databricks.com/aws/en/dev-tools/cli/index.md).

## Grant permission to create and manage shares and recipients

Metastore admins have the ability to create and manage shares and recipients, including the granting of shares to recipients. Many provider tasks can be delegated by a metastore admin using the following privileges:

* `CREATE SHARE` on the metastore grants the ability to create shares.
* `CREATE RECIPIENT` on the metastore grants the ability to create recipients.
* `USE RECIPIENT` on grants the ability to list and view details for all recipients in the metastore.
* `USE SHARE` on the metastore grants the ability to list and view details for all shares in the metastore.
* `USE RECIPIENT`, `USE SHARE,` and `SET SHARE PERMISSION` combined give a user the ability to grant share access to recipients.
* The metastore admin has the ability to transfer ownership of any share.
* Share and recipient owners can update those objects and grant shares to recipients. Object creators are granted ownership by default, but ownership can be transferred.
* Share owners can add tables, volumes, and agent skills to shares, as long as they have `SELECT` access to the tables and `READ VOLUME` access to the volumes and agent skills. For agent skills, see [Add agent skills to a share](https://docs.databricks.com/aws/en/opensharing/create-share.md#skills).

For details, see [Unity Catalog privileges reference](https://docs.databricks.com/aws/en/data-governance/unity-catalog/access-control/privileges-reference.md) and the permissions listed for the OpenSharing tasks described.

## <a id="data-ttl" />Configure TTL of data materialization

As a Databricks account or metastore admin, you can configure the TTL of data materialization, which determines how long a materialized result is cached. Materializations occur when a recipient queries shared dynamic views, materialized views, streaming tables, and foreign tables. By default, the TTL is eight hours. The cache itself is evicted by materialization after an additional three hours, providing extra time for existing queries to finish.

The metastore TTL applies to recipients that don't have a [recipient materialization TTL](https://docs.databricks.com/aws/en/opensharing/manage-recipients.md#recipient-materialization-ttl).

To change this value, do the following:

1. In your Databricks workspace, click ![Data icon.](https://docs.databricks.com/aws/en/images/product-icons/DataIcon.svg) **Catalog** to open Catalog Explorer.

2. At the top of the **Catalog** pane, click the ![Gear icon.](https://docs.databricks.com/aws/en/images/product-icons/GearIcon.svg) gear icon and select **OpenSharing**.

   Alternatively, in the upper-right corner, click **Share > OpenSharing**.

3. On the **Shared with me** tab, click your organization name in the upper-right corner.

4. Click the top right ![Gear icon.](https://docs.databricks.com/aws/en/images/product-icons/GearIcon.svg) gear icon.

5. For **Materialization TTL**, enter your desired TTL value.

## Allow network access to storage

If your underlying cloud storage is configured with access controls, add your recipient's network to the allowlist so they can read shared tables.

> [!TIP]
>
> Instead of manually configuring networking and firewall rules for each recipient, use [SecureConnect](https://docs.databricks.com/aws/en/opensharing/secureconnect-provider.md) to broker access through a managed proxy.

For details, see [Bucket policies for Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-policies.html) and [Serverless compute firewall configuration](https://docs.databricks.com/aws/en/security/network/serverless-network-security/serverless-firewall-config.md).

## Next steps

* Create [a share](https://docs.databricks.com/aws/en/opensharing/create-share.md)
* Share [data using Databricks-to-Databricks sharing](https://docs.databricks.com/aws/en/opensharing/share-data-databricks.md)
* Share [data using the Databricks-to-Open sharing protocol](https://docs.databricks.com/aws/en/opensharing/share-data-open.md)
* Audit [Audit and monitor data sharing](https://docs.databricks.com/aws/en/opensharing/audit-logs.md)
