private void requireScannerOwner(InternalScanner s) throws AccessDeniedException {
    if (!RpcServer.isInRpcCallContext()) return;
    String requestUName = RpcServer.getRequestUserName().orElse(null);
    String owner = scannerOwners.get(s);
    if (authorizationEnabled && owner != null && !owner.equals(requestUName)) {
      throw new AccessDeniedException("User '" + requestUName + "' is not the scanner owner!");
    }
  }
Verify, when servicing an RPC, that the caller is the scanner owner. If so, we assume that
access control is correctly enforced based on the checks performed in preScannerOpen()
hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java