Hadoop Common
  1. Hadoop Common
  2. HADOOP-6527

UserGroupInformation::createUserForTesting clobbers already defined group mappings

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.0, 1-win
    • Component/s: security
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In UserGroupInformation::createUserForTesting the follow code creates a new groups instance, obliterating any groups that have been previously defined in the static groups field.

          if (!(groups instanceof TestingGroups)) {
            groups = new TestingGroups();
          }
      

      This becomes a problem in tests that start a Mini

      {DFS,MR}

      Cluster and then create a testing user. The user that started the user (generally the real user running the test) immediately has their groups wiped out and is prevented from accessing files/folders/queues they should be able to. Before the UserGroupInformation.createRemoteUserForTesting, calls to userA.getGroups may return

      {"a", "b", "c"}

      and immediately after the new fake user is created, the same call will return an empty array.

        Issue Links

          Activity

          Matt Foley made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Tsz Wo Nicholas Sze made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 1.1.0 [ 12316501 ]
          Fix Version/s 1-win [ 12320361 ]
          Resolution Fixed [ 1 ]
          Tsz Wo Nicholas Sze made changes -
          Hadoop Flags Reviewed [ 10343 ]
          Ivan Mitic made changes -
          Tsz Wo Nicholas Sze made changes -
          Link This issue relates to HADOOP-7389 [ HADOOP-7389 ]
          Ivan Mitic made changes -
          Attachment HADOOP-6527-branch-1-win_UGI_fix.patch [ 12533574 ]
          Ivan Mitic made changes -
          Field Original Value New Value
          Assignee Ivan Mitic [ ivanmi ]
          Jakob Homan created issue -

            People

            • Assignee:
              Ivan Mitic
              Reporter:
              Jakob Homan
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development