strimzi运算符kafka cluster acl未启用,类型:simple

dl5txlt9  于 2021-06-04  发布在  Kafka
关注(0)|答案(1)|浏览(331)

我们知道如何启用kafka acl属性 authorizer.class.name=kafka.security.auth.SimpleAclAuthorizer 添加到 server.properties 但是,如果kafka集群是由strimzi操作符运行的,如何启用它呢?
从strimzi文档中我了解到为了启用授权,需要启用下面的代码 kind: Kafka 不符合规格:

listeners:
      tls:
        authentication:
         type: tls

完整代码@kafka-zookeeper-apps-tls-enabled.yml
下面的代码 kind: KafkaUser ```
authentication:
type: tls
authorization:
type: simple

完全code@example-consumer-deny-deployment-authentication-tls-alias-ssl.yml
在上面 `example-consumer-deny-deployment-authentication-TLS-alias-SSL.yml` 代码acl `type: deny` 我仍然可以使用消息。
问题是我在kafka my-cluster-kafka-0pod环境变量kafka\u authorization\u type=simple中看到的上述代码即使在 `authorizer.class.name=kafka.security.auth.SimpleAclAuthorizer` 缺席 `server.properties` 注意:部署上述代码时,strimzi集群操作员吊舱的日志中没有警告/错误。
我是第一次在strimzi工作,所以请帮助我启用acl的。
xdnvmnnf

xdnvmnnf1#

您的kafka自定义资源无法启用,您需要添加“授权”部分。

listeners:
      tls:
        authentication:
          type: tls
      external:
        type: route
        authentication:
          type: tls
    authorization:
      type: simple
      superUsers:
        - CN=my-user

您可以在文档中了解更多信息:https://strimzi.io/docs/latest/full.html#assembly-kafka身份验证和授权部署配置kafka

相关问题