Description
when the value of NameRules is not configured in Kerberized Environment,
I start ranger-admin,it will cause java.lang.NullPointerException
the error message is as follows:
java.lang.NullPointerException at org.apache.hadoop.security.authentication.util.KerberosName.getShortName(KerberosName.java:383) at org.apache.hadoop.security.User.<init>(User.java:48) at org.apache.hadoop.security.SecureClientLogin.loginUserFromKeytab(SecureClientLogin.java:65) at org.apache.ranger.server.tomcat.EmbeddedServer.start(EmbeddedServer.java:232) at org.apache.ranger.server.tomcat.EmbeddedServer.main(EmbeddedServer.java:72)
so we should add the default value in Java method EmbeddedServer.start():
String nameRules = getConfig(ADMIN_NAME_RULES); if (getConfig(AUTHENTICATION_TYPE) != null && getConfig(AUTHENTICATION_TYPE).trim().equalsIgnoreCase(AUTH_TYPE_KERBEROS) && SecureClientLogin.isKerberosCredentialExists(principal,keytab)) { ... }
Attachments
Attachments
Issue Links
- links to