Secure Confluent Cloud Schema Registry and Stream Catalog
Schema Registry and Stream Catalog on Confluent Cloud use API keys, role-based access control (RBAC), and OAuth for security. The following sections explain how to secure each service and which credentials each one accepts.
Although both services share the same Schema Registry endpoint on Confluent Cloud, they don’t accept the same credentials. API keys and OAuth authenticate requests, and RBAC authorizes what the authenticated principal, such as a user or service account, can do. Schema Registry accepts global API keys on private networking, whereas Stream Catalog doesn’t.
The sections that follow describe each service separately, including its API keys, RBAC, and OAuth support.
Authentication at a glance
The following table shows how to authenticate to each service. For authorization with RBAC, see Access control (RBAC) for Confluent Cloud Schema Registry and Access control (RBAC) for Stream Catalog.
Mechanism |
Schema Registry |
Stream Catalog |
Notes |
|---|---|---|---|
Resource-scoped API key |
Yes |
Yes |
Both services authenticate with the Schema Registry API key. Stream Catalog has no API key of its own and reuses the Schema Registry key. |
Global API key |
Yes, on private networking only |
No |
Schema Registry accepts a global API key on private networking only. Stream Catalog doesn’t accept global API keys and requires the resource-scoped Schema Registry key instead. |
OAuth |
Yes, with Java or Go clients |
Yes, REST API only |
Schema Registry accepts OAuth from its Java and Go clients. Stream Catalog accepts OAuth on its REST API but not on its GraphQL API. |
Security for Schema Registry
Schema Registry stores and serves the schemas in a Confluent Cloud environment, and Confluent Cloud runs one Schema Registry per environment. Securing Schema Registry involves authentication and authorization.
Authenticate to Schema Registry
Authenticate to Schema Registry with an API key or OAuth.
API keys for Schema Registry
To work with schemas on Confluent Cloud, you need an API key that grants access to Schema Registry. Confluent Cloud uses the key to authenticate you and to route requests to the Schema Registry cluster for your environment. Use either of the following API key types:
- Schema Registry API key
A resource-scoped key specific to the Schema Registry cluster. This key is distinct from the API key you use to reach the Apache Kafka® clusters in the same Confluent Cloud environment.
- Global API key
A global API key works in place of a Schema Registry-scoped key. When the same application also accesses Kafka, Apache Flink®, or other Confluent Cloud resources, a global API key lets you manage a single credential.
Note
A global API key authenticates to Schema Registry only on private networking. A public-networking Schema Registry cluster still requires a resource-scoped Schema Registry API key.
To create and manage these keys, see Create an API key for Confluent Cloud Schema Registry in Quick Start for Schema Management on Confluent Cloud. For background on managing access in Confluent Cloud, see Service Accounts on Confluent Cloud and User account types.
OAuth for Schema Registry clients
The Schema Registry Java client and Go client accept OAuth 2.0 tokens in place of an API key. OAuth tokens are short-lived, unlike a long-lived API key.
The Schema Registry Java client implements the OpenID Connect (OIDC) protocol and OAuth 2.0 and can present a token to Schema Registry. Choose one of these token sources:
A standard OAuth bearer token from a public OIDC server.
A custom token provider that you implement.
The Schema Registry Go client implements OAuth 2.0.
To configure the Java client, see Configure Schema Registry Java clients.
To configure the Go client, see Configure Schema Registry Go clients.
Security for Stream Catalog
Stream Catalog is the searchable inventory of the schemas, topics, and other data assets in a Confluent Cloud environment. Its Stream Catalog REST API and Stream Catalog GraphQL API use the same Schema Registry endpoint that serves schemas. Its security model resembles the Schema Registry model but differs in a few ways.
Authenticate to Stream Catalog
Authenticate to Stream Catalog with an API key or OAuth.
API keys for Stream Catalog
Stream Catalog has no API key of its own. Because Stream Catalog shares the Schema Registry endpoint, authenticate to Stream Catalog with the resource-scoped Schema Registry API key, the same credential you use for Schema Registry. You need an API key and secret for the Schema Registry cluster in the environment you want to work in. For details, see Create an API key for Confluent Cloud Schema Registry.
Important
Stream Catalog doesn’t accept global API keys, even on private networking. Use the resource-scoped Schema Registry API key, or use OAuth with the REST API.
OAuth for Stream Catalog
The Stream Catalog REST API accepts OAuth as an alternative to an API key. Instead of an API key and secret, pass an identity pool ID, the target Schema Registry cluster, and an OAuth bearer token. For the request format and a worked example, see OAuth for Confluent Cloud Stream Catalog REST API. For OAuth on Confluent Cloud in general, see Use OAuth/OIDC to Authenticate to Confluent Cloud.
The GraphQL API doesn’t accept OAuth. Authenticate with the resource-scoped Schema Registry API key instead.