Hadoop Common
  1. Hadoop Common
  2. HADOOP-10665

Make Hadoop Authentication Handler loads case in-sensitive

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.0
    • Component/s: security
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The authentication mechanism for http specified via hadoop.http.authentication.type is matched in in a case sensitive way. If one specifies the type

      {simple,kerberos}

      in the wrong case, the following exception is thrown .

      Caused by: java.lang.ClassNotFoundException: Simple
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      at org.apache.hadoop.security.authentication.server.AuthenticationFilter.init(AuthenticationFilter.java:148)
      ... 24 more

      I believe , it is safe to ignore case during this comparison.

      1. HADOOP-10665.patch
        3 kB
        Benoy Antony
      2. HADOOP-10665.patch
        4 kB
        Benoy Antony

        Activity

        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #1811 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1811/)
        HADOOP-10665. Make Hadoop Authentication Handler loads case in-sensitive (Contributed by Benoy Antony) (vinayakumarb: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1605049)

        • /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #1811 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1811/ ) HADOOP-10665 . Make Hadoop Authentication Handler loads case in-sensitive (Contributed by Benoy Antony) (vinayakumarb: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1605049 ) /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Hdfs-trunk #1784 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1784/)
        HADOOP-10665. Make Hadoop Authentication Handler loads case in-sensitive (Contributed by Benoy Antony) (vinayakumarb: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1605049)

        • /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - SUCCESS: Integrated in Hadoop-Hdfs-trunk #1784 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1784/ ) HADOOP-10665 . Make Hadoop Authentication Handler loads case in-sensitive (Contributed by Benoy Antony) (vinayakumarb: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1605049 ) /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Yarn-trunk #593 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/593/)
        HADOOP-10665. Make Hadoop Authentication Handler loads case in-sensitive (Contributed by Benoy Antony) (vinayakumarb: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1605049)

        • /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #593 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/593/ ) HADOOP-10665 . Make Hadoop Authentication Handler loads case in-sensitive (Contributed by Benoy Antony) (vinayakumarb: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1605049 ) /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hadoop-trunk-Commit #5758 (See https://builds.apache.org/job/Hadoop-trunk-Commit/5758/)
        HADOOP-10665. Make Hadoop Authentication Handler loads case in-sensitive (Contributed by Benoy Antony) (vinayakumarb: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1605049)

        • /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #5758 (See https://builds.apache.org/job/Hadoop-trunk-Commit/5758/ ) HADOOP-10665 . Make Hadoop Authentication Handler loads case in-sensitive (Contributed by Benoy Antony) (vinayakumarb: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1605049 ) /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java /hadoop/common/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Vinayakumar B added a comment -

        Thanks Benoy Antony for the contribution.
        Thanks Steve Loughran for the review.

        Show
        Vinayakumar B added a comment - Thanks Benoy Antony for the contribution. Thanks Steve Loughran for the review.
        Hide
        Vinayakumar B added a comment -

        Committed to trunk and branch-2

        Show
        Vinayakumar B added a comment - Committed to trunk and branch-2
        Hide
        Vinayakumar B added a comment -

        +1, Changes looks good.
        Will commit in sometime.

        Show
        Vinayakumar B added a comment - +1, Changes looks good. Will commit in sometime.
        Hide
        Benoy Antony added a comment -

        Vinayakumar B, Could you please review this jira ?

        Show
        Benoy Antony added a comment - Vinayakumar B , Could you please review this jira ?
        Hide
        Benoy Antony added a comment -

        Steve Loughran , Could you please review the updated patch ?

        Show
        Benoy Antony added a comment - Steve Loughran , Could you please review the updated patch ?
        Hide
        Benoy Antony added a comment -

        Haohui Mai, Could you also. please review this jira ?

        Show
        Benoy Antony added a comment - Haohui Mai , Could you also. please review this jira ?
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12648652/HADOOP-10665.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 1 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. There were no new javadoc warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-auth.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/4015//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/4015//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12648652/HADOOP-10665.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-auth. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/4015//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/4015//console This message is automatically generated.
        Hide
        Benoy Antony added a comment -

        Thanks for the suggestion.
        The corrected patch is attached.

        Show
        Benoy Antony added a comment - Thanks for the suggestion. The corrected patch is attached.
        Hide
        Steve Loughran added a comment -

        seems a good idea, but the test has to become locale independent via toLower(locale_en).equals, not equalsIgnoreCase

        Show
        Steve Loughran added a comment - seems a good idea, but the test has to become locale independent via toLower(locale_en).equals, not equalsIgnoreCase
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12648535/HADOOP-10665.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 1 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. There were no new javadoc warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-auth.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/4011//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/4011//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12648535/HADOOP-10665.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-auth. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/4011//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/4011//console This message is automatically generated.
        Hide
        Benoy Antony added a comment -

        Attaching the patch which compares the specified type ignoring case.
        The hardcoded values are removed.

        Specific tests for the changes are included.

        Show
        Benoy Antony added a comment - Attaching the patch which compares the specified type ignoring case. The hardcoded values are removed. Specific tests for the changes are included.

          People

          • Assignee:
            Benoy Antony
            Reporter:
            Benoy Antony
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development