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