-
Hi, I am trying to do a basic Strimzi Kafka TLS setup on my local machine single node microk8s. The issue I see that compared to automatic strimzi generation of CA and keys is that there is ca.key created which I do not want to use in a normal environment. So my question is if there is a possibility to just use the CA public key and user keys signed by that CA private key, without explicitly including the CA private key. The current configuration I use is based on the quickstart example: apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaNodePool
metadata:
name: dual-role
labels:
strimzi.io/cluster: my-cluster
spec:
replicas: 1
roles:
- controller
- broker
storage:
type: ephemeral
---
apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
name: my-cluster
annotations:
strimzi.io/node-pools: enabled
strimzi.io/kraft: enabled
spec:
kafka:
version: 3.7.0
metadataVersion: 3.7-IV4
authorization:
type: simple
listeners:
- name: plain
port: 9092
type: internal
tls: false
- name: tls
port: 9093
type: internal
tls: true
authentication:
type: tls
- name: external
port: 9094
tls: true
type: nodeport
authentication:
type: tls
configuration:
bootstrap:
nodePort: 32100
brokers:
- broker: 0
nodePort: 32000
brokerCertChainAndKey:
secretName: kafka-broker-cert
certificate: broker.crt
key: broker.key
config:
offsets.topic.replication.factor: 1
transaction.state.log.replication.factor: 1
transaction.state.log.min.isr: 1
default.replication.factor: 1
min.insync.replicas: 1
entityOperator:
topicOperator: {}
userOperator: {} And the user apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaUser
metadata:
name: my-user
labels:
strimzi.io/cluster: my-cluster
spec:
authentication:
type: tls-external
authorization:
type: simple
acls:
# Example consumer Acls for topic my-topic using consumer group my-group
- resource:
type: topic
name: my-topic
patternType: literal
operations:
- Describe
- Read
host: "*"
- resource:
type: group
name: my-group
patternType: literal
operations:
- Read
host: "*"
# Example Producer Acls for topic my-topic
- resource:
type: topic
name: my-topic
patternType: literal
operations:
- Create
- Describe
- Write
host: "*" My understand of SSL and strimzi is still limited, so sorry for any incorrectness. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
I'm not sure what exactly is the question - I do not think it is clear from what you wrote. I would suggest to read the docs. Ot covers the Strimzi CA, bringing custom CAs, as well as using custom listener (server) certificates for a particular listener. |
Beta Was this translation helpful? Give feedback.
If you want to use it for clients, than you don't want to generate the clientsCa => so it is the other way around?
Actually, it is the CA public key that establishes the trust. So you do not need to provide the user certs in any form. As long as they are signed by the Clients CA (the public key you provide), the will be able to connect (but if you provide only the public key, you have to use the
type: tls-external
in theKafkaUSer
resources and generate the keys on your own obviously).