skip to content

Cross-Cluster Security and Connectivity

Securing the replication path: mTLS and SASL between clusters, credential and ACL propagation, and private network connectivity. Interviewers ask because a replication link is a fully privileged reader of every topic.

part ofApache Kafkaoverview, primer and where to startread it →
on this pageshow

questions

6

Which Kafka ACLs does MirrorMaker 2's principal need on the source and target clusters for topic + offset replication to work?

level: middleimportance: must knowfreq 55%

basics

~20 s

On the source: Read on the mirrored topics and the consumer group, plus Describe. On the target: Write and Create on the mirrored/internal topics, plus DescribeConfigs/AlterConfigs for config sync. MM2 also needs access to its Connect internal topics on whichever cluster hosts them.

open as a page

Show how you configure MirrorMaker 2 so it uses SASL_SSL (SCRAM) to the source cluster and mTLS to the target cluster. What property prefixes make this possible?

level: middleimportance: should knowfreq 35%

basics

~10 s

Use the cluster-alias prefixes in MM2's config: set source.security.protocol=SASL_SSL with source.sasl.* for SCRAM, and target.security.protocol=SSL with target.ssl.keystore.* for the client cert. Each cluster's connection is configured independently under its alias.

open as a page

You secure a cross-cluster MM2 link with mutual TLS. How is the Kafka principal derived from the client certificate, and how do you control it with ssl.principal.mapping.rules?

level: seniorimportance: should knowfreq 45%

basics

~20 s

With mTLS the broker takes the client certificate's full Distinguished Name (DN) as the principal by default, e.g. 'User:CN=mm2,OU=...,O=...'. ssl.principal.mapping.rules lets you rewrite that DN with regex into a shorter principal like 'User:mm2' that your ACLs reference.

open as a page

When replicating between Kafka clusters in different VPCs or cloud accounts, why is the network path (PrivateLink / VPC peering) a Kafka-specific challenge, and how does advertised.listeners interact with it?

level: seniorimportance: should knowfreq 40%

basics

~20 s

Kafka clients first hit a bootstrap broker, which returns the addresses in advertised.listeners; the client then reconnects directly to each broker. Over PrivateLink/peering those advertised addresses must be resolvable and routable from the remote VPC, or the bootstrap succeeds but all follow-up connections fail.

open as a page

MM2 mirrors topics and topic configs across clusters, but it does NOT mirror ACLs or SASL credentials. As a principal engineer, how do you keep authorization and credentials consistent across clusters for failover?

level: principalimportance: should knowfreq 30%

basics

~20 s

MM2 copies topic data and (optionally) topic configs, but it does not replicate ACLs or SCRAM credentials between clusters. You propagate those out-of-band with infrastructure-as-code (e.g. Terraform/GitOps) or a control plane, so the failover cluster already grants every consumer/producer the same access under the same identity.

open as a page