zhuzhixin created RANGER-3494: --------------------------------- Summary: some ES request can't checkpermission Key: RANGER-3494 URL: https://issues.apache.org/jira/browse/RANGER-3494 Project: Ranger Issue Type: Improvement Components: Ranger Affects Versions: 2.1.0 Environment: ubuntu 18.04 , jdk1.8 Reporter: zhuzhixin
I have commit it in aug 19, see KasuganoShin https://github.com/apache/ranger/commit/ad06828d2d0b31731e02247a29bba65b9c9f2cef hi, I find some improvement and problems improvement: BulkRequest, MultiGetRequest, MultiSearchRequest and MultiTermVectorsRequest can use Set to reduce duplicate checkPermission eg: if (request instanceof BulkRequest) { [@SuppressWarnings|https://github.com/SuppressWarnings]("rawtypes") List<DocWriteRequest> requests = ((BulkRequest) request).requests(); Set indexSets = new HashSet<>(); if (CollectionUtils.isNotEmpty(requests)) { for (DocWriteRequest docWriteRequest : requests) { indexSets.add(docWriteRequest.index()); } indexs.addAll(indexSets); return indexs; } } problem: # ES plugin still missing implemention for some ES request, like ClusterHealthRequest, NodesInfoRequest which will lead to indexs.add("*"), checkPermission will be error # for GET /_search , GET /_cat/indices and GET /_alias these request will return empty List indexs, which will cause skip checkPermission -- This message was sent by Atlassian Jira (v8.3.4#803005)