Hadoop Common
  1. Hadoop Common
  2. HADOOP-8355

SPNEGO filter throws/logs exception when authentication fails

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 1.2.0, 2.0.0-alpha
    • Component/s: security
    • Labels:
      None

      Description

      if the auth-token is NULL means the authenticator has not authenticated the request and it has already issue an UNAUTHORIZED response, there is no need to throw an exception and then immediately catch it and log it. The 'else throw' can be removed.

      1. HADOOP-8355-branch1.patch
        2 kB
        Alejandro Abdelnur
      2. HADOOP-8355.patch
        2 kB
        Alejandro Abdelnur

        Activity

        Hide
        Alejandro Abdelnur added a comment -

        being a bit conservative, the AuthenticationFilter will not trust the AuthenticationHandler to set the UNAUTHORIZED response when returning NULL and it will set it itself (if happens twice is a NOP).

        Show
        Alejandro Abdelnur added a comment - being a bit conservative, the AuthenticationFilter will not trust the AuthenticationHandler to set the UNAUTHORIZED response when returning NULL and it will set it itself (if happens twice is a NOP).
        Hide
        Aaron T. Myers added a comment -

        +1 pending Jenkins. The patch looks good to me. I also tested the patch manually and observed that the spurious stack traces no longer appear in the NN or 2NN logs when performing a checkpoint.

        Good on you, Tucu.

        Show
        Aaron T. Myers added a comment - +1 pending Jenkins. The patch looks good to me. I also tested the patch manually and observed that the spurious stack traces no longer appear in the NN or 2NN logs when performing a checkpoint. Good on you, Tucu.
        Hide
        Hadoop QA added a comment -

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

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

        -1 tests included. 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 javadoc. The javadoc tool appears to have generated 2 warning messages.

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

        +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/934//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/934//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/12525542/HADOOP-8355.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. 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 javadoc. The javadoc tool appears to have generated 2 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +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/934//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/934//console This message is automatically generated.
        Hide
        Alejandro Abdelnur added a comment -

        javadocs warnings seem unrelated.

        Show
        Alejandro Abdelnur added a comment - javadocs warnings seem unrelated.
        Hide
        Alejandro Abdelnur added a comment -

        committed to trunk and branch-2.

        Show
        Alejandro Abdelnur added a comment - committed to trunk and branch-2.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #2259 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2259/)
        HADOOP-8355. SPNEGO filter throws/logs exception when authentication fails (tucu) (Revision 1333746)

        Result = SUCCESS
        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1333746
        Files :

        • /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-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2259 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2259/ ) HADOOP-8355 . SPNEGO filter throws/logs exception when authentication fails (tucu) (Revision 1333746) Result = SUCCESS tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1333746 Files : /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-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #2185 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2185/)
        HADOOP-8355. SPNEGO filter throws/logs exception when authentication fails (tucu) (Revision 1333746)

        Result = SUCCESS
        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1333746
        Files :

        • /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-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2185 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2185/ ) HADOOP-8355 . SPNEGO filter throws/logs exception when authentication fails (tucu) (Revision 1333746) Result = SUCCESS tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1333746 Files : /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-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #2204 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2204/)
        HADOOP-8355. SPNEGO filter throws/logs exception when authentication fails (tucu) (Revision 1333746)

        Result = ABORTED
        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1333746
        Files :

        • /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-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2204 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2204/ ) HADOOP-8355 . SPNEGO filter throws/logs exception when authentication fails (tucu) (Revision 1333746) Result = ABORTED tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1333746 Files : /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-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1034 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1034/)
        HADOOP-8355. SPNEGO filter throws/logs exception when authentication fails (tucu) (Revision 1333746)

        Result = FAILURE
        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1333746
        Files :

        • /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-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1034 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1034/ ) HADOOP-8355 . SPNEGO filter throws/logs exception when authentication fails (tucu) (Revision 1333746) Result = FAILURE tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1333746 Files : /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-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1069 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1069/)
        HADOOP-8355. SPNEGO filter throws/logs exception when authentication fails (tucu) (Revision 1333746)

        Result = SUCCESS
        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1333746
        Files :

        • /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-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1069 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1069/ ) HADOOP-8355 . SPNEGO filter throws/logs exception when authentication fails (tucu) (Revision 1333746) Result = SUCCESS tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1333746 Files : /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-common/CHANGES.txt
        Hide
        Alejandro Abdelnur added a comment -

        patch for branch-1

        Show
        Alejandro Abdelnur added a comment - patch for branch-1
        Hide
        Alejandro Abdelnur added a comment -

        committed to branch-1.

        Show
        Alejandro Abdelnur added a comment - committed to branch-1.

          People

          • Assignee:
            Alejandro Abdelnur
            Reporter:
            Alejandro Abdelnur
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development