diff --git a/src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java b/src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java index 74ec631c5b..73955460eb 100644 --- a/src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java +++ b/src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java @@ -721,7 +721,7 @@ public IndexMatcherAndPermissions getIndexMatcherAndPermissions( IndexNameExpressionResolver resolver, ClusterService cs ) { - if ("*".equals(getUnresolvedIndexPattern(user))) { + if ("*".equals(indexPattern)) { return new IndexMatcherAndPermissions(ALL_INDICES, perms); } return new IndexMatcherAndPermissions(attemptResolveIndexNames(user, resolver, cs), perms); @@ -1011,7 +1011,7 @@ private static boolean impliesTypePerm( IndexMatcherAndPermissions[] indexMatcherAndPermissions; if (resolved.isLocalAll()) { indexMatcherAndPermissions = ipatterns.stream() - .filter(indexPattern -> "*".equals(indexPattern.getUnresolvedIndexPattern(user))) + .filter(indexPattern -> "*".equals(indexPattern.indexPattern)) .map(p -> p.getIndexMatcherAndPermissions(user, resolver, cs)) .toArray(IndexMatcherAndPermissions[]::new); } else {