An administrator must enable the Stream Sharing feature.
To share schema enabled topics, your organization must use Confluent Cloud Schema Registry. If you are using the self-managed Schema Registry, you cannot
share schema enabled topics with Stream Sharing.
To share data without a schema, you do not need Confluent Cloud Schema Registry.
To enable Stream Sharing:
Sign into the Confluent Cloud console.
From the administration menu in the upper right, select an organization to display
the Organizations page.
On the Organizations page, choose the organization you want to enable.
On the organization page, toggle Stream Sharing on.
Once Stream Sharing has been enabled for your Confluent Cloud organization, you can easily share data by
inviting users through email. To enable Stream Sharing, you must be an administrator
for the organization, environment, or cluster.
You can send one invitation to an email address. If a consumer cannot access their email invitation,
resend the invitation. You can send invitations as often as you like until the invitation has been accepted.
Once an invitation has been accepted, generating additional invitations results in an error.
Invitations contain a token for authentication. The token is automatically generated and added to the
invitation. A token is redeemable only once.
The consumer uses the token to obtain an API key and secret. The
API key and secret provide the user with read-only access to your shared topics and schemas. We restrict
access to your resources with an internal service account and role-based access control (RBAC). To restrict
access to your data, we bind the internal service account to these internal RBAC roles:
StreamShareRead - provides read access to shared topics.
Allows consumers to read topics and groups
StreamShareSchemaRegistryRead - provides read access to the Schema Registry subject.
Allows consumers to read Schema Registry subjects
Note
You can’t directly use the internal Stream Sharing RBAC service account or the associated RBAC roles.
The following examples show you how to share a stream with an email invitation.
In Cloud Console, you can share data from either Topics or the Confluent Cloud main page.
Sign in to Confluent Cloud with an administrator account.
Select the environment and cluster that contains the topic you want to share.
Click Topics in the navigation menu.
On the Topics page, take one of the following actions:
Hover over the topic you want to share and select to the right of topic information.
Select a topic and then select in the upper right.
Select a topic, select Explore Stream Lineage, select the topic node and select in the upper right.
If you are not an administrator for the cluster, environment, or organization
that contains the topic you want to share, you will not see the Share icon or button.
Select Stream shares.
Select Share a topic.
Specify Environment, Cluster, Topic, and select Next.
Enter the email of the person to which you would like to give read access of the topic. (Optional) You
can also specify one or more Schema subjects to share with this account. Enter one email address
at a time. If the email address is incorrectly formatted, you get an error.
Note
To view the status of all invitations to this topic, click Shared with.
To resend or revoke invitations, click Manage invites.
Click Invite to send the invitation. A consumer will have seven days to access the data via the link provided, before
the link expires. Once redeemed, the data share becomes active and remains so indefinitely until you
revoke access or it is deleted (deactivated) by the consumer.
Note
To use the CLI for Stream Sharing, you must have CLI v3. For more information,
see: Migrate to Confluent CLI v3
To share topics with the Confluent CLI.
Sign in to Confluent Cloud with an administrator account.
confluent login
Copy
Use the invite command to create an invite, specifying the environment and cluster that
contains the topic to share, and the topic name. You will also specify the email address
for the user you want to share the data with.
To share data with the REST API for a schema-enabled cluster that includes a schema subject, send an HTTP POST call to the https://api.confluent.cloud/cdx/v1/provider-shares
endpoint, specifying the environment, cluster, any schema subjects, and delivery method in a JSON payload.
If you share a topic from a cluster on a Confluent Cloud network, you are providing
the email recipient with details on how to connect to your private Confluent Cloud network.
You can revoke access to shared data by with the Confluent Cloud Console by revoking access,
and by deleting a share with the Confluent CLI or REST APIs.
Sign in to Confluent Cloud with an administrator account.
From the navigation menu, select Stream shares.
The Stream shares page opens.
In Data shared by you, select the data that you want to revoke access to.
Select the Shared with tab
Select the account you want to revoke and click Revoke access.
To revoke access to shared data with the Confluent CLI.
Sign in to Confluent Cloud with an administrator account.
confluentlogin
Copy
If you don’t know the identifier for the share to delete, list the shares with the list command.
confluentstream-shareprovidersharelist
Copy
Choose the share to delete and use the delete command, specifying the share
identifier.
confluentstream-sharedeletess-exabc
Copy
Your response should resemble:
Deletedprovidershare"ss-exabc".
Copy
Optionally list the shares as described in List stream shares to obtain the
identifier for the share you want to delete.
Send an HTTP DELETE message to https://api.confluent.cloud/cdx/v1/provider-shares URI, specifying the ID for the share
to be deleted. This example deletes share ss-exabc.
The request must also include an authorization header that contains the API key and secret, base-64 encoded.
For more, see Authentication.
DELETE /cdx/v1/provider-shares/ss-exabc
Copy
If the call succeeds you will receive a 204NoContent in response.
You can annotate your shared data with a description, organization name and logo, schema for the
data, and more using the Cloud Console or the REST API.
To annotate or modify shared data:
Sign in to Confluent Cloud with an administrator account.
From the navigation menu, select Stream shares.
The Stream shares page opens.
In Data shared by you, select the data that you want annotate or modify.
The shared topic details page appears.
From the shared topic details page, take one of the following actions:
To edit share content, click Edit share content
To add share content, click Add share content
Modify or add the following optional descriptive details:
Display name
Schema subjects
Organization description
Contact email
Logo
Note
Shared data includes a topic description and any tags added to the topic. You can add or
edit tags and the topic description from the topic details page.
Click Save to save your changes.
You can update or add information to a shared resource by making a PATCH call to the
https://api.confluent.cloud/cdx/v1/provider-shared-resources/ URL, specifying the
share you want to modify.