diff --git a/CHANGELOG.md b/CHANGELOG.md
index 211e3cca58..6f1fa2b69a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Fix test failure related to change in core to add content-encoding to response headers ([#5897](https://github.com/opensearch-project/security/pull/5897))
### Refactoring
+- Refactor plugin system index tests to use parameterized test pattern ([#5895](https://github.com/opensearch-project/security/pull/5895))
### Maintenance
- Bump `spring_version` from 7.0.1 to 7.0.2 ([#5852](https://github.com/opensearch-project/security/pull/5852))
diff --git a/src/integrationTest/java/org/opensearch/security/privileges/int_tests/AbstractPluginSystemIndexIntTests.java b/src/integrationTest/java/org/opensearch/security/privileges/int_tests/PluginSystemIndexIntTests.java
similarity index 73%
rename from src/integrationTest/java/org/opensearch/security/privileges/int_tests/AbstractPluginSystemIndexIntTests.java
rename to src/integrationTest/java/org/opensearch/security/privileges/int_tests/PluginSystemIndexIntTests.java
index 4b78fd8d14..e626c57ecf 100644
--- a/src/integrationTest/java/org/opensearch/security/privileges/int_tests/AbstractPluginSystemIndexIntTests.java
+++ b/src/integrationTest/java/org/opensearch/security/privileges/int_tests/PluginSystemIndexIntTests.java
@@ -9,10 +9,20 @@
*/
package org.opensearch.security.privileges.int_tests;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
import org.junit.Before;
+import org.junit.ClassRule;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
import org.opensearch.core.rest.RestStatus;
+import org.opensearch.security.systemindex.sampleplugin.SystemIndexPlugin1;
+import org.opensearch.security.systemindex.sampleplugin.SystemIndexPlugin2;
import org.opensearch.test.framework.cluster.LocalCluster;
import org.opensearch.test.framework.cluster.TestRestClient;
import org.opensearch.test.framework.cluster.TestRestClient.HttpResponse;
@@ -23,35 +33,58 @@
import static org.hamcrest.Matchers.equalTo;
import static org.opensearch.security.systemindex.sampleplugin.SystemIndexPlugin1.SYSTEM_INDEX_1;
import static org.opensearch.security.systemindex.sampleplugin.SystemIndexPlugin2.SYSTEM_INDEX_2;
+import static org.opensearch.test.framework.TestSecurityConfig.AuthcDomain.AUTHC_HTTPBASIC_INTERNAL;
import static org.opensearch.test.framework.TestSecurityConfig.User.USER_ADMIN;
-/**
- * Abstract base class defining the contract for plugin system index access privileges.
- *
+/*
* This class serves as a single source of truth for the privilege rules governing plugin users'
* access to their own system indices. It enforces consistency across different cluster configurations
* (e.g., with and without explicit system index permission enabled) by defining the complete set of
* tests that must pass in any environment.
- *
- * Concrete implementations, such as {@link PluginSystemIndexPermissionEnabledIntTests} and
- * {@link PluginSystemIndexPermissionDisabledIntTests}, provide the specific {@link LocalCluster}
- * environments in which these contract tests are executed. This design leverages polymorphism
- * to dynamically bind the test logic to different runtime configurations.
*/
-public abstract class AbstractPluginSystemIndexIntTests {
+@RunWith(Parameterized.class)
+public class PluginSystemIndexIntTests {
+
+ final LocalCluster cluster;
+ final ClusterConfig clusterConfig;
+
+ static LocalCluster.Builder clusterBuilder() {
+ return new LocalCluster.Builder().singleNode()
+ .authc(AUTHC_HTTPBASIC_INTERNAL)
+ .users(USER_ADMIN)
+ .plugin(SystemIndexPlugin1.class, SystemIndexPlugin2.class);
+ }
+
+ @ClassRule
+ public static final ClusterConfig.ClusterInstances clusters = new ClusterConfig.ClusterInstances(
+ PluginSystemIndexIntTests::clusterBuilder
+ );
- protected abstract LocalCluster getCluster();
+ @Parameters(name = "{0}")
+ public static Collection