Hi team
I am using spring boot (v 2.4.0) with Kafka and found out that org.springframework.boot.autoconfigure.kafka.KafkaProperties.Ssl
doesn't have property (something similar to server.ssl.key-alias
) which identifies which key alias should be used in case if a keystore contains multiple private key entries.
I wonder whether that property with the corresponding logic can be added in the next versions. Thanks in advance.
Comment From: philwebb
Unfortunately there doesn't seem to be an easy way to support this. Our existing properties are mapped to values in org.apache.kafka.common.config.SslConfigs
and there doesn't seem to be one for aliases.
The only only option I can see working is to add a ssl.engine.factory.class
property and implement a custom org.apache.kafka.common.security.auth.SslEngineFactory
. That doesn't look easy since I think we'd need to hook into DefaultSslEngineFactory.createSSLContext
which is private
.
I think it's best if you raise a Kafka issue first and see if they can provide alias support.