File tree Expand file tree Collapse file tree
fluss-common/src/main/java/org/apache/fluss
fluss-server/src/main/java/org/apache/fluss/server/tools Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1291,6 +1291,18 @@ public class ConfigOptions {
12911291 .withDescription (
12921292 "The authentication protocol used to authenticate the client." );
12931293
1294+ public static final ConfigOption <Boolean > CLIENT_SECURITY_ENABLE_PLUGIN_DISCOVERY =
1295+ key ("client.security.enable-plugin-discovery" )
1296+ .booleanType ()
1297+ .defaultValue (false )
1298+ .withDescription (
1299+ "When set to true, the client will additionally discover "
1300+ + "authentication plugins from the configured plugins/ folder "
1301+ + "via the PluginManager, in addition to the default classpath. "
1302+ + "This is useful for standalone tools or scripts that run outside "
1303+ + "the server JVM but still need to load authentication plugins "
1304+ + "shipped in plugins/." );
1305+
12941306 public static final ConfigOption <MemorySize > CLIENT_SCANNER_LOG_FETCH_MAX_BYTES =
12951307 key ("client.scanner.log.fetch.max-bytes" )
12961308 .memoryType ()
Original file line number Diff line number Diff line change @@ -68,8 +68,15 @@ public static Supplier<ClientAuthenticator> loadClientAuthenticatorSupplier(
6868 Configuration configuration ) {
6969 String clientAuthenticateProtocol =
7070 configuration .getString (ConfigOptions .CLIENT_SECURITY_PROTOCOL );
71+ PluginManager pluginManager = null ;
72+ if (configuration .getBoolean (ConfigOptions .CLIENT_SECURITY_ENABLE_PLUGIN_DISCOVERY )) {
73+ pluginManager = PluginUtils .createPluginManagerFromRootFolder (configuration );
74+ }
7175 ClientAuthenticationPlugin authenticatorPlugin =
72- discoverPlugin (clientAuthenticateProtocol , ClientAuthenticationPlugin .class , null );
76+ discoverPlugin (
77+ clientAuthenticateProtocol ,
78+ ClientAuthenticationPlugin .class ,
79+ pluginManager );
7380 return () -> authenticatorPlugin .createClientAuthenticator (configuration );
7481 }
7582
Original file line number Diff line number Diff line change 1919
2020import org .apache .fluss .cluster .ServerNode ;
2121import org .apache .fluss .cluster .ServerType ;
22+ import org .apache .fluss .config .ConfigOptions ;
2223import org .apache .fluss .config .Configuration ;
2324import org .apache .fluss .exception .UnsupportedVersionException ;
2425import org .apache .fluss .metrics .registry .MetricRegistryImpl ;
@@ -230,6 +231,9 @@ private static Configuration buildConfiguration(String authString) {
230231 if (authString == null || authString .trim ().isEmpty ()) {
231232 return conf ;
232233 }
234+ // Enable plugin discovery so the client authenticator can discover authentication
235+ // plugins shipped in the server's plugins/ directory.
236+ conf .setBoolean (ConfigOptions .CLIENT_SECURITY_ENABLE_PLUGIN_DISCOVERY , true );
233237 for (String pair : authString .split (";" )) {
234238 String trimmed = pair .trim ();
235239 if (trimmed .isEmpty ()) {
You can’t perform that action at this time.
0 commit comments