Skip to content

MINOR: Move JaasModule into JaasUtils#22867

Merged
chia7712 merged 2 commits into
apache:trunkfrom
dino2895:minor-move-jaas-module-into-utils
Jul 19, 2026
Merged

MINOR: Move JaasModule into JaasUtils#22867
chia7712 merged 2 commits into
apache:trunkfrom
dino2895:minor-move-jaas-module-into-utils

Conversation

@dino2895

@dino2895 dino2895 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

This PR moves JaasModule into JaasUtils as a nested record,
alongside JaasSection.

It also updates KafkaClusterTestKit to reference the nested
JaasUtils.JaasModule type and removes the standalone JaasModule.java
file.

This is a code organization change with no intended behavior change.

Testing

./gradlew clean :test-common:test-common-runtime:test \
  --tests
'org.apache.kafka.common.test.junit.ClusterTestExtensionsTest.testSaslPlaintext'
\
  --tests
'org.apache.kafka.common.test.junit.ClusterTestExtensionsTest.testSaslPlaintextWithController'
\
  --tests
'org.apache.kafka.common.test.junit.ClusterTestExtensionsTest.testSaslSslWithController'

Reviewers: Chia-Ping Tsai chia7712@gmail.com

@github-actions github-actions Bot added triage PRs from the community tests Test fixes (including flaky tests) small Small PRs labels Jul 18, 2026
public class JaasUtils {
public record JaasModule(String name, boolean debug, Map<String, String> entries) {

public static JaasModule plainLoginModule(String username, String password, boolean debug, Map<String, String> validUsers) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you like JaasUtils.JaasModule.plainLoginModule? If not, could you move plainLoginModule out of JaasModule scope?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JaasUtils.plainLoginModule is clearer. I’ll move the factory method out of the nested JaasModule scope.

@dino2895

Copy link
Copy Markdown
Contributor Author

I moved plainLoginModule out of the nested JaasModule scope, so the call site now uses JaasUtils.plainLoginModule(...).

@github-actions github-actions Bot removed the triage PRs from the community label Jul 19, 2026
@chia7712
chia7712 merged commit a47f8ce into apache:trunk Jul 19, 2026
34 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved small Small PRs tests Test fixes (including flaky tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants