You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Eli Collins (JIRA)" <ji...@apache.org> on 2012/07/11 20:51:34 UTC

[jira] [Created] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Eli Collins created HDFS-3639:
---------------------------------

             Summary: JspHelper#getUGI should always verify the token if security is enabled
                 Key: HDFS-3639
                 URL: https://issues.apache.org/jira/browse/HDFS-3639
             Project: Hadoop HDFS
          Issue Type: Bug
          Components: security
    Affects Versions: 2.0.0-alpha
            Reporter: Eli Collins
            Assignee: Eli Collins
            Priority: Minor


JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13416866#comment-13416866 ] 

Eli Collins commented on HDFS-3639:
-----------------------------------

I've reverted this change (and HDFS-3654). Thanks to ATM who pointed out that this "causes HftpFileSystem to not work at all with an actual secure cluster, failing with an NPE when attempting to read a file. The reason being that both DNs and NNs call JspHelper@getUGI, but it's 100% expected that in the DN case that the context.getAttribute("name.node") will return null. In the NN case (where "name.node" is set) it is needed for UGI verification."

Perhaps we should have a version of this function used by the NN that requires the the name.node attribute be set and another version used by the NN that doesn't verify the token?
                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>             Fix For: 1.2.0, 2.1.0-alpha
>
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eli Collins reassigned HDFS-3639:
---------------------------------

    Assignee:     (was: Eli Collins)
    
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Priority: Minor
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eli Collins updated HDFS-3639:
------------------------------

    Attachment: hdfs-3639.txt

Trivial patch attached.
                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>         Attachments: hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13416898#comment-13416898 ] 

Hudson commented on HDFS-3639:
------------------------------

Integrated in Hadoop-Mapreduce-trunk-Commit #2516 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2516/])
    Revert HDFS-3639. JspHelper#getUGI should always verify the token if security is enabled. (Revision 1362760)

     Result = FAILURE
eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1362760
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java

                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13412388#comment-13412388 ] 

Eli Collins commented on HDFS-3639:
-----------------------------------

Test failure is unrelated, filed HDFS-3642.
                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>         Attachments: hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13416869#comment-13416869 ] 

Hudson commented on HDFS-3639:
------------------------------

Integrated in Hadoop-Hdfs-trunk-Commit #2559 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2559/])
    Revert HDFS-3639. JspHelper#getUGI should always verify the token if security is enabled. (Revision 1362760)

     Result = SUCCESS
eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1362760
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java

                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>             Fix For: 1.2.0, 2.1.0-alpha
>
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eli Collins updated HDFS-3639:
------------------------------

    Attachment: hdfs-3639-b1.txt
    
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>             Fix For: 1.2.0, 2.0.1-alpha
>
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13412434#comment-13412434 ] 

Hudson commented on HDFS-3639:
------------------------------

Integrated in Hadoop-Common-trunk-Commit #2454 (See [https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2454/])
    HDFS-3639. JspHelper#getUGI should always verify the token if security is enabled. Contributed by Eli Collins (Revision 1360485)

     Result = SUCCESS
eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1360485
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java

                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>             Fix For: 1.2.0, 2.0.1-alpha
>
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eli Collins updated HDFS-3639:
------------------------------

    Status: Patch Available  (was: Open)
    
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 2.0.0-alpha, 1.0.0
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>         Attachments: hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13416871#comment-13416871 ] 

Aaron T. Myers commented on HDFS-3639:
--------------------------------------

bq. Perhaps we should have a version of this function used by the NN that requires the the name.node attribute be set and another version used by the NN that doesn't verify the token?

That would be fine. Or break out the token verification from the getUGI function, and have the NN code path explicitly call some separate verifyToken function before calling getUGI.
                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>             Fix For: 1.2.0, 2.1.0-alpha
>
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eli Collins updated HDFS-3639:
------------------------------

    Status: Open  (was: Patch Available)
    
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 2.0.0-alpha, 1.0.0
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13412716#comment-13412716 ] 

Hudson commented on HDFS-3639:
------------------------------

Integrated in Hadoop-Hdfs-trunk #1101 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/1101/])
    HDFS-3639. JspHelper#getUGI should always verify the token if security is enabled. Contributed by Eli Collins (Revision 1360485)

     Result = FAILURE
eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1360485
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java

                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>             Fix For: 1.2.0, 2.0.1-alpha
>
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13412807#comment-13412807 ] 

Hudson commented on HDFS-3639:
------------------------------

Integrated in Hadoop-Mapreduce-trunk #1134 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1134/])
    HDFS-3639. JspHelper#getUGI should always verify the token if security is enabled. Contributed by Eli Collins (Revision 1360485)

     Result = SUCCESS
eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1360485
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java

                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>             Fix For: 1.2.0, 2.0.1-alpha
>
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13412351#comment-13412351 ] 

Hadoop QA commented on HDFS-3639:
---------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12536094/hdfs-3639.txt
  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 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 javadoc.  The javadoc tool did not generate any 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 failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:

                  org.apache.hadoop.hdfs.TestReplication

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

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

This message is automatically generated.
                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>         Attachments: hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eli Collins updated HDFS-3639:
------------------------------

     Target Version/s: 1.2.0, 2.0.1-alpha  (was: 2.0.1-alpha)
    Affects Version/s: 1.0.0
    
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>         Attachments: hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eli Collins resolved HDFS-3639.
-------------------------------

          Resolution: Fixed
       Fix Version/s: 2.0.1-alpha
                      1.2.0
    Target Version/s:   (was: 1.2.0, 2.0.1-alpha)
        Hadoop Flags: Reviewed

Thanks for the review Daryn. I've committed this and merged to branch-2 and branch-1. 
                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>             Fix For: 1.2.0, 2.0.1-alpha
>
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13412034#comment-13412034 ] 

Daryn Sharp commented on HDFS-3639:
-----------------------------------

+1 (Assuming tests pass) I saw that while fixing proxy tokens and it make me uneasy so I'm glad you're fixing it!
                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>         Attachments: hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13417015#comment-13417015 ] 

Hudson commented on HDFS-3639:
------------------------------

Integrated in Hadoop-Hdfs-trunk #1107 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/1107/])
    Revert HDFS-3639. JspHelper#getUGI should always verify the token if security is enabled. (Revision 1362760)

     Result = FAILURE
eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1362760
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java

                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13412431#comment-13412431 ] 

Hudson commented on HDFS-3639:
------------------------------

Integrated in Hadoop-Mapreduce-trunk-Commit #2472 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2472/])
    HDFS-3639. JspHelper#getUGI should always verify the token if security is enabled. Contributed by Eli Collins (Revision 1360485)

     Result = FAILURE
eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1360485
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java

                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>             Fix For: 1.2.0, 2.0.1-alpha
>
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13412443#comment-13412443 ] 

Hudson commented on HDFS-3639:
------------------------------

Integrated in Hadoop-Hdfs-trunk-Commit #2520 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2520/])
    HDFS-3639. JspHelper#getUGI should always verify the token if security is enabled. Contributed by Eli Collins (Revision 1360485)

     Result = SUCCESS
eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1360485
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java

                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>             Fix For: 1.2.0, 2.0.1-alpha
>
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13416874#comment-13416874 ] 

Hudson commented on HDFS-3639:
------------------------------

Integrated in Hadoop-Common-trunk-Commit #2494 (See [https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2494/])
    Revert HDFS-3639. JspHelper#getUGI should always verify the token if security is enabled. (Revision 1362760)

     Result = SUCCESS
eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1362760
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java

                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>             Fix For: 1.2.0, 2.1.0-alpha
>
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13417074#comment-13417074 ] 

Daryn Sharp commented on HDFS-3639:
-----------------------------------

To avoid possible duplication of code, perhaps add a boolean to the method signature for whether to verify the token?  Or maybe pass in the NN object or null to indicate whether to verify the token?
                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13417108#comment-13417108 ] 

Hudson commented on HDFS-3639:
------------------------------

Integrated in Hadoop-Mapreduce-trunk #1140 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1140/])
    Revert HDFS-3639. JspHelper#getUGI should always verify the token if security is enabled. (Revision 1362760)

     Result = FAILURE
eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1362760
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/JspHelper.java

                
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eli Collins updated HDFS-3639:
------------------------------

    Target Version/s: 1.2.0, 2.2.0-alpha
       Fix Version/s:     (was: 1.2.0)
                          (was: 2.1.0-alpha)
    
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (HDFS-3639) JspHelper#getUGI should always verify the token if security is enabled

Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aaron T. Myers reopened HDFS-3639:
----------------------------------

    
> JspHelper#getUGI should always verify the token if security is enabled
> ----------------------------------------------------------------------
>
>                 Key: HDFS-3639
>                 URL: https://issues.apache.org/jira/browse/HDFS-3639
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.0.0, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>            Priority: Minor
>             Fix For: 1.2.0, 2.1.0-alpha
>
>         Attachments: hdfs-3639-b1.txt, hdfs-3639.txt
>
>
> JspHelper#getUGI on verifies the given token if the context and nn are set (added in HDFS-2416). We should unconditionally verifyToken the token, ie a bug where "name.node" is not set in the context object should not result in not verifying the token. In practice this shouldn't be an issue as per HDFS-3434 the context and NN should never be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira