-
Hi Please help my Kafka connect not authorized to access topics when turn set Kafka authorization : simple I dont know What kafka connect username should I use? kafka_connect.yaml apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaConnect
metadata:
name: tspace-kafka-connect
namespace: kafka
annotations:
strimzi.io/use-connector-resources: "true"
spec:
version: 2.8.0
...
config:
group.id: connect-cluster
offset.storage.topic: connect-cluster-offsets
config.storage.topic: connect-cluster-configs
status.storage.topic: connect-cluster-status create_user.yaml apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaUser
metadata:
name: connect
# labels:
# strimzi.io/cluster: connect-cluster
spec:
# ...
authorization:
type: simple
acls:
# access to offset.storage.topic
- resource:
type: topic
name: connect-cluster-offsets
patternType: literal
operation: Write
host: "*"
- resource:
type: topic
name: connect-cluster-offsets
patternType: literal
operation: Create
host: "*"
- resource:
type: topic
name: connect-cluster-offsets
patternType: literal
operation: Describe
host: "*"
- resource:
type: topic
name: connect-cluster-offsets
patternType: literal
operation: Read
host: "*"
# access to status.storage.topic
- resource:
type: topic
name: connect-cluster-status
patternType: literal
operation: Write
host: "*"
- resource:
type: topic
name: connect-cluster-status
patternType: literal
operation: Create
host: "*"
- resource:
type: topic
name: connect-cluster-status
patternType: literal
operation: Describe
host: "*"
- resource:
type: topic
name: connect-cluster-status
patternType: literal
operation: Read
host: "*"
# access to config.storage.topic
- resource:
type: topic
name: connect-cluster-configs
patternType: literal
operation: Write
host: "*"
- resource:
type: topic
name: connect-cluster-configs
patternType: literal
operation: Create
host: "*"
- resource:
type: topic
name: connect-cluster-configs
patternType: literal
operation: Describe
host: "*"
- resource:
type: topic
name: connect-cluster-configs
patternType: literal
operation: Read
host: "*"
# consumer group
- resource:
type: group
name: connect-cluster
patternType: literal
operation: Read
host: "*" Kafka connect error
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Username is the name of the |
Beta Was this translation helpful? Give feedback.
Username is the name of the
KafkaUSer
resource you used to create the user. So in the YAML above it would beconnect
. There are also examples showing authN / authZ: https://github.com/strimzi/strimzi-kafka-operator/tree/main/examples/security so you can have a look at them and re-use them.