diff --git a/src/main/java/org/opensearch/security/configuration/DlsFlsValveImpl.java b/src/main/java/org/opensearch/security/configuration/DlsFlsValveImpl.java index c4bfa54c31..3bac72890b 100644 --- a/src/main/java/org/opensearch/security/configuration/DlsFlsValveImpl.java +++ b/src/main/java/org/opensearch/security/configuration/DlsFlsValveImpl.java @@ -83,8 +83,6 @@ import org.opensearch.security.support.ConfigConstants; import org.opensearch.threadpool.ThreadPool; -import static org.opensearch.security.privileges.PrivilegesEvaluator.isIndexPerm; - public class DlsFlsValveImpl implements DlsFlsRequestValve { private static final String MAP_EXECUTION_HINT = "map"; @@ -137,7 +135,7 @@ public DlsFlsValveImpl( */ @Override public boolean invoke(PrivilegesEvaluationContext context, final ActionListener listener) { - if (!isIndexPerm(context.getAction())) { + if (!context.getAction().startsWith("indices:")) { return true; } diff --git a/src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java b/src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java index 56a60bc35d..36666972ec 100644 --- a/src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java +++ b/src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java @@ -709,10 +709,6 @@ public static boolean isClusterPerm(String action0) { || (action0.equals(RenderSearchTemplateAction.NAME))); } - public static boolean isIndexPerm(String action0) { - return (action0.startsWith("indices:") && !isClusterPerm(action0)); - } - @SuppressWarnings("unchecked") private boolean checkFilteredAliases(Resolved requestedResolved, String action, boolean isDebugEnabled) { final String faMode = dcm.getFilteredAliasMode();// getConfigSettings().dynamic.filtered_alias_mode;