Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Kafka Admin Client's security protocol to be configured when using custom KafkaConnectionDetails #38342

Open
Tracked by #41137
Exidex opened this issue Nov 13, 2023 · 1 comment
Labels
status: pending-design-work Needs design work before any code can be developed theme: containers Testcontainers, Docker Compose and Buildpack features type: enhancement A general enhancement

Comments

@Exidex
Copy link

Exidex commented Nov 13, 2023

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:

if (!(connectionDetails instanceof PropertiesKafkaConnectionDetails)) {
properties.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, "PLAINTEXT");

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

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 13, 2023
@philwebb philwebb added the for: team-attention An issue we'd like other members of the team to review label Nov 13, 2023
@wilkinsona wilkinsona added for: team-meeting An issue we'd like to discuss as a team to make progress and removed for: team-attention An issue we'd like other members of the team to review labels Jan 3, 2024
@LukasHeimann
Copy link

I'm also interested in having a KafkaAdminCustomizer to modify the default bean, similar to how there already is a customizer for the DefaultKafkaProducerFactory and the DefaultKafkaConsumerFactory (see #12003 and d16074d)

@philwebb philwebb added status: pending-design-work Needs design work before any code can be developed theme: containers Testcontainers, Docker Compose and Buildpack features labels Feb 22, 2024
@philwebb philwebb removed the for: team-meeting An issue we'd like to discuss as a team to make progress label Mar 4, 2024
@wilkinsona wilkinsona changed the title Spring Boot hardcodes Kafka Admin Client security protocol to PLAINTEXT if custom KafkaConnectionDetails is used Allow Kafka Admin Client's security protocol to be configured when using custom KafkaConnectionDetails Jun 4, 2024
@wilkinsona wilkinsona added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending-design-work Needs design work before any code can be developed theme: containers Testcontainers, Docker Compose and Buildpack features type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

5 participants