TaiJuWu commented on code in PR #18683:
URL: https://github.com/apache/kafka/pull/18683#discussion_r1944945130


##########
clients/src/main/java/org/apache/kafka/common/security/JaasContext.java:
##########
@@ -103,12 +104,31 @@ else if (contextModules.length != 1)
             return defaultContext(contextType, listenerContextName, 
globalContextName);
     }
 
+    @SuppressWarnings("deprecation")
     private static void throwIfLoginModuleIsNotAllowed(AppConfigurationEntry 
appConfigurationEntry) {
-        Set<String> disallowedLoginModuleList = Arrays.stream(
-                System.getProperty(DISALLOWED_LOGIN_MODULES_CONFIG, 
DISALLOWED_LOGIN_MODULES_DEFAULT).split(","))
+        String disallowedProperty = 
System.getProperty(DISALLOWED_LOGIN_MODULES_CONFIG);
+        if (disallowedProperty != null) {
+            LOG.warn("System property '{}' is deprecated and will be removed 
in a future release. Use '{}' instead.",
+                    DISALLOWED_LOGIN_MODULES_CONFIG, 
ALLOWED_LOGIN_MODULES_CONFIG);
+        }
+        String loginModuleName = 
appConfigurationEntry.getLoginModuleName().trim();
+        String allowedProperty = 
System.getProperty(ALLOWED_LOGIN_MODULES_CONFIG);
+        if (allowedProperty != null) {

Review Comment:
   Umm....
   We need to consider a case if a module in disallow and allow at same time.
   Maybe it will happen in the meantime.



-- 
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-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to