Skip to content

Commit 5804945

Browse files
Feediver1kbatuigasBenPopemicheleRP
authored
Doc 1196: Document Feature - Schema Registry Authorization (#1224)
Co-authored-by: kbatuigas <[email protected]> Co-authored-by: Ben Pope <[email protected]> Co-authored-by: Michele Cyran <[email protected]>
1 parent 7c038df commit 5804945

File tree

7 files changed

+535
-5
lines changed

7 files changed

+535
-5
lines changed

modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
**** xref:manage:schema-reg/schema-reg-api.adoc[API]
184184
**** xref:console:ui/schema-reg.adoc[Redpanda Console]
185185
**** xref:manage:kubernetes/k-schema-controller.adoc[Kubernetes]
186+
*** xref:manage:schema-reg/schema-reg-authorization.adoc[Schema Registry Authorization]
186187
*** xref:manage:schema-reg/schema-id-validation.adoc[]
187188
*** xref:console:ui/schema-reg.adoc[Manage in Redpanda Console]
188189
** xref:manage:console/index.adoc[Redpanda Console]

modules/get-started/pages/licensing/overview.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ The following table lists the enterprise features for Redpanda and how Redpanda
147147
| Manages user roles and permissions within the cluster.
148148
| Roles and ACLs associated with roles cannot be created or modified. Role deletion is allowed.
149149

150+
| xref:manage:schema-reg/schema-reg-authorization.adoc[Schema Registry Authorization]
151+
| Manages ACLs for Redpanda Schema Registry resources within the cluster.
152+
| You can no longer enable `schema_registry_enable_authorization`, nor can you create or modify schema ACLs.
153+
150154
| xref:manage:schema-reg/schema-id-validation.adoc[Server-Side Schema ID Validation]
151155
| Validates schema IDs server-side to ensure schema compatibility. With schema ID validation, records associated with unregistered schemas are detected and dropped by a broker rather than a consumer.
152156
| Topics with schema validation settings cannot be created or modified.

modules/get-started/pages/release-notes/redpanda.adoc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ Redpanda now supports the following Kafka APIs for managing SASL user credential
2626

2727
See also: xref:manage:security/authentication.adoc#sasl[Configure Authentication] and xref:manage:security/authorization/acl.adoc[]
2828

29+
== Schema Registry Authorization
30+
31+
You can now use the Enterprise-licensed feature xref:manage:schema-reg-authorization.adoc[Schema Registry Authorization] to control access to Schema Registry subjects and operations using either `rpk` or the xref:api:ROOT:schema-registry-api.adoc#get-/security/acls[Redpanda Schema Registry API] endpoints. Schema Registry Authorization offers more granular control over who can do what with your Redpanda Schema Registry resources. ACLs used for Schema Registry access also support RBAC roles.
32+
2933
== Retrieve serialized Protobuf schemas with Schema Registry API
3034

3135
Starting in version 25.2, the Schema Registry API supports retrieving serialized schemas (Protobuf only) using the `format=serialized` query parameter for the following endpoints:
@@ -53,13 +57,16 @@ HTTP Proxy previously used automatically-generated ephemeral credentials to auth
5357
If you need to maintain the current HTTP Proxy functionality while transitioning to authenticated clients, configure the following HTTP Proxy client properties in your `redpanda.yaml` configuration:
5458

5559
- xref:reference:properties/broker-properties.adoc#scram_username[`scram_username`]: Username for SASL/SCRAM authentication
56-
- xref:reference:properties/broker-properties.adoc#scram_password[`scram_password`]: Password for SASL/SCRAM authentication
60+
- xref:reference:properties/broker-properties.adoc#scram_password[`scram_password`]: Password for SASL/SCRAM authentication
5761
- xref:reference:properties/broker-properties.adoc#sasl_mechanism[`sasl_mechanism`]: SASL mechanism (typically `SCRAM-SHA-256` or `SCRAM-SHA-512`)
5862

63+
5964
== Cluster properties
6065

6166
The following cluster properties are new in this version:
6267

68+
- xref:reference:properties/cluster-properties.adoc#schema_registry_enable_authorization[`schema_registry_enable_authorization`]
69+
6370
=== Iceberg integration
6471

6572
* config_ref:iceberg_rest_catalog_base_location,true,properties/cluster-properties[`iceberg_rest_catalog_base_location`]: Specifies the base location for the Iceberg REST catalog. Required for AWS Glue Data Catalog.

modules/manage/pages/schema-reg/schema-reg-api.adoc

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,49 @@ def pretty(text):
7676
base_uri = "http://localhost:8081"
7777
----
7878

79+
== Manage Schema Registry ACLs
80+
81+
ifndef::env-cloud[]
82+
[NOTE]
83+
====
84+
include::shared:partial$enterprise-license.adoc[]
85+
====
86+
endif::[]
87+
88+
You can use ACLs to control access to Schema Registry resources. You can define fine-grained access on a global level, for example, to allow a principal to read all schemas, or on a per-subject basis, for example, to read and modify only the schemas of a specific subject.
89+
90+
See xref:manage:schema-reg/schema-reg-authorization.adoc[] for more details on Schema Registry Authorization.
91+
92+
For example, to xref:api:ROOT:pandaproxy-schema-registry.adoc#post-/security/acls[create ACLs] that allow users with the `admin` role read-only access to all registered schemas, run:
93+
94+
[,bash]
95+
----
96+
curl -X POST "http://localhost:8081/security/acls" \
97+
-H "Content-Type: application/json" \
98+
-d '[
99+
{
100+
"principal": "RedpandaRole:admin",
101+
"resource": "*",
102+
"resource_type": "REGISTRY",
103+
"pattern_type": "LITERAL",
104+
"host": "*",
105+
"operation": "DESCRIBE_CONFIGS",
106+
"permission": "ALLOW"
107+
},
108+
{
109+
"principal": "RedpandaRole:admin",
110+
"resource": "*",
111+
"resource_type": "SUBJECT",
112+
"pattern_type": "LITERAL",
113+
"host": "*",
114+
"operation": "READ",
115+
"permission": "ALLOW"
116+
}
117+
]'
118+
----
119+
120+
This creates two ACLs: one for registry-level read operations (such as reading global configuration) and another for subject-level read operations (such as reading schemas).
121+
79122
== Query supported schema formats
80123

