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

DelegationTokenAuthenticationFilter get wrong doAsUser since it does not decode URL

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 3.3.0, 3.1.2, 3.2.1
    • Component/s: common, kms
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Incompatible change, Reviewed

      Description

      DelegationTokenAuthenticationFilter get wrong doAsUser when proxy user from client is complete kerberos name (e.g., user/hostname@REALM.COM, actually it is acceptable), because DelegationTokenAuthenticationFilter does not decode DOAS parameter in URL which is encoded by URLEncoder at client.
      e.g. KMS as example:
      a. KMSClientProvider creates connection to KMS Server using DelegationTokenAuthenticatedURL#openConnection.
      b. If KMSClientProvider is a doAsUser, KMSClientProvider will put doas with url encoded user as one parameter of http request.

          // proxyuser
          if (doAs != null) {
            extraParams.put(DO_AS, URLEncoder.encode(doAs, "UTF-8"));
          }
      

      c. when KMS server receives the request, it does not decode the proxy user.

      As result, KMS Server will get the wrong proxy user if this proxy user is complete Kerberos Name or it includes some special character. Some other authentication and authorization exception will throws next to it.

        Attachments

        1. HADOOP-15922.006.patch
          4 kB
          He Xiaoqiao
        2. HADOOP-15922.005.patch
          4 kB
          He Xiaoqiao
        3. HADOOP-15922.004.patch
          5 kB
          He Xiaoqiao
        4. HADOOP-15922.003.patch
          5 kB
          He Xiaoqiao
        5. HADOOP-15922.002.patch
          5 kB
          He Xiaoqiao
        6. HADOOP-15922.001.patch
          1 kB
          He Xiaoqiao

          Activity

            People

            • Assignee:
              hexiaoqiao He Xiaoqiao
              Reporter:
              hexiaoqiao He Xiaoqiao
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: