Security and Governance
Authentication
Keycloak and Strimzi protect all pipeline components with platform-level authentication (OpenShift OAuth) and workload-level authentication (SCRAM-SHA-512 for Kafka clients).
KafkaUser with ACLs
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaUser
metadata:
name: cdc-consumer
labels:
strimzi.io/cluster: cdc-cluster
spec:
authentication:
type: scram-sha-512
authorization:
type: simple
acls:
- resource:
type: topic
name: cdc.public.*
patternType: prefix
operations: [Read, Describe]
host: "*"
- resource:
type: group
name: cdc-consumer-group
operations: [Read]
-
scram-sha-512— credential-based authentication managed by Strimzi -
ACLs restrict which topics and consumer groups each client can access
-
Strimzi automatically provisions Kubernetes Secrets with the credentials
Encryption
Private Endpoints
OpenShift keeps all services inside the cluster. OpenShift Routes provide external access only with edge TLS termination:
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: kafka-console
spec:
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
to:
kind: Service
name: kafka-console-console-service
OpenShift does not expose any Kafka broker port outside the cluster.
How it Works
SCRAM-SHA-512 authentication in Kafka
SCRAM (Salted Challenge Response Authentication Mechanism) works as a four-step handshake between the client and the broker:
-
The client sends its username to the broker.
-
The broker responds with a random salt and the iteration count stored for that user.
-
The client generates a salted password using PBKDF2 with SHA-512, computes a cryptographic client proof, and sends it to the broker.
-
The broker verifies the proof against stored credentials and sends a server signature that the client validates.
The password never travels in plain text. Strimzi automates the full lifecycle: when you create a KafkaUser CR, the User Operator generates SCRAM credentials, stores them in Kafka, and creates a Kubernetes Secret with the password so clients can mount it as an environment variable.
TLS: encryption in transit
-
Client → Broker: the TLS listener (port 9093) terminates TLS on the broker. Strimzi generates certificates automatically using an internal CA (
cdc-cluster-cluster-ca-cert). -
Broker → Broker: inter-broker communication uses mutual TLS (mTLS). Each broker has its own certificate signed by the cluster CA.
-
Service Mesh (ambient mTLS): Istio ambient mode adds a second layer of mTLS at L4 (ztunnel) and encrypts all TCP traffic between pods in the
kafka-cdcnamespace — including traffic to theplainlistener (9092) at the network layer.
ACLs: granular authorization
Kafka ACLs work as allow lists — Kafka denies everything by default:
-
Each ACL defines a principal (SCRAM user), a resource (topic, group, cluster), a pattern (literal or prefix), and the allowed operations.
-
The broker authorizer evaluates ACLs on every client request.
-
The
prefixpattern enables flexible rules:name: cdc, patternType: prefixauthorizes access to all topics starting withcdc(includingcdc.public.customers,cdc.public.orders). -
If no ACL matches, the request is denied with an authorization error.
Governance and Compliance
Schema Registry — validation rules
Apicurio Registry enforces schema contracts. Global rules prevent breaking changes:
{
"rules": {
"VALIDITY": "FULL",
"COMPATIBILITY": "BACKWARD"
}
}
-
VALIDITY: FULL — schemas must be syntactically valid
-
COMPATIBILITY: BACKWARD — new schemas must be readable by consumers on the previous version
Audit trail
-
Kafka retains all events for the configured retention period (7 days by default)
-
Debezium captures full before/after state for each database change
-
OpenShift audit logs track API access to the cluster
-
Schema Registry keeps version history for each schema
Browse registered schemas at Apicurio Registry.
Official Documentation
-
OpenShift Authentication and Authorization — OAuth, OIDC, and RBAC on OpenShift
-
Red Hat build of Keycloak — Identity and Access Management
-
Kafka Security with Strimzi — TLS, SCRAM-SHA-512, and ACLs on Kafka
-
Apicurio Registry — Schema Governance — Compatibility and schema validation rules
-
OpenShift Network Policies — Namespace-level network security
-
OpenShift Service Mesh — mTLS — Automatic encryption between services