81124
To get the supported data serialization formats in the Schema Registry, make a GET request to the `/schemas/types` endpoint:
@@ -935,7 +978,7 @@ Curl::
935978

936979
== Use READONLY mode for disaster recovery
937980

938-
The `/mode` endpoint allows you to put Schema Registry in read-only or read-write mode. A read-only Schema Registry does not accept direct writes. An active production cluster can replicate schemas to a read-only Schema Registry to keep it in sync, for example using Redpanda's https://github.com/redpanda-data/schema-migration/[Schema Migration tool^]. Users in the disaster recovery (DR) site cannot update schemas directly, so the DR cluster has an exact replica of the schemas in production. In a failover due to a disaster or outage, you can set Schema Registry to read-write mode, taking over for the failed cluster and ensuring availability.
981+
The `/mode` endpoint allows you to put Schema Registry in read-only or read-write mode. A read-only Schema Registry does not accept direct writes. An active production cluster can replicate schemas to a read-only Schema Registry to keep it in sync, for example using Redpanda's https://github.com/redpanda-data/schema-migration/[Schema Migration tool^]. Users in the disaster recovery (DR) site cannot update schemas directly, so the DR cluster has an exact replica of the schemas in production. In a failover due to a disaster or outage, you can set Schema Registry to read-write mode, taking over for the failed cluster and ensuring availability.
939982

940983
If authentication is enabled on Schema Registry, only superusers can change global and subject-level modes.
941984

0 commit comments

Comments
 (0)