Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-16207

can't restore snapshot without "Admin" permission

    XMLWordPrintableJSON

    Details

      Description

      MasterRpcServices.restoreSnapshot() tries to verify if the NS exists before starting the restore, but instead of calling ensureNamespaceExists() it calls master.getNamespace() which requires ADMIN permission to get the NS descriptor.

      public RestoreSnapshotResponse restoreSnapshot(RpcController controller,
      ...
        // Ensure namespace exists. Will throw exception if non-known NS.
        master.getNamespace(dstTable.getNamespaceAsString());
      

      unfortunately i'm not aware of any unit-test that cover this kind of situations. we cover single ACLs from the TestAccessController but we don't exercise rpc calls and verify if there is more than one check on the ACLs like in this case

        Attachments

        1. HBASE-16207-v0.patch
          0.9 kB
          Matteo Bertozzi
        2. HBASE-16207-v0_branch-1.patch
          2 kB
          Matteo Bertozzi

          Activity

            People

            • Assignee:
              mbertozzi Matteo Bertozzi
              Reporter:
              mbertozzi Matteo Bertozzi
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: