Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-4983

Numeric usernames do not work with WebHDFS FS

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 2.3.0
    • Component/s: webhdfs
    • Labels:
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Add a new configuration property "dfs.webhdfs.user.provider.user.pattern" for specifying user name filters for WebHDFS.

      Description

      Per the file hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/resources/UserParam.java, the DOMAIN pattern is set to: ^[A-Za-z_][A-Za-z0-9._-]*[$]?$.

      Given this, using a username such as "123" seems to fail for some reason (tried on insecure setup):

      [123@host-1 ~]$ whoami
      123
      [123@host-1 ~]$ hadoop fs -fs webhdfs://host-2.domain.com -ls /
      -ls: Invalid value: "123" does not belong to the domain ^[A-Za-z_][A-Za-z0-9._-]*[$]?$
      Usage: hadoop fs [generic options] -ls [-d] [-h] [-R] [<path> ...]
      

        Attachments

        1. HDFS-4983.001.patch
          9 kB
          Yongjun Zhang
        2. HDFS-4983.002.patch
          9 kB
          Yongjun Zhang
        3. HDFS-4983.003.patch
          9 kB
          Yongjun Zhang
        4. HDFS-4983.004.patch
          9 kB
          Yongjun Zhang
        5. HDFS-4983.005.patch
          9 kB
          Yongjun Zhang
        6. HDFS-4983.006.patch
          9 kB
          Yongjun Zhang
        7. HDFS-4983.006.patch
          9 kB
          Yongjun Zhang
        8. HDFS-4983-branch2.3.001.patch
          9 kB
          Yongjun Zhang

          Issue Links

            Activity

              People

              • Assignee:
                yzhangal Yongjun Zhang
                Reporter:
                qwertymaniac Harsh J
              • Votes:
                0 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: