Skip to content

Commit d1beb01

Browse files
Disable queryable built-in roles feature for core and datastream YAML tests (#121541)
This PR disables the "queryable built-in roles" feature for the `CoreWithSecurityClientYamlTestSuiteIT` and `DataStreamsClientYamlTestSuiteIT` YAML test suites. The feature was enabled by default in the #120323 PR, which asynchronously creates the `.security` index after cluster formation and indexes all built-in roles. The asynchronous creation of the `.security` index introduces non-deterministic behavior in our YAML tests. Since these test suites are not intended to verify the queryable built-in roles functionality, having the feature enabled introduced flakiness and unnecessary complexity to handle `.security` in existing tests. These tests would have to exclude the `.security` index in some way (by adjusting permissions or API calls), and in the end cleanup (delete) the `.security` index. This simply adds overhead without much gain. The feature is already test covered by `XPackRestIT` and other integration/REST tests, disabling it here would not compromise test coverage. Instead, it ensures these suites remain deterministic and focused on the behaviors they were designed to verify. Resolves #121536 Resolves #121513 Resolves #121484 Resolves #121478 Resolves #121290 Resolves #121246 Resolves #121242 Resolves #121238 Resolves #121186 Resolves #121131 Resolves #121130 Resolves #121128 Resolves #121014 Resolves #120965 Resolves #120920 Resolves #120890
1 parent fdbd079 commit d1beb01

File tree

5 files changed

+4
-47
lines changed

5 files changed

+4
-47
lines changed

modules/data-streams/src/yamlRestTest/java/org/elasticsearch/datastreams/DataStreamsClientYamlTestSuiteIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ private static ElasticsearchCluster createCluster() {
4949
.feature(FAILURE_STORE_ENABLED)
5050
.setting("xpack.security.enabled", "true")
5151
.keystore("bootstrap.password", "x-pack-test-password")
52-
.user("x_pack_rest_user", "x-pack-test-password");
52+
.user("x_pack_rest_user", "x-pack-test-password")
53+
.systemProperty("es.queryable_built_in_roles_enabled", "false");
5354
if (initTestSeed().nextBoolean()) {
5455
clusterBuilder.setting("xpack.license.self_generated.type", "trial");
5556
}

muted-tests.yml

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,6 @@ tests:
214214
issue: https://github.com/elastic/elasticsearch/issues/120810
215215
- class: org.elasticsearch.indices.mapping.UpdateMappingIntegrationIT
216216
issue: https://github.com/elastic/elasticsearch/issues/116126
217-
- class: org.elasticsearch.datastreams.DataStreamsClientYamlTestSuiteIT
218-
method: test {p0=data_stream/140_data_stream_aliases/Create data stream aliases using wildcard expression}
219-
issue: https://github.com/elastic/elasticsearch/issues/120890
220217
- class: org.elasticsearch.xpack.security.authc.service.ServiceAccountIT
221218
method: testAuthenticateShouldNotFallThroughInCaseOfFailure
222219
issue: https://github.com/elastic/elasticsearch/issues/120902
@@ -226,9 +223,6 @@ tests:
226223
- class: org.elasticsearch.packaging.test.DockerTests
227224
method: test140CgroupOsStatsAreAvailable
228225
issue: https://github.com/elastic/elasticsearch/issues/120914
229-
- class: org.elasticsearch.datastreams.DataStreamsClientYamlTestSuiteIT
230-
method: test {p0=data_stream/140_data_stream_aliases/Create data stream alias}
231-
issue: https://github.com/elastic/elasticsearch/issues/120920
232226
- class: org.elasticsearch.xpack.security.FileSettingsRoleMappingsRestartIT
233227
method: testReservedStatePersistsOnRestart
234228
issue: https://github.com/elastic/elasticsearch/issues/120923
@@ -244,12 +238,6 @@ tests:
244238
- class: org.elasticsearch.action.search.SearchProgressActionListenerIT
245239
method: testSearchProgressWithQuery
246240
issue: https://github.com/elastic/elasticsearch/issues/120994
247-
- class: org.elasticsearch.datastreams.DataStreamsClientYamlTestSuiteIT
248-
method: test {p0=data_stream/80_resolve_index_data_streams/Resolve index with hidden and closed indices}
249-
issue: https://github.com/elastic/elasticsearch/issues/120965
250-
- class: org.elasticsearch.datastreams.DataStreamsClientYamlTestSuiteIT
251-
method: test {p0=data_stream/140_data_stream_aliases/Create data stream alias with filter}
252-
issue: https://github.com/elastic/elasticsearch/issues/121014
253241
- class: org.elasticsearch.xpack.security.profile.ProfileIntegTests
254242
method: testSuggestProfilesWithName
255243
issue: https://github.com/elastic/elasticsearch/issues/121022
@@ -271,9 +259,6 @@ tests:
271259
- class: org.elasticsearch.xpack.security.authc.jwt.JwtRealmSingleNodeTests
272260
method: testActivateProfileForJWT
273261
issue: https://github.com/elastic/elasticsearch/issues/120983
274-
- class: org.elasticsearch.xpack.security.CoreWithSecurityClientYamlTestSuiteIT
275-
method: test {yaml=cluster.health/20_request_timeout/cluster health request timeout waiting for active shards}
276-
issue: https://github.com/elastic/elasticsearch/issues/121130
277262
- class: org.elasticsearch.xpack.security.profile.ProfileIntegTests
278263
method: testProfileIndexAutoCreation
279264
issue: https://github.com/elastic/elasticsearch/issues/120987
@@ -291,21 +276,9 @@ tests:
291276
- class: org.elasticsearch.xpack.security.profile.ProfileIntegTests
292277
method: testSetEnabled
293278
issue: https://github.com/elastic/elasticsearch/issues/121183
294-
- class: org.elasticsearch.xpack.security.CoreWithSecurityClientYamlTestSuiteIT
295-
method: test {yaml=cat.aliases/10_basic/Simple alias}
296-
issue: https://github.com/elastic/elasticsearch/issues/121186
297279
- class: org.elasticsearch.xpack.ml.integration.ClassificationIT
298280
method: testWithDatastreams
299281
issue: https://github.com/elastic/elasticsearch/issues/121236
300-
- class: org.elasticsearch.xpack.security.CoreWithSecurityClientYamlTestSuiteIT
301-
method: test {yaml=nodes.stats/11_indices_metrics/Metric - blank for indices mappings}
302-
issue: https://github.com/elastic/elasticsearch/issues/121238
303-
- class: org.elasticsearch.xpack.security.CoreWithSecurityClientYamlTestSuiteIT
304-
method: test {yaml=indices.get_alias/10_basic/Get aliases via /_alias/_all}
305-
issue: https://github.com/elastic/elasticsearch/issues/121242
306-
- class: org.elasticsearch.xpack.security.CoreWithSecurityClientYamlTestSuiteIT
307-
method: test {yaml=cluster.stats/10_basic/Sparse vector stats}
308-
issue: https://github.com/elastic/elasticsearch/issues/121246
309282
- class: org.elasticsearch.xpack.remotecluster.RemoteClusterSecurityEsqlIT
310283
method: testCrossClusterAsyncQueryStop
311284
issue: https://github.com/elastic/elasticsearch/issues/121249
@@ -338,9 +311,6 @@ tests:
338311
- class: org.elasticsearch.smoketest.DocsClientYamlTestSuiteIT
339312
method: test {yaml=reference/index-modules/slowlog/line_102}
340313
issue: https://github.com/elastic/elasticsearch/issues/121288
341-
- class: org.elasticsearch.xpack.security.CoreWithSecurityClientYamlTestSuiteIT
342-
method: test {yaml=indices.get_alias/10_basic/Get aliases via /*/_alias/}
343-
issue: https://github.com/elastic/elasticsearch/issues/121290
344314
- class: org.elasticsearch.env.NodeEnvironmentTests
345315
method: testGetBestDowngradeVersion
346316
issue: https://github.com/elastic/elasticsearch/issues/121316
@@ -379,15 +349,9 @@ tests:
379349
- class: org.elasticsearch.xpack.security.authc.jwt.JwtRealmSingleNodeTests
380350
method: testGrantApiKeyForJWT
381351
issue: https://github.com/elastic/elasticsearch/issues/121039
382-
- class: org.elasticsearch.xpack.security.CoreWithSecurityClientYamlTestSuiteIT
383-
method: test {yaml=cluster.health/10_basic/cluster health basic test}
384-
issue: https://github.com/elastic/elasticsearch/issues/121478
385352
- class: org.elasticsearch.xpack.security.profile.ProfileIntegTests
386353
method: testGetUsersWithProfileUid
387354
issue: https://github.com/elastic/elasticsearch/issues/121483
388-
- class: org.elasticsearch.xpack.security.CoreWithSecurityClientYamlTestSuiteIT
389-
method: test {yaml=cat.aliases/10_basic/Empty cluster}
390-
issue: https://github.com/elastic/elasticsearch/issues/121484
391355
- class: org.elasticsearch.xpack.transform.checkpoint.TransformCCSCanMatchIT
392356
method: testTransformLifecycle_RangeQueryThatMatchesNoShards
393357
issue: https://github.com/elastic/elasticsearch/issues/121480
@@ -403,9 +367,6 @@ tests:
403367
- class: org.elasticsearch.xpack.core.ilm.SetSingleNodeAllocateStepTests
404368
method: testPerformActionSomeShardsOnlyOnNewNodesButNewNodesInvalidAttrs
405369
issue: https://github.com/elastic/elasticsearch/issues/121495
406-
- class: org.elasticsearch.xpack.security.CoreWithSecurityClientYamlTestSuiteIT
407-
method: test {yaml=cat.aliases/40_hidden/Test cat aliases output with a visible index with a hidden alias}
408-
issue: https://github.com/elastic/elasticsearch/issues/121128
409370
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
410371
method: test {p0=search.vectors/42_knn_search_int4_flat/Vector similarity with filter only}
411372
issue: https://github.com/elastic/elasticsearch/issues/121412
@@ -414,12 +375,6 @@ tests:
414375
- class: org.elasticsearch.xpack.ml.integration.ClassificationIT
415376
method: testDependentVariableIsAliasToKeyword
416377
issue: https://github.com/elastic/elasticsearch/issues/121492
417-
- class: org.elasticsearch.xpack.security.CoreWithSecurityClientYamlTestSuiteIT
418-
method: test {yaml=cat.aliases/10_basic/Complex alias}
419-
issue: https://github.com/elastic/elasticsearch/issues/121513
420-
- class: org.elasticsearch.xpack.security.CoreWithSecurityClientYamlTestSuiteIT
421-
method: test {yaml=snapshot.create/10_basic/Create a snapshot for missing index}
422-
issue: https://github.com/elastic/elasticsearch/issues/121536
423378
- class: org.elasticsearch.xpack.esql.action.CrossClusterQueryUnavailableRemotesIT
424379
method: testRemoteOnlyCCSAgainstDisconnectedRemoteWithSkipUnavailableTrue
425380
issue: https://github.com/elastic/elasticsearch/issues/121578

x-pack/plugin/ml/qa/ml-with-security/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,4 +258,5 @@ testClusters.configureEach {
258258
user username: "no_ml", password: "x-pack-test-password", role: "minimal"
259259
setting 'xpack.license.self_generated.type', 'trial'
260260
setting 'xpack.security.enabled', 'true'
261+
systemProperty 'es.queryable_built_in_roles_enabled', 'false'
261262
}

x-pack/qa/core-rest-tests-with-security/src/yamlRestTest/java/org/elasticsearch/xpack/security/CoreWithSecurityClientYamlTestSuiteIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public class CoreWithSecurityClientYamlTestSuiteIT extends ESClientYamlSuiteTest
4646
.setting("xpack.ml.enabled", "false")
4747
.setting("xpack.license.self_generated.type", "trial")
4848
.setting("xpack.security.autoconfiguration.enabled", "false")
49+
.systemProperty("es.queryable_built_in_roles_enabled", "false")
4950
.user(USER, PASS)
5051
.feature(FeatureFlag.TIME_SERIES_MODE)
5152
.feature(FeatureFlag.SUB_OBJECTS_AUTO_ENABLED)

x-pack/qa/rolling-upgrade/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ buildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
4747
testDistribution = "DEFAULT"
4848
versions = [oldVersion, project.version]
4949
numberOfNodes = 3
50-
systemProperty 'es.queryable_built_in_roles_enabled', 'true'
5150
systemProperty 'ingest.geoip.downloader.enabled.default', 'true'
5251
//we don't want to hit real service from each test
5352
systemProperty 'ingest.geoip.downloader.endpoint.default', 'http://invalid.endpoint'

0 commit comments

Comments
 (0)