Skip to content

Commit

Permalink
Disable fs monitoring for integrationTest
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Dec 5, 2024
1 parent de9ecf1 commit b30b733
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ 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,6 +46,7 @@ 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,6 +36,7 @@ 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,7 +48,9 @@ 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
ConfigConstants.PBKDF2,
"monitor.fs.health.enabled",
false
)
)
.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")
Map.of("plugins.security.ssl.http.clientauth_mode", "OPTIONAL", "monitor.fs.health.enabled", false)
)
.clusterManager(ClusterManager.THREE_CLUSTER_MANAGERS)
.anonymousAuth(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ 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,7 +85,12 @@ 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()))
Map.of(
"plugins.security.restapi.roles_enabled",
List.of("user_" + ADMIN_USER.getName() + "__" + ALL_ACCESS.getName()),
"monitor.fs.health.enabled",
false
)
)
.audit(
new AuditConfiguration(true).compliance(new AuditCompliance().enabled(true))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
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 @@ -64,6 +65,7 @@ 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,7 +122,9 @@ 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)
List.of(USER_SPOCK),
"monitor.fs.health.enabled",
false
);

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,7 +134,9 @@ private static OnBehalfOfConfig defaultOnBehalfOfConfig() {
SECURITY_RESTAPI_ADMIN_ENABLED,
true,
"plugins.security.unsupported.restapi.allow_securityconfig_modification",
true
true,
"monitor.fs.health.enabled",
false
)
)
.authc(AUTHC_HTTPBASIC_INTERNAL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ 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,6 +11,8 @@

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 @@ -75,6 +77,7 @@ 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,6 +11,8 @@

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 @@ -72,6 +74,7 @@ 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,6 +90,7 @@ 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 b30b733

Please sign in to comment.