spring-projects / spring-projects/spring-boot
Allow Kafka Admin Client's security protocol to be configured when using custom KafkaConnectionDetails
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 81.5k
- Forks
- 42.7k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 65
Description
Spring Boot hardcodes Kafka Admin Client security protocol to PLAINTEXT if custom KafkaConnectionDetails is used. For producer and consumer it is easy to work around using DefaultKafkaConsumerFactoryCustomizer and DefaultKafkaProducerFactoryCustomizer but AdminClient doesn't have similar customizer. Which means we cannot configure it security protocol in code.
Relevant piece of code:
The only workaround I see is replacing AdminClient bean with custom one (which is not really desirable) or am I missing something?
Spring Boot version: 3.1.4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfiguration.java around lines 208-209, and trace how custom KafkaConnectionDetails are used for the AdminClient. Review the surrounding Kafka auto-configuration and existing tests if present. Done means the AdminClient security protocol can be configured when custom connection details are used without replacing the AdminClient bean.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kafka, spring-boot
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100