Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13965

Groups should be consistent in using default group mapping class

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha2
    • Fix Version/s: 3.0.0-alpha2
    • Component/s: security
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Groups.java
            public Groups(Configuration conf, final Timer timer) {
             impl = 
            ReflectionUtils.newInstance(
                conf.getClass(CommonConfigurationKeys.HADOOP_SECURITY_GROUP_MAPPING, 
                              ShellBasedUnixGroupsMapping.class, 
                              GroupMappingServiceProvider.class), 
                conf);
            ...
      }
      

      The default value of setting hadoop.security.group.mapping is different in code and config file. In file core-default.xml, it uses the class JniBasedUnixGroupsMappingWithFallback and this should be the true value.

      <property>
        <name>hadoop.security.group.mapping</name>
       <value>org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback</value>
        <description>
          Class for user to group mapping (get groups for a given user) for ACL.
          The default implementation,
          org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback,
          will determine if the Java Native Interface (JNI) is available.....
        </description>
      </property>
      

        Activity

        Hide
        linyiqun Yiqun Lin added a comment -

        Attach a simple patch to fix.

        Show
        linyiqun Yiqun Lin added a comment - Attach a simple patch to fix.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 14s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
        +1 mvninstall 12m 53s trunk passed
        +1 compile 10m 12s trunk passed
        +1 checkstyle 0m 31s trunk passed
        +1 mvnsite 1m 10s trunk passed
        +1 mvneclipse 0m 18s trunk passed
        +1 findbugs 1m 37s trunk passed
        +1 javadoc 0m 49s trunk passed
        +1 mvninstall 0m 42s the patch passed
        +1 compile 10m 6s the patch passed
        +1 javac 10m 6s the patch passed
        +1 checkstyle 0m 28s the patch passed
        +1 mvnsite 1m 1s the patch passed
        +1 mvneclipse 0m 17s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 37s the patch passed
        +1 javadoc 0m 49s the patch passed
        +1 unit 8m 21s hadoop-common in the patch passed.
        +1 asflicense 0m 32s The patch does not generate ASF License warnings.
        53m 27s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:a9ad5d6
        JIRA Issue HADOOP-13965
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12846574/HADOOP-13965.001.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 6b8287a0fa75 3.13.0-103-generic #150-Ubuntu SMP Thu Nov 24 10:34:17 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 4c431a6
        Default Java 1.8.0_111
        findbugs v3.0.0
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/11409/testReport/
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/11409/console
        Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 14s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 mvninstall 12m 53s trunk passed +1 compile 10m 12s trunk passed +1 checkstyle 0m 31s trunk passed +1 mvnsite 1m 10s trunk passed +1 mvneclipse 0m 18s trunk passed +1 findbugs 1m 37s trunk passed +1 javadoc 0m 49s trunk passed +1 mvninstall 0m 42s the patch passed +1 compile 10m 6s the patch passed +1 javac 10m 6s the patch passed +1 checkstyle 0m 28s the patch passed +1 mvnsite 1m 1s the patch passed +1 mvneclipse 0m 17s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 37s the patch passed +1 javadoc 0m 49s the patch passed +1 unit 8m 21s hadoop-common in the patch passed. +1 asflicense 0m 32s The patch does not generate ASF License warnings. 53m 27s Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue HADOOP-13965 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12846574/HADOOP-13965.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 6b8287a0fa75 3.13.0-103-generic #150-Ubuntu SMP Thu Nov 24 10:34:17 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 4c431a6 Default Java 1.8.0_111 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/11409/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/11409/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        linyiqun Yiqun Lin added a comment -

        Hi Akira Ajisaka, could you please provide a review? Thanks for that.

        Show
        linyiqun Yiqun Lin added a comment - Hi Akira Ajisaka , could you please provide a review? Thanks for that.
        Hide
        ajisakaa Akira Ajisaka added a comment -

        +1, thanks Yiqun Lin.

        Show
        ajisakaa Akira Ajisaka added a comment - +1, thanks Yiqun Lin .
        Hide
        linyiqun Yiqun Lin added a comment -

        Committed to trunk. Thanks Akira Ajisaka for the review.

        Show
        linyiqun Yiqun Lin added a comment - Committed to trunk. Thanks Akira Ajisaka for the review.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11138 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11138/)
        HADOOP-13965. Groups should be consistent in using default group mapping (yqlin: rev 383aa9c9f55983cdb1c225b2ed22f6f48616cb9c)

        • (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/Groups.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11138 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11138/ ) HADOOP-13965 . Groups should be consistent in using default group mapping (yqlin: rev 383aa9c9f55983cdb1c225b2ed22f6f48616cb9c) (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/Groups.java
        Hide
        shv Konstantin Shvachko added a comment -

        Hey guys, I think it would have been better to introduce a constant for the default value as with other config variables, rather than hardcoding the class name.

        Show
        shv Konstantin Shvachko added a comment - Hey guys, I think it would have been better to introduce a constant for the default value as with other config variables, rather than hardcoding the class name.

          People

          • Assignee:
            linyiqun Yiqun Lin
            Reporter:
            linyiqun Yiqun Lin
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development