Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-1353

NameRules should be set to the default value in Kerberized Environment

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.7.0
    • Ranger
    • Patch

    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

        1. 0001-RANGER-1353.patch
          2 kB
          Qiang Zhang

        Activity

          People

            zhangqiang2 Qiang Zhang
            zhangqiang2 Qiang Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: