canonical / kafka-operator

Kafka VM operator
Apache License 2.0
6 stars 14 forks source link

[DPE-5208] - fix: secure written znodes #231

Closed marcoppenheimer closed 2 months ago

marcoppenheimer commented 2 months ago

Changes Made

fix: set ACLs on written zNodes

marcoppenheimer commented 2 months ago

LGTM! Should we just have an integration tests or that would be too much of an hassle?

I think our current int tests basically cover the case of 'does Kafka work with this setting?'. If we look at the ACLs Kafka sets, it's pretty clever. By default, a zNode written by Kafka will have rwcda for the SASL Kafka user, and r for world (aka everyone).

BUT, for zNodes that Kafka thinks are 'secure', it will remove the world read permission.

After a quick check, it appears that it would be:

/kafka/config/brokers
/kafka/config/users/*

There may be others, but I grabbed that from a default ZK + Kafka deploy.