mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
Which Secrets of a Kafka cluster a tenant can read depends on the labels the Strimzi operators write onto them at run time, matched against the kafka ApplicationDefinition's selectors. A unit test in the shared lineage webhook package read the kafka-rd YAML and fed it hand-typed Strimzi labels, so it pinned one application's selectors against a guess of what the operator writes, from a package that should know neither. The kafka suite now creates one SCRAM user and asserts on the deployed Secrets: the user's password Secret and both CA certificates carry tenantresource=true, and no tenant-visible Secret of the cluster holds a private key. The second check goes by content rather than by name, so it covers the CA keys and the per-node key Secrets, whose names follow the node pools, and does not break when Strimzi labels another certificate Secret. The generic selector matching stays covered by the webhook package's matcher tests. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la>