Hi All,

I am trying to set up encryption on a self-managed Kafka cluster running
Kafka 3.0, jdk-11, using certificates signed with an internal root CA in
pem format. I am running into the following error when I try to restart
Kafka.




*org.apache.kafka.common.errors.InvalidConfigurationException: Invalid PEM
keystore configsCaused by: java.io.IOException: overrun, bytes = 1196at
javax.crypto.EncryptedPrivateKeyInfo.<init>(EncryptedPrivateKeyInfo.java:98)
~[?:?]at
org.apache.kafka.common.security.ssl.DefaultSslEngineFactory$PemStore.privateKey(DefaultSslEngineFactory.java:512)
~[kafka-clients-3.0.0.jar:?]*


The kafka config file looks as follows. Any pointers on how to resolve the
error would be greatly appreciated.

# TODO: update protocol after first full-deployment of a new Kafka version
inter.broker.protocol.version=2.8
listener.security.protocol.map
=PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL

listeners=PLAINTEXT://:9092,SSL://:9093
advertised.listeners=PLAINTEXT://:9092,SSL://
kafka-beta.internal-hostname.com:9093

security.protocol=SSL
ssl.keystore.type=PEM
ssl.truststore.type=PEM

ssl.keystore.key=-----BEGIN PRIVATE KEY-----\nMsBasd\n-----END PRIVATE
KEY-----
ssl.key.password=null

ssl.keystore.certificate.chain=-----BEGIN
CERTIFICATE-----\nMkydTbn\n-----END CERTIFICATE-----

ssl.truststore.certificates=-----BEGIN CERTIFICATE-----\nMPMd=\n-----END
CERTIFICATE-----

Reply via email to