github-actions[bot] commented on code in PR #62159:
URL: https://github.com/apache/doris/pull/62159#discussion_r3062103725


##########
fe/fe-core/src/main/java/org/apache/doris/common/util/ClassLoaderUtils.java:
##########
@@ -87,38 +106,45 @@ public class ClassLoaderUtils {
      */
     public static <T> List<T> loadServicesFromDirectory(Class<T> serviceClass) 
throws IOException {
         String pluginDirKey = serviceClass.getSimpleName();
-        String pluginDir = pluginDirMapping.get(pluginDirKey);
-        if (pluginDir == null) {
+        Supplier<String> pluginDirSupplier = 
pluginDirMapping.get(pluginDirKey);
+        if (pluginDirSupplier == null) {
             throw new RuntimeException("No mapping found for plugin directory 
key: " + pluginDirKey);
         }
-        File jarDir = new File(pluginDir);
-        // If the directory does not exist, return an empty list.
-        if (!jarDir.exists()) {
-            return new ArrayList<>();
-        }
-        if (!jarDir.isDirectory()) {
-            throw new IOException("The specified path is not a directory: " + 
pluginDir);
-        }
-
-        File[] jarFiles = jarDir.listFiles((dir, name) -> 
name.endsWith(".jar"));
-        if (jarFiles == null || jarFiles.length == 0) {
-            LOG.info("No JAR files found in the plugin directory: {}", 
pluginDir);
+        List<Path> pluginRoots = 
parsePluginRootDirectories(pluginDirSupplier.get());
+        if (pluginRoots.isEmpty()) {
             return new ArrayList<>();
         }
 
         List<T> services = new ArrayList<>();
-        for (File jarFile : jarFiles) {
-            URL[] jarURLs;
-            jarURLs = new URL[]{jarFile.toURI().toURL()};
+        for (Path pluginRoot : pluginRoots) {
+            File jarDir = pluginRoot.toFile();
+            // If the directory does not exist, skip it.
+            if (!jarDir.exists()) {
+                continue;
+            }
+            if (!jarDir.isDirectory()) {
+                throw new IOException("The specified path is not a directory: 
" + pluginRoot);
+            }
+
+            File[] jarFiles = jarDir.listFiles((dir, name) -> 
name.endsWith(".jar"));

Review Comment:
   This helper is still used by `AuthenticatorManager.loadCustomerFactories()` 
and `AccessControllerManager.loadAccessControllerPlugins()`, but it still 
treats each configured entry as a flat jar directory. After this PR, the same 
configs are documented as plugin *roots*, and the newer 
`AuthenticationPluginManager` path now scans `<root>/<plugin>/...`. That means 
a deployment like 
`authentication_plugins_dir=/opt/doris/plugins/authentication` with jars under 
`/opt/doris/plugins/authentication/my-auth/my-auth.jar` will work for 
integration-based loading but fail for legacy 
`authentication_type=<plugin_name>` and authorization factory loading. The 
config semantic change needs to be applied consistently to these legacy callers 
too, or the docs/config text here stays misleading and introduces a real 
loading regression.



##########
fe/fe-core/src/main/java/org/apache/doris/mysql/authenticate/integration/AuthenticationIntegrationAuthenticator.java:
##########
@@ -225,10 +225,12 @@ private String 
oidcClientVisibleFailureMessage(AuthenticationIntegration integra
             return "";
         }
         String detailMessage = Strings.nullToEmpty(exception.getMessage());
-        if (detailMessage.startsWith("OIDC token signature validation 
failed")) {
-            return "OIDC token signature validation failed";
+        if (detailMessage.startsWith("OIDC access token signature validation 
failed")) {

Review Comment:
   This drops the old `"OIDC token signature validation failed"` sanitization 
path. In mixed-version or external-plugin setups that still emit the old 
prefix, the message now falls through the next branch (`startsWith("OIDC token 
")`) and the full raw detail is sent back to the client instead of the generic 
redacted text they got before. That is a client-visible compatibility 
regression and should be preserved here (and in 
`AuthenticationPluginAuthenticator`) while adding the new `OIDC access token 
...` variant.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to