Skip to content

Commit 910aea9

Browse files
Remove debug println.
Signed-off-by: Finn Carroll <carrofin@amazon.com>
1 parent 8d10e01 commit 910aea9

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/org/opensearch/security/privileges/SystemIndexAccessEvaluator.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949
import org.opensearch.security.user.User;
5050
import org.opensearch.tasks.Task;
5151

52-
import static org.opensearch.security.privileges.PrivilegesEvaluator.isClusterPerm;
53-
5452
/**
5553
* This class performs authorization on requests targeting system indices
5654
* NOTE:
@@ -304,8 +302,9 @@ private void evaluateSystemIndicesAccess(
304302
}
305303
}
306304

305+
// cluster actions will return true for requestedResolved.isLocalAll()
307306
// the following section should only be run for index actions
308-
if (this.isSystemIndexEnabled && user.isPluginUser() && !isClusterPerm(action)) {
307+
if (this.isSystemIndexEnabled && user.isPluginUser() && !requestedResolved.isLocalAll()) {
309308
Set<String> matchingPluginIndices = SystemIndexRegistry.matchesPluginSystemIndexPattern(
310309
user.getName().replace("plugin:", ""),
311310
requestedResolved.getAllIndices()
@@ -316,9 +315,6 @@ private void evaluateSystemIndicesAccess(
316315
presponse.markComplete();
317316
return;
318317
} else {
319-
System.out.println("Plugin user: " + user.getName() + " requested indices: " + requestedResolved.getAllIndices());
320-
System.out.println("action: " + action);
321-
Thread.dumpStack();
322318
Set<String> matchingSystemIndices = SystemIndexRegistry.matchesSystemIndexPattern(requestedResolved.getAllIndices());
323319
matchingSystemIndices.removeAll(matchingPluginIndices);
324320
// See if request matches other system indices not belong to the plugin

0 commit comments

Comments
 (0)