-
Notifications
You must be signed in to change notification settings - Fork 50
docs (k8s): add Schema Registry ACLs for Redpanda Operator #1619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
JakeSCahill
merged 17 commits into
redpanda-data:v-WIP/26.1
from
david-yu:docs/schema-registry-acls-operator
Mar 31, 2026
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
85a8e11
docs: add Schema Registry ACLs page for Redpanda Operator
david-yu 568e561
fix: lowercase kubectl in prerequisites
david-yu 88999f6
fix: move example descriptions to paragraphs after YAML blocks
david-yu 363bffe
fix: remove comments from user-crds authz-only example
david-yu 37b6e75
fix: remove comments from role-crds authorization example
david-yu 03a06fe
Update modules/manage/pages/kubernetes/security/authentication/k-sche…
david-yu 7d1130d
Update modules/manage/pages/kubernetes/security/authentication/k-sche…
david-yu 59e4e52
Remove redundant Supported operations subsection
david-yu bc20f33
Add Prometheus ServiceMonitor docs for Console on Kubernetes
david-yu 6551841
Style edits for Schema Registry ACLs page
micheleRP 1b17f54
Add group-crds.feature to fix build error in Schema Registry ACLs page
david-yu ac05be1
Add subject ACLs to user and role feature file examples
david-yu 0f490ad
Add intro sentence to Common use cases section
david-yu 3d25418
Move description text above code blocks in common use cases
david-yu c91c26b
Merge branch 'main' into docs/schema-registry-acls-operator
david-yu d507904
Move Common use cases examples to feature file and revert deploy.adoc
david-yu 9b32133
Merge branch 'v-WIP/26.1' into docs/schema-registry-acls-operator
JakeSCahill File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| @cluster:sasl @variant:vectorized | ||
| Feature: Group CRDs | ||
| Background: Cluster available | ||
| Given cluster "sasl" is available | ||
|
|
||
| @skip:gke @skip:aks @skip:eks | ||
| Scenario: Manage group ACLs | ||
| When I apply Kubernetes manifest: | ||
| """ | ||
| # tag::manage-group-acls[] | ||
| --- | ||
| apiVersion: cluster.redpanda.com/v1alpha2 | ||
| kind: Group | ||
| metadata: | ||
| name: engineering | ||
| spec: | ||
| cluster: | ||
| clusterRef: | ||
| name: sasl | ||
| authorization: | ||
| acls: | ||
| - type: allow | ||
| resource: | ||
| type: topic | ||
| name: team- | ||
| patternType: prefixed | ||
| operations: [Read, Describe] | ||
| - type: allow | ||
| resource: | ||
| type: subject | ||
| name: team- | ||
| patternType: prefixed | ||
| operations: [Read, Describe] | ||
| # end::manage-group-acls[] | ||
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133 changes: 133 additions & 0 deletions
133
...les/manage/pages/kubernetes/security/authentication/k-schema-registry-acls.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,133 @@ | ||
| = Manage Schema Registry ACLs with the Redpanda Operator | ||
| :description: Manage Schema Registry ACLs declaratively in Kubernetes using User, RedpandaRole, and Group custom resources with the Redpanda Operator. | ||
| :page-categories: Management, Security | ||
| :page-topic-type: how-to | ||
| :personas: platform_operator | ||
| :env-kubernetes: true | ||
|
|
||
| With the Redpanda Operator, you can declaratively manage Schema Registry ACLs alongside standard Kafka ACLs using the existing xref:reference:k-crd.adoc#k8s-api-github-com-redpanda-data-redpanda-operator-operator-api-redpanda-v1alpha2-user[User], xref:reference:k-crd.adoc#k8s-api-github-com-redpanda-data-redpanda-operator-operator-api-redpanda-v1alpha2-role[RedpandaRole], and Group custom resources. This allows you to control which users and roles perform specific operations within Schema Registry. | ||
|
|
||
| For Schema Registry Authorization concepts and the available operations, see xref:manage:schema-reg/schema-reg-authorization.adoc[]. | ||
|
|
||
| == Prerequisites | ||
|
|
||
| You must have the following: | ||
|
|
||
| * *kubectl*: The https://kubernetes.io/docs/tasks/tools/#kubectl[kubectl^] command-line tool, installed and configured to communicate with your cluster. | ||
| * *Redpanda Operator v25.3 or later*: See xref:deploy:deployment-option/self-hosted/kubernetes/k-production-deployment.adoc[]. | ||
| * *Redpanda cluster with SASL enabled*: See xref:manage:kubernetes/security/authentication/k-authentication.adoc#enable[Enable SASL authentication]. | ||
| * *Schema Registry Authorization enabled*: See xref:manage:schema-reg/schema-reg-authorization.adoc#enable-schema-registry-authorization[Enable Schema Registry Authorization]. | ||
|
|
||
| == Schema Registry ACL resource types | ||
|
|
||
| The Redpanda Operator supports two Schema Registry ACL resource types in addition to the standard Kafka ACL resource types (`topic`, `group`, `cluster`, `transactionalId`): | ||
|
|
||
| * `subject`: Controls ACL access for specific Schema Registry subjects. Specify the subject name in `resource.name`. Supports both `literal` and `prefixed` pattern types. | ||
| * `registry`: Controls access to global Schema Registry operations. The `registry` resource type does not require a `name` because it applies to all global registry operations. | ||
|
|
||
| For a full list of supported operations by resource type, see xref:manage:schema-reg/schema-reg-authorization.adoc#supported-operations[Supported operations]. | ||
|
|
||
| == Define Schema Registry ACLs in a User resource | ||
|
|
||
| The xref:manage:kubernetes/security/authentication/k-user-controller.adoc[User resource] supports Schema Registry ACLs alongside standard Kafka ACLs. | ||
|
|
||
| .`user-with-sr-acls.yaml` | ||
| [,yaml,indent=0] | ||
| ---- | ||
| include::manage:example$kubernetes/user-crds.feature[tags=manage-authz-only-manifest,indent=0] | ||
| ---- | ||
|
|
||
| In this example, the User resource creates ACLs for an existing user called `travis` in the cluster called `sasl`. The first ACL rule grants read access to all topics whose names start with `some-topic` using a `prefixed` pattern type. The second ACL rule grants read access to Schema Registry subjects matching the same prefix. | ||
|
|
||
| When both Kafka and Schema Registry ACLs are defined in the same User resource, the operator syncs them independently. Kafka ACLs are applied through the Kafka API and Schema Registry ACLs are applied through the Schema Registry API. | ||
|
|
||
| == Define Schema Registry ACLs in a RedpandaRole resource | ||
|
|
||
| The xref:manage:kubernetes/security/authorization/k-role-controller.adoc[RedpandaRole resource] groups Schema Registry ACLs into reusable permission sets for multiple users. | ||
|
|
||
| .`role-with-sr-acls.yaml` | ||
| [,yaml,indent=0] | ||
| ---- | ||
| include::manage:example$kubernetes/role-crds.feature[tags=manage-roles-with-authorization,indent=0] | ||
david-yu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ---- | ||
|
|
||
| In this example, a RedpandaRole called `read-only-role` is created in the cluster called `sasl`. The user `charlie` is assigned as a principal. The authorization rules grant `Read` and `Describe` access to all topics with names starting with `public-` using a `prefixed` pattern type, and the same `Read` and `Describe` access to Schema Registry subjects matching the same prefix. | ||
|
|
||
| == Define Schema Registry ACLs in a Group resource | ||
|
|
||
| The Group resource supports Schema Registry ACLs for OIDC groups. | ||
|
|
||
| .`group-with-sr-acls.yaml` | ||
| [,yaml,indent=0] | ||
| ---- | ||
| include::manage:example$kubernetes/group-crds.feature[tags=manage-group-acls,indent=0] | ||
david-yu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ---- | ||
|
|
||
| In this example, ACLs are created for an OIDC group called `engineering` in the cluster called `sasl`. The authorization rules grant `Read` and `Describe` access to all topics with names starting with `team-` using a `prefixed` pattern type, and the same `Read` and `Describe` access to Schema Registry subjects matching the same prefix. | ||
|
|
||
| == Common use cases | ||
|
|
||
david-yu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| The following examples show common patterns for configuring Schema Registry ACLs using the User resource. | ||
|
|
||
| === Grant a user read access to a subject | ||
|
|
||
| This example gives a consumer application read access to the `orders` topic and its associated Schema Registry subject `orders-value`. Both ACLs use a `literal` pattern type to match exact resource names. | ||
|
|
||
| .`consumer-app.yaml` | ||
| [,yaml,indent=0] | ||
| ---- | ||
| include::manage:example$kubernetes/user-crds.feature[tags=grant-user-read-access,indent=0] | ||
| ---- | ||
|
|
||
| === Grant a producer write access using prefix patterns | ||
|
|
||
| This example creates a user called `producer-app` with both authentication credentials and authorization rules. The ACLs grant `Write` and `Describe` access to all topics and Schema Registry subjects whose names start with `events-` using a `prefixed` pattern type. This allows the producer to register new schema versions for any subject matching the prefix. | ||
|
|
||
| .`producer-app.yaml` | ||
| [,yaml,indent=0] | ||
| ---- | ||
| include::manage:example$kubernetes/user-crds.feature[tags=grant-producer-write-access,indent=0] | ||
| ---- | ||
|
|
||
| === Grant global Schema Registry access | ||
|
|
||
| This example gives a schema administrator full access to all Schema Registry operations. The first ACL rule uses the `registry` resource type, which applies to global operations such as getting or setting the global compatibility level. The `registry` resource type does not require a `name` field. The second ACL rule uses a `subject` resource type with an empty name and `prefixed` pattern type to match all subjects. | ||
|
|
||
| .`schema-admin.yaml` | ||
| [,yaml,indent=0] | ||
| ---- | ||
| include::manage:example$kubernetes/user-crds.feature[tags=grant-global-sr-access,indent=0] | ||
| ---- | ||
|
|
||
| == Partial sync behavior | ||
|
|
||
| When a resource includes both Kafka and Schema Registry ACLs, the operator syncs them independently. If the Kafka ACLs sync successfully but the Schema Registry ACLs fail (for example, if Schema Registry Authorization is not enabled), the resource enters a `PartiallySynced` state. Check the resource status conditions for details: | ||
|
|
||
| [,bash] | ||
| ---- | ||
| kubectl get user <user-name> -o jsonpath='{.status.conditions}' --namespace <namespace> | ||
| ---- | ||
|
|
||
| == Deploy and verify | ||
|
|
||
| To deploy a resource with Schema Registry ACLs, apply the manifest to the same namespace as your Redpanda cluster: | ||
|
|
||
| [,bash] | ||
| ---- | ||
| kubectl apply -f <manifest-filename>.yaml --namespace <namespace> | ||
| ---- | ||
|
|
||
| After deploying, verify that the Redpanda Operator reconciled the resource: | ||
|
|
||
| [,bash] | ||
| ---- | ||
| kubectl logs -l app.kubernetes.io/name=operator -c manager --namespace <namespace> | ||
| ---- | ||
|
|
||
| == Next steps | ||
|
|
||
| * xref:manage:schema-reg/schema-reg-authorization.adoc[] | ||
| * xref:manage:kubernetes/security/authentication/k-user-controller.adoc[] | ||
| * xref:manage:kubernetes/security/authorization/k-role-controller.adoc[] | ||
| * xref:reference:k-crd.adoc#k8s-api-github-com-redpanda-data-redpanda-operator-operator-api-redpanda-v1alpha2-aclresourcespec[ACLResourceSpec] | ||
| * xref:manage:security/authorization/acl.adoc[] | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.