我们知道启用Kafka ACL属性authorizer.class.name=kafka.security. auth.SimpleAclAuthorizer
要在server.properties
中添加,但如果Kafka集群由Strimzi运算符运行,如何启用?
从我了解到的Strimzi文档中,为了启用授权,需要为<code>类型启用以下代码:Kafka
listeners:
tls:
authentication:
type: tls
完整代码@ Kafka-zookeeper-apps-TLS-enabled . yml
还有类型的以下代码:KafkaUser
authentication:
type: tls
authorization:
type: simple
满的code@example-consumer-deny-deployment-authentication-TLS-alias-SSL.yml
在上面的示例中,消费者拒绝部署身份验证TLS别名SSL.yml
代码,尽管ACL类型:deny
仍然可以使用消息。
问题是即使与上面的代码,我看到在kafka my-claster-kafka-0 pod环境变量KAFKA_AUTHORIZATION_TYPE=简单是不存在的,即使authorizer.class.name=kafka.security. auth.SimpleAclAuthorizer
是不存在的server.properties
注意:部署上述代码时,strimzi-cluster-operator pod的日志中没有警告/错误。
我是第一次使用Strimzi,所以请帮助我启用ACL。
您的 Kafka 自定义资源未启用授权,因为授权
部分不在正确的位置。您需要像这样添加授权
部分:
listeners:
tls:
authentication:
type: tls
external:
type: route
authentication:
type: tls
authorization:
type: simple
superUsers:
- CN=my-user
您可以在文档中了解更多信息:https://strim zi . io/docs/latest/full . html # assembly-Kafka-authentic ation-and-authorization-deployment-configuration-Kafka