Skip to content

Commit

Permalink
[apache#6245] fix(authz): Authorization should use classloader to cre…
Browse files Browse the repository at this point in the history
…ate the plugin (apache#6246)

Authorization should use classloader to create the plugin

Fix: apache#6245

No.

I tested it manually.
  • Loading branch information
jerqi authored and Abyss-lord committed Jan 15, 2025
1 parent b669a0b commit 1988569
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,12 @@ public void initAuthorizationPluginInstance(IsolatedClassLoader classLoader) {
LOG.info("Authorization provider is not set!");
return;
}
try (BaseAuthorization<?> authorization =
BaseAuthorization.createAuthorization(classLoader, authorizationProvider)) {
try {
BaseAuthorization<?> authorization =
BaseAuthorization.createAuthorization(classLoader, authorizationProvider);

// Load the authorization plugin with the class loader of the catalog.
// Because the JDBC authorization plugin may load JDBC driver using the class loader.
authorizationPlugin =
classLoader.withClassLoader(
cl ->
Expand Down

0 comments on commit 1988569

Please sign in to comment.