diff --git a/src/main/java/org/opensearch/security/configuration/DlsFilterLevelActionHandler.java b/src/main/java/org/opensearch/security/configuration/DlsFilterLevelActionHandler.java index d2c02630e8..c0ecd6b9be 100644 --- a/src/main/java/org/opensearch/security/configuration/DlsFilterLevelActionHandler.java +++ b/src/main/java/org/opensearch/security/configuration/DlsFilterLevelActionHandler.java @@ -115,7 +115,7 @@ public static boolean handle(String action, ActionRequest request, ActionListene private final ThreadContext threadContext; private final IndexNameExpressionResolver resolver; private BoolQueryBuilder filterLevelQueryBuilder; - private DocumentAllowList documentWhitelist; + private DocumentAllowList documentAllowlist; DlsFilterLevelActionHandler(String action, ActionRequest request, ActionListener listener, EvaluatedDlsFlsConfig evaluatedDlsFlsConfig, Resolved resolved, Client nodeClient, ClusterService clusterService, IndicesService indicesService, @@ -178,8 +178,8 @@ private boolean handle() { } private boolean handle(SearchRequest searchRequest, StoredContext ctx) { - if (documentWhitelist != null) { - documentWhitelist.applyTo(threadContext); + if (documentAllowlist != null) { + documentAllowlist.applyTo(threadContext); } String localClusterAlias = LOCAL_CLUSTER_ALIAS_GETTER.apply(searchRequest); @@ -225,8 +225,8 @@ public void onFailure(Exception e) { } private boolean handle(GetRequest getRequest, StoredContext ctx) { - if (documentWhitelist != null) { - documentWhitelist.applyTo(threadContext); + if (documentAllowlist != null) { + documentAllowlist.applyTo(threadContext); } SearchRequest searchRequest = new SearchRequest(getRequest.indices()); @@ -270,8 +270,8 @@ public void onFailure(Exception e) { } private boolean handle(MultiGetRequest multiGetRequest, StoredContext ctx) { - if (documentWhitelist != null) { - documentWhitelist.applyTo(threadContext); + if (documentAllowlist != null) { + documentAllowlist.applyTo(threadContext); } Map> idsGroupedByIndex = multiGetRequest.getItems().stream() @@ -395,7 +395,7 @@ private boolean createQueryExtension(String localClusterAlias) throws IOExceptio Map> filterLevelQueries = evaluatedDlsFlsConfig.getDlsQueriesByIndex(); BoolQueryBuilder dlsQueryBuilder = QueryBuilders.boolQuery().minimumShouldMatch(1); - DocumentAllowList documentWhitelist = new DocumentAllowList(); + DocumentAllowList documentAllowlist = new DocumentAllowList(); int queryCount = 0; @@ -450,7 +450,7 @@ private boolean createQueryExtension(String localClusterAlias) throws IOExceptio for (QueryBuilder queryBuilder : queryBuilders) { TermsQueryBuilder termsQueryBuilder = (TermsQueryBuilder) queryBuilder; - documentWhitelist.add(termsQueryBuilder.termsLookup().index(), termsQueryBuilder.termsLookup().id()); + documentAllowlist.add(termsQueryBuilder.termsLookup().index(), termsQueryBuilder.termsLookup().id()); } } @@ -461,7 +461,7 @@ private boolean createQueryExtension(String localClusterAlias) throws IOExceptio return false; } else { this.filterLevelQueryBuilder = dlsQueryBuilder; - this.documentWhitelist = documentWhitelist; + this.documentAllowlist = documentAllowlist; return true; } }