strimzi / strimzi-kafka-operator

Apache Kafka® running on Kubernetes
https://strimzi.io/
Apache License 2.0
4.78k stars 1.28k forks source link

[Kafka User- How do we support any topic access in the user while creating??] ... #3127

Closed vperi1730 closed 4 years ago

vperi1730 commented 4 years ago

Hi Team,

We have created a Kafkauser and we would like to give access to any topic which the user attempts to access. Added a wildcard ".*" under name to support this, However, it didn't work, need help.

  apiVersion: kafka.strimzi.io/v1beta1
  kind: KafkaUser
  metadata:
    name: consumer-sha-user
    labels:
      strimzi.io/cluster: mm-src-cluster
  spec:
    authentication:
      type: scram-sha-512
    authorization:
      type: simple
      acls:
        - resource:
            type: topic
            name: ".*"
          operation: Read
          type: allow
        - resource:
            type: topic
            name: ".*"
          operation: Describe
          type: allow
        - resource:
            type: group
            name: sha-consumer-grp
            patternType: literal
          operation: Read
          host: "*"
scholzj commented 4 years ago

You can just use "*".

vperi1730 commented 4 years ago

My bad, it worked, thank you :)