Manage access ΒΆ
This guide will show you how to manage access to your topic.
Prerequisites ΒΆ
- An existing topic to manage access to.
Alternative 1 - Nais CLI ΒΆ
See https://nais.io/log/#2026-01-29-nais-cli-kafka-acls.
Alternative 2 - Manually add ACLs to your topic ΒΆ
Example of various ACLs:
.nais/topic.yaml
yaml
...
apiVersion: nais.io/v1alpha1
kind: Topic
...
spec:
acl:
- team: <ANOTHER-TEAM>
application: <CONSUMER-APP>
access: read
- team: <ANOTHER-TEAM>
application: <CONSUMER-APP2>
access: read
- team: <ANOTHER-TEAM>
application: <PRODUCER-APP>
access: write
- team: <PRODUCER-TEAM>
application: <PRODUCER-APP>
access: write
- team: <TRUSTED-TEAM>
application: *
access: read # ALL applications from this trusted-team has read
- team: *
application: <APPLICATION-NAME>
access: read # Applications named <APPLICATION-NAME> from ANY team has read
- team: <MY-TEAM>
application: rapid-*
access: readwrite # ALL applications from <MY-TEAM> with names starting with `rapid-` has readwrite access
...Apply the Topic resource ΒΆ
Add the file to your application repository to deploy with Nais github action.
bash
kubectl apply -f ./nais/topic.yaml --namespace=<MY-TEAM> --context=<MY-ENV>