You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "dino2895 (via GitHub)" <gi...@apache.org> on 2026/07/18 22:44:14 UTC
[PR] MINOR: Move JaasModule into JaasUtils [kafka]
dino2895 opened a new pull request, #22867:
URL: https://github.com/apache/kafka/pull/22867
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
```bash
./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'
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Move JaasModule into JaasUtils [kafka]
Posted by "dino2895 (via GitHub)" <gi...@apache.org>.
dino2895 commented on code in PR #22867:
URL: https://github.com/apache/kafka/pull/22867#discussion_r3609354068
##########
test-common/test-common-runtime/src/main/java/org/apache/kafka/common/test/JaasUtils.java:
##########
@@ -21,13 +21,39 @@
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import javax.security.auth.login.Configuration;
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) {
Review Comment:
```JaasUtils.plainLoginModule``` is clearer. I’ll move the factory method out of the nested JaasModule scope.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Move JaasModule into JaasUtils [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #22867:
URL: https://github.com/apache/kafka/pull/22867#discussion_r3609342551
##########
test-common/test-common-runtime/src/main/java/org/apache/kafka/common/test/JaasUtils.java:
##########
@@ -21,13 +21,39 @@
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import javax.security.auth.login.Configuration;
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) {
Review Comment:
Do you like `JaasUtils.JaasModule.plainLoginModule`? If not, could you move `plainLoginModule` out of `JaasModule` scope?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Move JaasModule into JaasUtils [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #22867:
URL: https://github.com/apache/kafka/pull/22867
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Move JaasModule into JaasUtils [kafka]
Posted by "dino2895 (via GitHub)" <gi...@apache.org>.
dino2895 commented on PR #22867:
URL: https://github.com/apache/kafka/pull/22867#issuecomment-5013272354
I moved `plainLoginModule` out of the nested `JaasModule` scope, so the call site now uses `JaasUtils.plainLoginModule(...)`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org