fix(kerboros): set correct classloader for kerboros conf load in plugin tasks (#7027)

Co-authored-by: xudong.zhang <xudong.zhang@nio.com>
This commit is contained in:
sparklezzz 2021-11-28 09:25:51 +08:00 committed by GitHub
parent a8aed0f5f7
commit 42e20cbf60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -79,7 +79,9 @@ public class CommonUtils {
* @throws IOException errors
*/
public static void loadKerberosConf(String javaSecurityKrb5Conf, String loginUserKeytabUsername, String loginUserKeytabPath) throws IOException {
loadKerberosConf(javaSecurityKrb5Conf, loginUserKeytabUsername, loginUserKeytabPath, new Configuration());
Configuration configuration = new Configuration();
configuration.setClassLoader(configuration.getClass().getClassLoader());
loadKerberosConf(javaSecurityKrb5Conf, loginUserKeytabUsername, loginUserKeytabPath, configuration);
}
/**