diff --git a/x-pack/plugin/ml/build.gradle b/x-pack/plugin/ml/build.gradle index db51f5525622b..de4857860f561 100644 --- a/x-pack/plugin/ml/build.gradle +++ b/x-pack/plugin/ml/build.gradle @@ -70,6 +70,7 @@ dependencies { testImplementation project(':modules:mapper-extras') // This should not be here testImplementation(testArtifact(project(xpackModule('security')))) + testImplementation project(path: xpackModule('wildcard')) // ml deps api project(':libs:elasticsearch-grok') api "org.apache.commons:commons-math3:3.6.1" diff --git a/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/AutodetectResultProcessorIT.java b/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/AutodetectResultProcessorIT.java index d51775e55d42c..3a5531a28c13d 100644 --- a/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/AutodetectResultProcessorIT.java +++ b/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/AutodetectResultProcessorIT.java @@ -78,6 +78,7 @@ import org.elasticsearch.xpack.ml.job.results.ModelPlotTests; import org.elasticsearch.xpack.ml.notifications.AnomalyDetectionAuditor; import org.elasticsearch.xpack.ml.utils.persistence.ResultsPersisterService; +import org.elasticsearch.xpack.wildcard.Wildcard; import org.junit.After; import org.junit.Before; @@ -137,7 +138,8 @@ protected Collection> getPlugins() { MockPainlessScriptEngine.TestPlugin.class, // ILM is required for .ml-state template index settings IndexLifecycle.class, - MapperExtrasPlugin.class + MapperExtrasPlugin.class, + Wildcard.class ); } diff --git a/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/DatafeedCcsIT.java b/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/DatafeedCcsIT.java index d200cc80c709f..19325a55f75d1 100644 --- a/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/DatafeedCcsIT.java +++ b/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/DatafeedCcsIT.java @@ -42,6 +42,7 @@ import org.elasticsearch.xpack.ml.LocalStateMachineLearning; import org.elasticsearch.xpack.ml.support.BaseMlIntegTestCase; import org.elasticsearch.xpack.shutdown.ShutdownPlugin; +import org.elasticsearch.xpack.wildcard.Wildcard; import java.util.Collection; import java.util.List; @@ -86,8 +87,9 @@ protected Collection> nodePlugins(String clusterAlias) { IndexLifecycle.class, // Deprecation warnings go to a data stream, if we ever cause a deprecation warning the data streams plugin is required DataStreamsPlugin.class, - // To remove errors from parsing built in templates that contain scaled_float - MapperExtrasPlugin.class + // To remove errors from parsing built in templates that contain scaled_float or wildcard + MapperExtrasPlugin.class, + Wildcard.class ); } diff --git a/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/MlPartialEnablementAdOnlyIT.java b/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/MlPartialEnablementAdOnlyIT.java index bddeda96f0f43..6ae6d03310e2f 100644 --- a/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/MlPartialEnablementAdOnlyIT.java +++ b/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/MlPartialEnablementAdOnlyIT.java @@ -21,6 +21,7 @@ import org.elasticsearch.xpack.ilm.IndexLifecycle; import org.elasticsearch.xpack.ml.LocalStateMachineLearningAdOnly; import org.elasticsearch.xpack.ml.MlSingleNodeTestCase; +import org.elasticsearch.xpack.wildcard.Wildcard; import java.util.Collection; @@ -36,8 +37,9 @@ protected Collection> getPlugins() { MockPainlessScriptEngine.TestPlugin.class, // ILM is required for .ml-state template index settings IndexLifecycle.class, - // Needed for scaled_float - MapperExtrasPlugin.class + // Needed for scaled_float and wildcard fields + MapperExtrasPlugin.class, + Wildcard.class ); } diff --git a/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/MlPartialEnablementDfaOnlyIT.java b/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/MlPartialEnablementDfaOnlyIT.java index 047cdb5e3b583..d083e848b5130 100644 --- a/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/MlPartialEnablementDfaOnlyIT.java +++ b/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/MlPartialEnablementDfaOnlyIT.java @@ -21,6 +21,7 @@ import org.elasticsearch.xpack.ilm.IndexLifecycle; import org.elasticsearch.xpack.ml.LocalStateMachineLearningDfaOnly; import org.elasticsearch.xpack.ml.MlSingleNodeTestCase; +import org.elasticsearch.xpack.wildcard.Wildcard; import java.util.Collection; @@ -36,8 +37,9 @@ protected Collection> getPlugins() { MockPainlessScriptEngine.TestPlugin.class, // ILM is required for .ml-state template index settings IndexLifecycle.class, - // Needed for scaled_float - MapperExtrasPlugin.class + // Needed for scaled_float and wildcard fields + MapperExtrasPlugin.class, + Wildcard.class ); } diff --git a/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/MlPartialEnablementNlpOnlyIT.java b/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/MlPartialEnablementNlpOnlyIT.java index 81b7daf56645c..c238dd6cd156a 100644 --- a/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/MlPartialEnablementNlpOnlyIT.java +++ b/x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/MlPartialEnablementNlpOnlyIT.java @@ -19,6 +19,7 @@ import org.elasticsearch.xpack.ilm.IndexLifecycle; import org.elasticsearch.xpack.ml.LocalStateMachineLearningNlpOnly; import org.elasticsearch.xpack.ml.MlSingleNodeTestCase; +import org.elasticsearch.xpack.wildcard.Wildcard; import java.util.Collection; @@ -34,8 +35,9 @@ protected Collection> getPlugins() { MockPainlessScriptEngine.TestPlugin.class, // ILM is required for .ml-state template index settings IndexLifecycle.class, - // Needed for scaled_float - MapperExtrasPlugin.class + // Needed for scaled_float and wildcard fields + MapperExtrasPlugin.class, + Wildcard.class ); } diff --git a/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlSingleNodeTestCase.java b/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlSingleNodeTestCase.java index 2883a1c6fd014..a7e54c8957418 100644 --- a/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlSingleNodeTestCase.java +++ b/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/MlSingleNodeTestCase.java @@ -38,6 +38,7 @@ import org.elasticsearch.xpack.ilm.IndexLifecycle; import org.elasticsearch.xpack.ml.aggs.correlation.CorrelationNamedContentProvider; import org.elasticsearch.xpack.ml.inference.modelsize.MlModelSizeNamedXContentProvider; +import org.elasticsearch.xpack.wildcard.Wildcard; import java.util.ArrayList; import java.util.Collection; @@ -99,7 +100,9 @@ protected Collection> getPlugins() { // ILM is required for .ml-state template index settings IndexLifecycle.class, // Needed for scaled_float - MapperExtrasPlugin.class + MapperExtrasPlugin.class, + // Needed for wildcard fields + Wildcard.class ); } diff --git a/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java b/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java index c71f14ce69752..26ee875049c21 100644 --- a/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java +++ b/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java @@ -82,6 +82,7 @@ import org.elasticsearch.xpack.ml.MlSingleNodeTestCase; import org.elasticsearch.xpack.monitoring.MonitoringService; import org.elasticsearch.xpack.shutdown.ShutdownPlugin; +import org.elasticsearch.xpack.wildcard.Wildcard; import org.junit.After; import org.junit.Before; @@ -155,7 +156,8 @@ protected Collection> nodePlugins() { // Deprecation warnings go to a data stream, if we ever cause a deprecation warning the data streams plugin is required DataStreamsPlugin.class, // To remove errors from parsing build in templates that contain scaled_float - MapperExtrasPlugin.class + MapperExtrasPlugin.class, + Wildcard.class ); } diff --git a/x-pack/plugin/monitoring/build.gradle b/x-pack/plugin/monitoring/build.gradle index b4b6f3a33add2..43f7db22cc7ef 100644 --- a/x-pack/plugin/monitoring/build.gradle +++ b/x-pack/plugin/monitoring/build.gradle @@ -26,6 +26,7 @@ dependencies { testImplementation project(':modules:data-streams') testImplementation(testArtifact(project(xpackModule('core')))) testImplementation project(':modules:mapper-extras') + testImplementation project(path: xpackModule('wildcard')) } tasks.named("dependencyLicenses").configure { diff --git a/x-pack/plugin/monitoring/src/internalClusterTest/java/org/elasticsearch/xpack/monitoring/integration/MonitoringIT.java b/x-pack/plugin/monitoring/src/internalClusterTest/java/org/elasticsearch/xpack/monitoring/integration/MonitoringIT.java index de35d8e0632b0..dc55d3ccd6a10 100644 --- a/x-pack/plugin/monitoring/src/internalClusterTest/java/org/elasticsearch/xpack/monitoring/integration/MonitoringIT.java +++ b/x-pack/plugin/monitoring/src/internalClusterTest/java/org/elasticsearch/xpack/monitoring/integration/MonitoringIT.java @@ -43,6 +43,7 @@ import org.elasticsearch.xpack.monitoring.LocalStateMonitoring; import org.elasticsearch.xpack.monitoring.MonitoringService; import org.elasticsearch.xpack.monitoring.test.MockIngestPlugin; +import org.elasticsearch.xpack.wildcard.Wildcard; import java.io.IOException; import java.lang.Thread.State; @@ -92,7 +93,13 @@ protected Settings nodeSettings() { @Override protected Collection> getPlugins() { - return Arrays.asList(LocalStateMonitoring.class, MockIngestPlugin.class, CommonAnalysisPlugin.class, MapperExtrasPlugin.class); + return List.of( + LocalStateMonitoring.class, + MockIngestPlugin.class, + CommonAnalysisPlugin.class, + MapperExtrasPlugin.class, + Wildcard.class + ); } private String createBulkEntity() { diff --git a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/test/MonitoringIntegTestCase.java b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/test/MonitoringIntegTestCase.java index 9532af6471240..bcf942292a1f8 100644 --- a/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/test/MonitoringIntegTestCase.java +++ b/x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/test/MonitoringIntegTestCase.java @@ -24,6 +24,7 @@ import org.elasticsearch.xpack.monitoring.MonitoringService; import org.elasticsearch.xpack.monitoring.MonitoringTemplateRegistry; import org.elasticsearch.xpack.monitoring.exporter.ClusterAlertsUtil; +import org.elasticsearch.xpack.wildcard.Wildcard; import org.junit.After; import org.junit.Before; @@ -75,7 +76,8 @@ protected Collection> nodePlugins() { MockClusterAlertScriptEngine.TestPlugin.class, MockIngestPlugin.class, CommonAnalysisPlugin.class, - MapperExtrasPlugin.class + MapperExtrasPlugin.class, + Wildcard.class ); } diff --git a/x-pack/plugin/security/build.gradle b/x-pack/plugin/security/build.gradle index 728eb6fd11baa..09ce0bbf434b0 100644 --- a/x-pack/plugin/security/build.gradle +++ b/x-pack/plugin/security/build.gradle @@ -22,6 +22,7 @@ dependencies { testImplementation project(path: xpackModule('ilm')) testImplementation project(path: xpackModule('monitoring')) testImplementation project(path: xpackModule('spatial')) + testImplementation project(path: xpackModule('wildcard')) testImplementation project(path: ':modules:legacy-geo') testImplementation project(path: ':modules:percolator') testImplementation project(path: xpackModule('sql:sql-action')) diff --git a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamLifecycleServiceRuntimeSecurityIT.java b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamLifecycleServiceRuntimeSecurityIT.java index e9f912e3b6245..5c6f0ec3b699b 100644 --- a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamLifecycleServiceRuntimeSecurityIT.java +++ b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamLifecycleServiceRuntimeSecurityIT.java @@ -29,6 +29,7 @@ import org.elasticsearch.datastreams.lifecycle.DataStreamLifecycleService; import org.elasticsearch.index.Index; import org.elasticsearch.index.mapper.DateFieldMapper; +import org.elasticsearch.index.mapper.extras.MapperExtrasPlugin; import org.elasticsearch.indices.ExecutorNames; import org.elasticsearch.indices.SystemDataStreamDescriptor; import org.elasticsearch.plugins.Plugin; @@ -38,6 +39,7 @@ import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.xcontent.XContentType; import org.elasticsearch.xpack.security.LocalStateSecurity; +import org.elasticsearch.xpack.wildcard.Wildcard; import java.io.IOException; import java.util.Collection; @@ -70,7 +72,13 @@ public class DataStreamLifecycleServiceRuntimeSecurityIT extends SecurityIntegTe @Override protected Collection> nodePlugins() { - return List.of(LocalStateSecurity.class, DataStreamsPlugin.class, SystemDataStreamTestPlugin.class); + return List.of( + LocalStateSecurity.class, + DataStreamsPlugin.class, + SystemDataStreamTestPlugin.class, + MapperExtrasPlugin.class, + Wildcard.class + ); } @Override diff --git a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamSecurityIT.java b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamSecurityIT.java index 12c20d78656d2..d711fe4639fe6 100644 --- a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamSecurityIT.java +++ b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamSecurityIT.java @@ -30,6 +30,7 @@ import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.transport.netty4.Netty4Plugin; import org.elasticsearch.xpack.security.LocalStateSecurity; +import org.elasticsearch.xpack.wildcard.Wildcard; import java.util.Collection; import java.util.List; @@ -47,7 +48,7 @@ public class DataStreamSecurityIT extends SecurityIntegTestCase { @Override protected Collection> nodePlugins() { - return List.of(LocalStateSecurity.class, Netty4Plugin.class, MapperExtrasPlugin.class, DataStreamsPlugin.class); + return List.of(LocalStateSecurity.class, Netty4Plugin.class, MapperExtrasPlugin.class, DataStreamsPlugin.class, Wildcard.class); } public void testRemoveGhostReference() throws Exception { diff --git a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java index 1e1f34aadfe20..f2885ba6e2478 100644 --- a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java +++ b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java @@ -75,6 +75,7 @@ import org.elasticsearch.xpack.security.LocalStateSecurity; import org.elasticsearch.xpack.spatial.SpatialPlugin; import org.elasticsearch.xpack.spatial.index.query.ShapeQueryBuilder; +import org.elasticsearch.xpack.wildcard.Wildcard; import java.util.Arrays; import java.util.Collection; @@ -117,7 +118,8 @@ protected Collection> nodePlugins() { InternalSettingsPlugin.class, SpatialPlugin.class, PercolatorPlugin.class, - MapperExtrasPlugin.class + MapperExtrasPlugin.class, + Wildcard.class ); } diff --git a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/FieldLevelSecurityTests.java b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/FieldLevelSecurityTests.java index 5877500b61783..36c3c60e199fe 100644 --- a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/FieldLevelSecurityTests.java +++ b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/FieldLevelSecurityTests.java @@ -61,6 +61,7 @@ import org.elasticsearch.xpack.security.LocalStateSecurity; import org.elasticsearch.xpack.spatial.SpatialPlugin; import org.elasticsearch.xpack.spatial.index.query.ShapeQueryBuilder; +import org.elasticsearch.xpack.wildcard.Wildcard; import java.io.IOException; import java.util.Arrays; @@ -102,7 +103,8 @@ protected Collection> nodePlugins() { InternalSettingsPlugin.class, PercolatorPlugin.class, SpatialPlugin.class, - MapperExtrasPlugin.class + MapperExtrasPlugin.class, + Wildcard.class ); } diff --git a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/FileSettingsRoleMappingsStartupIT.java b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/FileSettingsRoleMappingsStartupIT.java index 6f558cc34f299..cea831ea6d0a9 100644 --- a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/FileSettingsRoleMappingsStartupIT.java +++ b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/FileSettingsRoleMappingsStartupIT.java @@ -23,6 +23,7 @@ import org.elasticsearch.test.InternalSettingsPlugin; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.transport.netty4.Netty4Plugin; +import org.elasticsearch.xpack.wildcard.Wildcard; import java.nio.charset.StandardCharsets; import java.nio.file.Files; @@ -129,7 +130,8 @@ public Collection> nodePlugins() { ReindexPlugin.class, CommonAnalysisPlugin.class, InternalSettingsPlugin.class, - MapperExtrasPlugin.class + MapperExtrasPlugin.class, + Wildcard.class ); } diff --git a/x-pack/plugin/security/src/test/java/org/elasticsearch/test/SecuritySettingsSource.java b/x-pack/plugin/security/src/test/java/org/elasticsearch/test/SecuritySettingsSource.java index 44e522ef8709a..2d2fe2510d435 100644 --- a/x-pack/plugin/security/src/test/java/org/elasticsearch/test/SecuritySettingsSource.java +++ b/x-pack/plugin/security/src/test/java/org/elasticsearch/test/SecuritySettingsSource.java @@ -29,6 +29,7 @@ import org.elasticsearch.xpack.core.security.authc.support.Hasher; import org.elasticsearch.xpack.security.LocalStateSecurity; import org.elasticsearch.xpack.security.audit.logfile.LoggingAuditTrail; +import org.elasticsearch.xpack.wildcard.Wildcard; import java.io.IOException; import java.io.InputStream; @@ -188,7 +189,8 @@ public Collection> nodePlugins() { CommonAnalysisPlugin.class, InternalSettingsPlugin.class, MapperExtrasPlugin.class, - MainRestPlugin.class + MainRestPlugin.class, + Wildcard.class ); }