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

Authentication proxy filter may fail authorization because of getRemoteAddr

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 2.7.4, 3.0.0-alpha2, 2.8.1
    • None
    • common
    • None
    • Path has code refactored and testcases

    Description

      When we turn on Hadoop UI Kerberos and try to access Datanode /logs the proxy (Knox) would get an Authorization failure and it hosts would should as 127.0.0.1 even though Knox wasn't in local host to Datanode, error message:

      "2017-04-08 07:01:23,029 ERROR security.AuthenticationWithProxyUserFilter (AuthenticationWithProxyUserFilter.java:getRemoteUser(94)) - Unable to verify proxy user: Unauthorized connection for super-user: knox from IP 127.0.0.1"

      We were able to figure out that Datanode have Jetty listening on localhost and that Netty is used to server request to DataNode, this was a measure to improve performance because of Netty Async NIO design.

      I propose to add a check for x-forwarded-for header since proxys usually inject that header before we do a getRemoteAddr

      Attachments

        1. hadoop-14295.001.patch
          2 kB
          Jeffrey E Rodriguez
        2. HADOOP-14295.002.patch
          5 kB
          Jeffrey E Rodriguez
        3. HADOOP-14295.003.patch
          6 kB
          Jeffrey E Rodriguez
        4. HADOOP-14295.004.patch
          5 kB
          Yuanbo Liu

        Activity

          People

            jeffreyr97 Jeffrey E Rodriguez
            jeffreyr97 Jeffrey E Rodriguez
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated: