Schema Registry handles schema management for Avro, JSON Schema, and Protobuf, but unless you secure both the REST read/write surface and the internal _schemas Kafka topic, risks of tampering, leakage, and compatibility breakage remain.
This article organizes authentication (REST), authorization (Subject-level / RBAC), and Kafka ACLs (_schemas) along a single end-to-end thread. It also highlights the config keys and behaviors most often tested on CCDAK/CCAAK, viewed through an operational lens.
Schema Registry's attack surface splits broadly into two planes: the REST layer (client → Schema Registry) and the Kafka layer (Schema Registry → _schemas topic). The former is protected via an authentication mechanism (mTLS, Basic, OAuth, etc.) plus TLS; the latter is controlled via Kafka-side authentication (SASL/SSL, etc.) and ACLs. On Confluent Platform, you can additionally apply RBAC for Subject-level authorization.
Typical threats include eavesdropping (no TLS), impersonation (weak authentication), excessive privileges (weak authorization/ACLs), and compatibility breakage (unauthorized deletes/overwrites). Defending against them requires combining controls on both the REST plane and the Kafka plane.
Schema Registry security boundaries
The first line of defense on the REST plane is TLS (HTTPS). On top of that, client authentication is typically chosen between mTLS and Basic (backed by LDAP or a file store). On Confluent Cloud, configurations using an API Key/Secret (HTTP auth header) or OAuth/OIDC are also common.
In practice, the producer/consumer SerDe connects directly to Schema Registry, which makes it easy to confuse the security settings aimed at the Kafka broker with the schema.registry.* settings aimed at Schema Registry. They are two separate things, and exams frequently test this distinction.
Typical client (producer/consumer) configuration example
# Kafka クライアントのプロパティ(Serializer/Deserializer が Schema Registry へ接続)
schema.registry.url=https://sr.example.local:8081
# Basic 認証(TLS 上で使用)。試験頻出キー:
basic.auth.credentials.source=USER_INFO
schema.registry.basic.auth.user.info=appuser:appsecret
# mTLS/サーバ検証。クライアント側トラストストア(自己署名 CA や社内 CA を含む)
schema.registry.ssl.truststore.location=/etc/security/truststore.jks
schema.registry.ssl.truststore.password=changeit
# クライアント証明書を要求される場合(相互 TLS)
schema.registry.ssl.keystore.location=/etc/security/keystore.jks
schema.registry.ssl.keystore.password=changeit
# 注意: これらは Kafka ブローカー接続用の ssl.* / sasl.* とは別物。両方を設定する必要があるケースが多い。Schema Registry controls operations such as READ / WRITE / DELETE on a per-Subject basis. On Confluent Platform, RBAC backed by MDS is available, granting users or service accounts roles on Subject resources. This makes fine-grained control possible — for example, only specific CI/CD roles can update production schemas, while read access is granted more broadly.
On the OSS (self-managed) side, a built-in or pluggable authorizer can be used to enforce per-Subject control. In either case, the principal established by REST authentication is what feeds the authorization decision, and disallowed operations are rejected with 403 Forbidden (whereas 401 means unauthenticated).
| Mechanism | Scope | Strengths | Caveats |
|---|---|---|---|
| Confluent RBAC (MDS) | Roles at the Subject/Cluster level (ResourceOwner, etc.) | Centrally managed and easy to audit. Least privilege can be expressed as roles. | Assumes you operate MDS and role bindings. Role design across multiple environments is the key. |
| Built-in / pluggable authorizer | Per-Subject (owner model / custom extensions) | Can be implemented flexibly even outside Confluent environments. | Implementation and operational cost tend to grow. Alignment with standardization and auditing is a challenge. |
| Front-end reverse proxy (path-based control) | Per-endpoint (/subjects/*, etc.) | Simple to deploy with a straightforward setup. | Fine-grained Subject-level control is hard to express; workarounds are required. |
Schema Registry itself is a Kafka client that reads and writes the _schemas topic. When broker-side authentication (SASL/SSL, etc.) is enabled, grant the Schema Registry service account least-privilege ACLs.
_schemas is an internal topic that is subject to compaction (cleanup.policy=compact). In environments where topic auto-creation is disabled, pre-create it with appropriate settings and ensure only Schema Registry can read from and write to it.
In production, always retain Schema Registry's REST access logs, authentication/authorization logs, and schema change history (who changed what, when). When using RBAC, auditing changes to role bindings is equally important.
Integrate with CI/CD and enforce schema compatibility checks (backward, forward, full) in the pipeline to prevent breaking changes from manual updates. Certification exams likewise test designs that enforce compatibility and permissions through operational flow.
Be crystal clear on the terminology and which layer applies (REST authentication vs. Kafka ACLs). The fact that the Serializer's schema.registry.* and the Kafka connection's sasl./ssl. are separate systems is asked frequently.
Watch for trap answer choices around HTTP status code semantics, RBAC granularity, and least-privilege on _schemas.
CCDAK / CCAAK
問題 1
You want to secure Schema Registry in production. Producers and consumers connect to Schema Registry via Basic authentication, and Schema Registry accesses _schemas on the Kafka brokers with least privilege. Which combination of settings is appropriate?
正解: A
Schema Registry's REST authentication must be configured separately from Kafka broker authentication. For Basic auth, the canonical setup is basic.auth.credentials.source=USER_INFO together with schema.registry.basic.auth.user.info on the Serializer side. When Schema Registry accesses Kafka, grant the minimum required permissions: READ/WRITE/DESCRIBE on _schemas. B is wrong because the config systems are different, C is unacceptable because it uses plain HTTP, and D violates the principle of least privilege.
If I enable SASL/SSL on the Kafka brokers, do I still need REST authentication for Schema Registry?
Yes, you still need it. The REST layer (client to Schema Registry) and the Kafka layer (Schema Registry to brokers) are separate planes that must be secured independently. The schema.registry.* settings used by the Serializer are completely independent from the sasl./ssl. settings used for the Kafka connection.
How is Basic authentication handled when using Confluent Cloud?
On Confluent Cloud, HTTP authentication with an API Key/Secret is the standard approach for Schema Registry. On the client side, set basic.auth.credentials.source=USER_INFO and schema.registry.basic.auth.user.info=key:secret. HTTPS should be required as well.
When should I use SASL_INHERIT?
Use it when you want the Kafka client's SASL credentials to be inherited as Basic auth credentials for Schema Registry. In practice, however, explicitly separating credentials via USER_INFO is often easier to operate, both for troubleshooting and for audit traceability.
Practice with certification-focused question sets
無料で問題を解いてみるNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Kafka Topics & Partitions: Distribution Fundamentals (2026)
How Kafka topics and partitions enable scale — ordering guar...
CCDAK Exam Guide: Confluent Certified Developer (2026)
Complete prep for the CCDAK exam — Producer/Consumer API, St...
CCAAK Exam Guide: Confluent Certified Administrator (2026)
Pass the CCAAK exam — cluster management, partitions, securi...
Kafka Replicas & ISR: Fault Tolerance Explained (2026)
Replica placement, in-sync replicas (ISR), leader election. ...
Kafka Offsets: Commit Modes & Consumer Position (2026)
Offset semantics — auto vs. manual commit, __consumer_offset...