Skip to content

feat: propagate sasl.client.callback.handler.class for MSK IAM producers - #306

Open
Abhayanthk wants to merge 4 commits into
microcks:mainfrom
Abhayanthk:issue-305
Open

Abhayanthk wants to merge 4 commits into
microcks:mainfrom
Abhayanthk:issue-305

Conversation

@Abhayanthk

@Abhayanthk Abhayanthk commented Sep 9, 2026

Copy link
Copy Markdown

Description

This PR propagates kafka.sasl.client.callback.handler.class so async-minion Kafka producers can properly authenticate against Amazon MSK using IAM.

Key Changes:

  • CRD & Template: Added saslClientCallbackHandlerClass (and the previously missing saslLoginCallbackHandlerClass) to the KafkaAuthenticationSpec CRD, and safely mapped them into the application.properties Qute template.
  • Backward Compatibility: Both fields are completely optional and wrapped in {#if} blocks in the template, ensuring zero impact on existing non-MSK deployments.
  • Documentation: Updated the CRD reference table in microcks-cr.md to officially document the new client callback handler.
  • Testing: Added a unit test to AsyncMinionConfigMapDependentResourceTest to verify that the Operator correctly renders the new properties into the generated ConfigMap.

Related issue(s)

Fixes #305


AI Usage Disclosure: Portions of the code and documentation in this PR were generated and refined with the assistance of an AI coding assistant. All changes have been reviewed and understood by me, and I am fully accountable for them.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

👋 @Abhayanthk

Welcome to the Microcks community! 💖

Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly.

Hope you have a great time there!

@Abhayanthk

Abhayanthk commented Sep 9, 2026

Copy link
Copy Markdown
Author

What I found:

  • I looked at the upstream fix #2232,
    and I see they fixed the worker by telling the Kafka producers to use the client IAM class so they could successfully authenticate and write to Amazon MSK.
  • But in our Operator repo, it looks like we never fully added IAM support to the CRD.
  • Because both the client and login classes are missing from KafkaAuthenticationSpec.java, the Operator just ignores them when you try to use them!

What I'm going to do:

  • Add both of those missing instructions to the CRD class and the application.properties template, so the Operator can finally pass them down to the worker.

Backward compatibility:

This change is fully backward-compatible. Both callback handler fields are completely optional in the CRD. In the Qute template, they are wrapped in standard {#if} blocks. If a user doesn't provide these classes, the Operator simply skips those lines, meaning existing deployments will see zero changes to their application.properties.

This is my first contribution here and I'm still learning the codebase, so if I've put something in the wrong place or missed an existing pattern for SASL config, I'd appreciate any guidance.

@Abhayanthk

Copy link
Copy Markdown
Author

While working on this, I noticed saslClientCallbackHandlerClass was missing from the microcks-cr.md table, even though saslLoginCallbackHandlerClass was already listed. So I added it in a second commit to keep the docs in sync.

I only added the new row and matched the existing style/wording — I didn't touch or rewrite any of the existing documentation. Happy to change the phrasing if you'd prefer it worded differently.

Signed-off-by: Abhayanth K <abhayanth2006@gmail.com>
- Add saslClientCallbackHandlerClass and saslLoginCallbackHandlerClass to KafkaAuthenticationSpec.
- Map these properties to the application.properties Qute template for async-minion.
- Wrap properties in optional blocks to maintain backward compatibility.

Fixes microcks#305

Signed-off-by: Abhayanth K <abhayanth2006@gmail.com>
- Add saslClientCallbackHandlerClass to the CRD documentation table

Signed-off-by: Abhayanth K <abhayanth2006@gmail.com>
@Abhayanthk

Copy link
Copy Markdown
Author

Hi again! I noticed the upstream PR (microcks/microcks#2232) included a unit test for the mapping, so I've added the equivalent coverage here.

I added a new test method to AsyncMinionConfigMapDependentResourceTest that verifies the Operator renders the new saslClientCallbackHandlerClass property into the application.properties ConfigMap.

This should round out the change — happy to adjust if you'd like the test structured differently.

Signed-off-by: Abhayanth K <abhayanth2006@gmail.com>
@Abhayanthk

Copy link
Copy Markdown
Author

Hi @lbroudoux 👋 — this is ready for review whenever you get a chance. I’ve added the full thought process, the fix, and my reasoning in the comments above, so you can read through it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

async-minion: propagate kafka.sasl.client.callback.handler.class for MSK IAM producers

1 participant