Skip to content

Commit

Permalink
Revert "Disable fs monitoring for integrationTest"
Browse files Browse the repository at this point in the history
This reverts commit b30b733.

Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Dec 5, 2024
1 parent b30b733 commit 146a7e0
Show file tree
Hide file tree
Showing 14 changed files with 5 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ protected Map<String, Object> getClusterSettings() {
clusterSettings.put(SECURITY_ALLOW_DEFAULT_INIT_SECURITYINDEX, true);
clusterSettings.put(PLUGINS_SECURITY_RESTAPI_ROLES_ENABLED, List.of("user_admin__all_access", REST_ADMIN_REST_API_ACCESS));
clusterSettings.put(SECURITY_ALLOW_DEFAULT_INIT_USE_CLUSTER_STATE, randomBoolean());
clusterSettings.put("monitor.fs.health.enabled", false);
return clusterSettings;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public abstract class AbstractConfigEntityApiIntegrationTest extends AbstractApi
protected Map<String, Object> getClusterSettings() {
Map<String, Object> clusterSettings = super.getClusterSettings();
clusterSettings.put(SECURITY_RESTAPI_ADMIN_ENABLED, true);
clusterSettings.put("monitor.fs.health.enabled", false);
return clusterSettings;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public class SslCertsRestApiIntegrationTest extends AbstractApiIntegrationTest {
protected Map<String, Object> getClusterSettings() {
Map<String, Object> clusterSettings = super.getClusterSettings();
clusterSettings.put(SECURITY_RESTAPI_ADMIN_ENABLED, true);
clusterSettings.put("monitor.fs.health.enabled", false);
return clusterSettings;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ public class PBKDF2DefaultConfigHashingTests extends HashingTests {
ConfigConstants.SECURITY_RESTAPI_ROLES_ENABLED,
List.of("user_" + ADMIN_USER.getName() + "__" + ALL_ACCESS.getName()),
ConfigConstants.SECURITY_PASSWORD_HASHING_ALGORITHM,
ConfigConstants.PBKDF2,
"monitor.fs.health.enabled",
false
ConfigConstants.PBKDF2
)
)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class CertificateAuthenticationTest {

@ClassRule
public static final LocalCluster cluster = new LocalCluster.Builder().nodeSettings(
Map.of("plugins.security.ssl.http.clientauth_mode", "OPTIONAL", "monitor.fs.health.enabled", false)
Map.of("plugins.security.ssl.http.clientauth_mode", "OPTIONAL")
)
.clusterManager(ClusterManager.THREE_CLUSTER_MANAGERS)
.anonymousAuth(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public class ExtendedProxyAuthenticationTest extends CommonProxyAuthenticationTe
).backend(new AuthenticationBackend("noop"))
)
.authc(AUTHC_HTTPBASIC_INTERNAL)
.nodeSettings(Map.of("monitor.fs.health.enabled", false))
.users(USER_ADMIN)
.roles(ROLE_ALL_INDEX_SEARCH, ROLE_PERSONAL_INDEX_SEARCH)
.rolesMapping(ROLES_MAPPING_CAPTAIN, ROLES_MAPPING_FIRST_MATE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,7 @@ public class JwtAuthenticationWithUrlParamTests {
public static final LocalCluster cluster = new LocalCluster.Builder().clusterManager(ClusterManager.SINGLENODE)
.anonymousAuth(false)
.nodeSettings(
Map.of(
"plugins.security.restapi.roles_enabled",
List.of("user_" + ADMIN_USER.getName() + "__" + ALL_ACCESS.getName()),
"monitor.fs.health.enabled",
false
)
Map.of("plugins.security.restapi.roles_enabled", List.of("user_" + ADMIN_USER.getName() + "__" + ALL_ACCESS.getName()))
)
.audit(
new AuditConfiguration(true).compliance(new AuditCompliance().enabled(true))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
package org.opensearch.security.http;

import java.util.List;
import java.util.Map;

import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
import org.junit.ClassRule;
Expand Down Expand Up @@ -65,7 +64,6 @@ public class LdapStartTlsAuthenticationTest {
public static LocalCluster cluster = new LocalCluster.Builder().testCertificates(TEST_CERTIFICATES)
.clusterManager(ClusterManager.SINGLENODE)
.anonymousAuth(false)
.nodeSettings(Map.of("monitor.fs.health.enabled", false))
.authc(
new AuthcDomain("ldap-config-id", BASIC_AUTH_DOMAIN_ORDER + 1, true).httpAuthenticator(
new HttpAuthenticator("basic").challenge(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@ public class LdapTlsAuthenticationTest {

private static final Map<String, Object> USER_IMPERSONATION_CONFIGURATION = Map.of(
"plugins.security.authcz.rest_impersonation_user." + USER_KIRK,
List.of(USER_SPOCK),
"monitor.fs.health.enabled",
false
List.of(USER_SPOCK)
);

private static final LocalCluster cluster = new LocalCluster.Builder().testCertificates(TEST_CERTIFICATES)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ private static OnBehalfOfConfig defaultOnBehalfOfConfig() {
SECURITY_RESTAPI_ADMIN_ENABLED,
true,
"plugins.security.unsupported.restapi.allow_securityconfig_modification",
true,
"monitor.fs.health.enabled",
false
true
)
)
.authc(AUTHC_HTTPBASIC_INTERNAL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public class ProxyAuthenticationTest extends CommonProxyAuthenticationTests {
).backend(new AuthenticationBackend("noop"))
)
.authc(AUTHC_HTTPBASIC_INTERNAL)
.nodeSettings(Map.of("monitor.fs.health.enabled", false))
.users(USER_ADMIN)
.roles(ROLE_ALL_INDEX_SEARCH, ROLE_PERSONAL_INDEX_SEARCH)
.rolesMapping(ROLES_MAPPING_CAPTAIN, ROLES_MAPPING_FIRST_MATE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

package org.opensearch.security.privileges;

import java.util.Map;

import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
import org.apache.http.HttpStatus;
import org.junit.ClassRule;
Expand Down Expand Up @@ -77,7 +75,6 @@ public class PrivilegesEvaluatorTest {
@ClassRule
public static LocalCluster cluster = new LocalCluster.Builder().clusterManager(ClusterManager.THREE_CLUSTER_MANAGERS)
.authc(AUTHC_HTTPBASIC_INTERNAL)
.nodeSettings(Map.of("monitor.fs.health.enabled", false))
.users(NEGATIVE_LOOKAHEAD, NEGATED_REGEX, SEARCH_TEMPLATE, RENDER_SEARCH_TEMPLATE, TestSecurityConfig.User.USER_ADMIN)
.plugin(MustacheModulePlugin.class)
.indices(R, T)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

package org.opensearch.security.rest;

import java.util.Map;

import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
import org.apache.http.HttpStatus;
import org.junit.ClassRule;
Expand Down Expand Up @@ -74,7 +72,6 @@ public class AuthZinRestLayerTests {
.users(REST_ONLY, REST_PLUS_TRANSPORT, TRANSPORT_ONLY, NO_PERM)
.plugin(CustomLegacyTestPlugin.class)
.plugin(CustomRestProtectedTestPlugin.class)
.nodeSettings(Map.of("monitor.fs.health.enabled", false))
.audit(
new AuditConfiguration(true).compliance(new AuditCompliance().enabled(true))
.filters(new AuditFilters().enabledRest(true).enabledTransport(true).resolveBulkRequests(true))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public class WhoAmITests {
new AuditConfiguration(true).compliance(new AuditCompliance().enabled(true))
.filters(new AuditFilters().enabledRest(true).enabledTransport(true).resolveBulkRequests(true))
)
.nodeSettings(Map.of("monitor.fs.health.enabled", false))
.build();

@Rule
Expand Down

0 comments on commit 146a7e0

Please sign in to comment.