From f3ec4a5208febeeca53a145861807a2dc43dac7f Mon Sep 17 00:00:00 2001
From: Michael Basnight
Date: Fri, 19 Jan 2018 23:30:17 -0600
Subject: [PATCH] Split up xpack plugins into their own modules
(elastic/x-pack-elasticsearch#3643)
Thanks to some great work by a bunch of amazing people, the chuck norris xpack split is a go!
Original commit: elastic/x-pack-elasticsearch@dad98e28f4043f805907af2ad441908f64ca6c70
---
build.gradle | 10 +-
dev-tools/checkstyle_suppressions.xml | 34 +-
docs/build.gradle | 3 +-
license-tools/build.gradle | 2 +-
plugin/bin/x-pack/x-pack-env | 7 -
plugin/bin/x-pack/x-pack-env.bat | 5 -
plugin/build.gradle | 298 ++--------
plugin/core/build.gradle | 290 ++++++++-
.../licenses/bcpkix-jdk15on-1.58.jar.sha1 | 0
.../licenses/bcprov-jdk15on-1.58.jar.sha1 | 0
.../licenses/bouncycastle-LICENSE.txt | 0
.../licenses/bouncycastle-NOTICE.txt | 0
plugin/core/licenses/commons-LICENSE.txt | 202 +++++++
plugin/core/licenses/commons-NOTICE.txt | 17 +
.../core/licenses/commons-codec-1.10.jar.sha1 | 1 +
.../licenses/commons-logging-1.1.3.jar.sha1 | 1 +
.../licenses/httpasyncclient-4.1.2.jar.sha1 | 1 +
.../core/licenses/httpclient-4.5.2.jar.sha1 | 1 +
plugin/core/licenses/httpclient-LICENSE.txt | 558 ++++++++++++++++++
plugin/core/licenses/httpclient-NOTICE.txt | 6 +
plugin/core/licenses/httpcore-4.4.5.jar.sha1 | 1 +
.../licenses/unboundid-ldapsdk-3.2.0.jar.sha1 | 0
.../licenses/unboundid-ldapsdk-LICENSE.txt | 0
.../licenses/unboundid-ldapsdk-NOTICE.txt | 0
.../x-pack => core/src/main/bin}/extension | 0
.../src/main/bin}/extension.bat | 0
plugin/core/src/main/bin/x-pack-env | 12 +
plugin/core/src/main/bin/x-pack-env.bat | 10 +
.../src/main/config}/log4j2.properties | 0
.../common/network/InetAddressHelper.java | 0
.../org/elasticsearch/license/CryptUtils.java | 0
.../license/ExpirationCallback.java | 0
.../elasticsearch/license/LicenseService.java | 0
.../elasticsearch/license/LicenseUtils.java | 0
.../license/LicenseVerifier.java | 0
.../license/LicensesMetaData.java | 4 +-
.../org/elasticsearch/license/Licensing.java | 7 +
.../license/LicensingClient.java | 0
.../license/RestDeleteLicenseAction.java | 0
.../license/RestGetLicenseAction.java | 0
.../license/RestGetTrialStatus.java | 0
.../license/RestPostStartTrialLicense.java | 0
.../license/RestPutLicenseAction.java | 0
.../license/SelfGeneratedLicense.java | 0
.../license/TransportDeleteLicenseAction.java | 0
.../license/TransportGetLicenseAction.java | 0
.../TransportGetTrialStatusAction.java | 0
.../TransportPostStartTrialAction.java | 0
.../license/TransportPutLicenseAction.java | 0
.../license/XPackLicenseState.java | 30 +-
.../elasticsearch/license/package-info.java | 0
.../xpack/EmptyXPackFeatureSet.java | 43 ++
.../org/elasticsearch/xpack/XPackClient.java | 0
.../xpack/XPackClientPlugin.java | 384 ++++++++++++
.../{XpackField.java => XPackField.java} | 6 +-
.../org/elasticsearch/xpack/XPackPlugin.java | 238 ++++++++
.../elasticsearch/xpack/XPackSettings.java | 11 +-
.../action/TransportXPackInfoAction.java | 1 +
.../action/TransportXPackUsageAction.java | 0
.../xpack/common/IteratingActionListener.java | 0
.../xpack/common/socket/SocketAccess.java | 0
.../deprecation/DeprecationInfoAction.java | 4 +-
.../InstallXPackExtensionCommand.java | 0
.../extensions/ListXPackExtensionCommand.java | 0
.../RemoveXPackExtensionCommand.java | 5 +-
.../xpack/extensions/XPackExtension.java | 0
.../xpack/extensions/XPackExtensionCli.java | 0
.../xpack/extensions/XPackExtensionInfo.java | 0
.../extensions/XPackExtensionPolicy.java | 0
.../extensions/XPackExtensionSecurity.java | 0
.../extensions/XPackExtensionsService.java | 0
.../xpack/graph/GraphFeatureSetUsage.java | 23 +
.../graph/action/GraphExploreResponse.java | 6 +-
.../elasticsearch/xpack/graph/action/Hop.java | 6 +-
.../xpack/graph/action/Vertex.java | 2 +-
.../xpack/graph/action/VertexRequest.java | 6 +-
.../ml/MachineLearningClientActionPlugin.java | 5 -
.../ml/MachineLearningFeatureSetUsage.java | 61 ++
.../xpack/ml/MachineLearningField.java | 22 +
.../xpack/ml/action/CloseJobAction.java | 12 +-
.../xpack/ml/action/DeleteCalendarAction.java | 4 +-
.../ml/action/DeleteCalendarEventAction.java | 2 +-
.../xpack/ml/action/DeleteDatafeedAction.java | 6 +-
.../ml/action/DeleteExpiredDataAction.java | 2 +-
.../xpack/ml/action/DeleteFilterAction.java | 4 +-
.../xpack/ml/action/DeleteJobAction.java | 4 +-
.../ml/action/DeleteModelSnapshotAction.java | 4 +-
.../ml/action/FinalizeJobExecutionAction.java | 6 +-
.../xpack/ml/action/FlushJobAction.java | 4 +-
.../xpack/ml/action/ForecastJobAction.java | 6 +-
.../xpack/ml/action/GetBucketsAction.java | 6 +-
.../ml/action/GetCalendarEventsAction.java | 4 +-
.../xpack/ml/action/GetCalendarsAction.java | 2 +-
.../xpack/ml/action/GetCategoriesAction.java | 4 +-
.../xpack/ml/action/GetDatafeedsAction.java | 4 +-
.../ml/action/GetDatafeedsStatsAction.java | 6 +-
.../xpack/ml/action/GetFiltersAction.java | 2 +-
.../xpack/ml/action/GetInfluencersAction.java | 6 +-
.../xpack/ml/action/GetJobsAction.java | 4 +-
.../xpack/ml/action/GetJobsStatsAction.java | 6 +-
.../ml/action/GetModelSnapshotsAction.java | 4 +-
.../ml/action/GetOverallBucketsAction.java | 6 +-
.../xpack/ml/action/GetRecordsAction.java | 6 +-
.../ml/action/IsolateDatafeedAction.java | 6 +-
.../xpack/ml/action/KillProcessAction.java | 8 +-
.../xpack/ml/action/OpenJobAction.java | 6 +-
.../ml/action/PostCalendarEventsAction.java | 4 +-
.../xpack/ml/action/PostDataAction.java | 6 +-
.../ml/action/PreviewDatafeedAction.java | 6 +-
.../xpack/ml/action/PutCalendarAction.java | 4 +-
.../xpack/ml/action/PutDatafeedAction.java | 4 +-
.../xpack/ml/action/PutFilterAction.java | 2 +-
.../xpack/ml/action/PutJobAction.java | 4 +-
.../ml/action/RevertModelSnapshotAction.java | 4 +-
.../xpack/ml/action/StartDatafeedAction.java | 2 +-
.../xpack/ml/action/StopDatafeedAction.java | 8 +-
.../ml/action/UpdateCalendarJobAction.java | 2 +-
.../xpack/ml/action/UpdateDatafeedAction.java | 2 +-
.../xpack/ml/action/UpdateJobAction.java | 2 +-
.../ml/action/UpdateModelSnapshotAction.java | 4 +-
.../xpack/ml/action/UpdateProcessAction.java | 4 +-
.../ml/action/ValidateDetectorAction.java | 2 +-
.../ml/action/ValidateJobConfigAction.java | 2 +-
.../ml/client/MachineLearningClient.java | 0
.../xpack/ml/job/messages/Messages.java | 4 +-
.../xpack/ml/notifications/AuditorField.java | 13 +
.../monitoring/MonitoringFeatureSetUsage.java | 48 ++
.../action/MonitoringBulkResponse.java | 4 +-
.../monitoring/client/MonitoringClient.java | 0
.../xpack/rest/XPackRestHandler.java | 0
.../rest/action/RestXPackInfoAction.java | 0
.../rest/action/RestXPackUsageAction.java | 0
.../xpack/scheduler/SchedulerEngine.java | 0
.../xpack/security/ScrollHelper.java | 0
.../xpack/security/SecurityContext.java | 8 +-
.../xpack/security/SecurityExtension.java | 26 -
.../security/SecurityFeatureSetUsage.java | 95 +++
.../xpack/security/SecurityField.java | 11 +-
.../SecurityLifecycleServiceField.java | 12 +
.../xpack/security/SecuritySettings.java | 52 ++
.../xpack/security/UserSettings.java | 48 ++
.../action/realm/ClearRealmCacheRequest.java | 8 +-
.../action/realm/ClearRealmCacheResponse.java | 4 +-
.../action/role/ClearRolesCacheRequest.java | 4 +-
.../action/role/ClearRolesCacheResponse.java | 4 +-
.../security/action/role/PutRoleRequest.java | 2 +-
.../DeleteRoleMappingResponse.java | 4 +-
.../action/token/CreateTokenRequest.java | 2 +-
.../action/token/InvalidateTokenRequest.java | 6 +-
.../action/token/InvalidateTokenResponse.java | 4 +-
.../audit/index/IndexAuditTrailField.java | 12 +
.../xpack/security/authc/Authentication.java | 4 +-
.../authc/AuthenticationFailureHandler.java | 0
.../security/authc/AuthenticationResult.java | 0
.../security/authc/AuthenticationToken.java | 0
.../DefaultAuthenticationFailureHandler.java | 0
.../authc/InternalRealmsSettings.java | 36 ++
.../xpack/security/authc/KeyAndTimestamp.java | 63 ++
.../xpack/security/authc/Realm.java | 4 +-
.../xpack/security/authc/RealmConfig.java | 0
.../xpack/security/authc/RealmSettings.java | 6 +-
.../xpack/security/authc/TokenMetaData.java | 17 +-
.../authc/esnative/NativeRealmSettings.java | 24 +
.../authc/file/FileRealmSettings.java | 24 +
...ActiveDirectorySessionFactorySettings.java | 43 ++
.../authc/ldap/LdapRealmSettings.java | 44 ++
.../ldap/LdapSessionFactorySettings.java | 28 +
.../LdapUserSearchSessionFactorySettings.java | 44 ++
.../ldap/PoolingSessionFactorySettings.java | 39 ++
.../ldap/SearchGroupsResolverSettings.java | 39 ++
.../UserAttributeGroupsResolverSettings.java | 23 +
.../support/LdapLoadBalancingSettings.java | 26 +
.../support/LdapMetaDataResolverSettings.java | 23 +
.../authc/ldap/support/LdapSearchScope.java | 0
.../ldap/support/SessionFactorySettings.java | 44 ++
.../security/authc/pki/PkiRealmSettings.java | 42 ++
.../CachingUsernamePasswordRealmSettings.java | 31 +
.../authc/support/DnRoleMapperSettings.java | 25 +
.../authc/support/UsernamePasswordToken.java | 38 +-
.../mapper/CompositeRoleMapperSettings.java | 19 +
.../support/mapper/ExpressionRoleMapping.java | 2 +-
.../mapper/expressiondsl/AllExpression.java | 4 +-
.../mapper/expressiondsl/AnyExpression.java | 4 +-
.../expressiondsl/ExceptExpression.java | 4 +-
.../expressiondsl/ExpressionParser.java | 7 -
.../mapper/expressiondsl/FieldExpression.java | 4 +-
.../authz/AuthorizationServiceField.java | 12 +
.../authz/IndicesAndAliasesResolverField.java | 14 +
.../accesscontrol/DocumentSubsetReader.java | 2 +-
.../authz/accesscontrol/FieldExtractor.java | 0
.../accesscontrol/FieldSubsetReader.java | 0
.../accesscontrol/IndicesAccessControl.java | 4 +-
.../authz/accesscontrol/OptOutQueryCache.java | 4 +-
.../SetSecurityUserProcessor.java | 0
.../authz/permission/ClusterPermission.java | 0
.../authz/permission/FieldPermissions.java | 0
.../permission/FieldPermissionsCache.java | 0
.../FieldPermissionsDefinition.java | 0
.../authz/permission/IndicesPermission.java | 0
.../xpack/security/authz/permission/Role.java | 0
.../authz/permission/RunAsPermission.java | 0
.../authz/privilege/ClusterPrivilege.java | 0
.../privilege/HealthAndStatsPrivilege.java | 0
.../authz/privilege/IndexPrivilege.java | 0
.../security/authz/privilege/Privilege.java | 0
.../authz/privilege/SystemPrivilege.java | 0
.../authz/store/ClientReservedRoles.java | 44 --
.../security/authz/store/FileRolesStore.java | 6 +-
.../authz/store/ReservedRolesStore.java | 133 +++++
.../xpack/security/client/SecurityClient.java | 0
.../security/rest/RestRequestFilter.java | 0
.../xpack/security/support/Exceptions.java | 6 +-
.../xpack/security/support/NoOpLogger.java | 0
.../xpack/security/support/Validation.java | 4 +-
.../transport/SSLExceptionHelper.java | 0
.../netty4/SecurityNetty4Transport.java | 14 +-
.../xpack/security/user/BuiltinUserInfo.java | 0
.../xpack/security/user/ElasticUser.java | 0
.../user/InternalUserSerializationHelper.java | 0
.../xpack/security/user/KibanaUser.java | 0
.../security/user/LogstashSystemUser.java | 0
.../xpack/security/user/SystemUser.java | 0
.../security/user/XPackSecurityUser.java | 0
.../xpack/security/user/XPackUser.java | 5 +-
.../elasticsearch/xpack/ssl/CertUtils.java | 0
.../xpack/ssl/CertificateGenerateTool.java | 0
.../xpack/ssl/CertificateTool.java | 0
.../ssl/CertificateTrustRestrictions.java | 0
.../xpack/ssl/DefaultJDKTrustConfig.java | 0
.../elasticsearch/xpack/ssl/KeyConfig.java | 0
.../elasticsearch/xpack/ssl/PEMKeyConfig.java | 0
.../xpack/ssl/PEMTrustConfig.java | 0
.../xpack/ssl/RestrictedTrustConfig.java | 0
.../xpack/ssl/RestrictedTrustManager.java | 0
.../xpack/ssl/SSLConfiguration.java | 0
.../xpack/ssl/SSLConfigurationReloader.java | 0
.../elasticsearch/xpack/ssl/SSLService.java | 0
.../xpack/ssl/StoreKeyConfig.java | 0
.../xpack/ssl/StoreTrustConfig.java | 0
.../xpack/ssl/TLSLicenseBootstrapCheck.java | 0
.../xpack/ssl/TrustAllConfig.java | 0
.../elasticsearch/xpack/ssl/TrustConfig.java | 0
.../TransportGetCertificateInfoAction.java | 0
.../rest/RestGetCertificateInfoAction.java | 0
.../upgrade/IndexUpgradeCheckVersion.java | 13 +
.../xpack/upgrade/UpgradeField.java | 23 +
.../actions/IndexUpgradeInfoAction.java | 2 +-
.../xpack/watcher/WatcherFeatureSetUsage.java | 50 ++
.../xpack/watcher/client/WatcherClient.java | 0
.../execution/TriggeredWatchStoreField.java | 12 +
.../execution/WatchExecutionContext.java | 8 +-
.../watcher/history/HistoryStoreField.java | 25 +
.../xpack/watcher/input/none/NoneInput.java | 2 +-
.../WatcherIndexTemplateRegistryField.java | 25 +
.../actions/get/GetWatchResponse.java | 2 +-
.../actions/put/PutWatchResponse.java | 2 +-
.../service/WatcherServiceRequest.java | 4 +-
.../actions/stats/WatcherStatsResponse.java | 14 +-
.../plugin-metadata/plugin-security.policy | 0
.../resources/logstash-index-template.json | 0
.../src/main/resources/monitoring-alerts.json | 0
.../src/main/resources/monitoring-beats.json | 0
.../src/main/resources/monitoring-es.json | 0
.../src/main/resources/monitoring-kibana.json | 0
.../main/resources/monitoring-logstash.json | 0
.../resources/security-index-template.json | 0
.../main/resources/security_audit_log.json | 0
.../src/main/resources/triggered-watches.json | 0
.../src/main/resources/watch-history.json | 0
.../src/main/resources/watches.json | 0
.../xpack/security/crypto/migrate.help | 0
.../security/crypto/tool/syskey-generate.help | 0
.../action/MockIndicesRequest.java | 0
.../stats/IndicesStatsResponseTestUtils.java | 0
.../http/netty4/Netty4HttpMockUtil.java | 0
.../AbstractLicenseServiceTestCase.java | 0
.../AbstractLicensesIntegrationTestCase.java | 26 +-
.../license/ExpirationCallbackTests.java | 0
.../license/LicenseClusterChangeTests.java | 0
.../license/LicenseOperationModeTests.java | 0
.../LicenseOperationModeUpdateTests.java | 0
.../license/LicenseRegistrationTests.java | 0
.../license/LicenseScheduleTests.java | 0
.../license/LicenseSerializationTests.java | 0
...icenseServiceClusterNotRecoveredTests.java | 4 +-
.../license/LicenseServiceClusterTests.java | 3 +-
.../license/LicenseUtilsTests.java | 0
.../license/LicensesAcknowledgementTests.java | 0
.../license/LicensesManagerServiceTests.java | 8 +-
.../LicensesMetaDataSerializationTests.java | 0
.../license/LicensesTransportTests.java | 12 +-
.../OperationModeFileWatcherTests.java | 0
.../license/PutLicenseResponseTests.java | 0
.../license/SelfGeneratedLicenseTests.java | 0
.../org/elasticsearch/license/TestUtils.java | 0
.../license/UpgradeToTrialTests.java | 7 +-
.../script/MockMustacheScriptEngine.java | 3 +-
.../test/SecuritySettingsSourceField.java | 15 +
.../org/elasticsearch/test/TestMatchers.java | 0
.../org/elasticsearch/test/http/Headers.java | 0
.../elasticsearch/test/http/MockRequest.java | 0
.../elasticsearch/test/http/MockResponse.java | 0
.../test/http/MockWebServer.java | 0
.../xpack/ClientHelperTests.java | 0
.../xpack/LocalStateCompositeXPackPlugin.java | 385 ++++++++++++
.../xpack/TestXPackTransportClient.java | 2 +-
.../xpack/XPackSettingsTests.java | 0
.../xpack/XPackSingleNodeTestCase.java | 8 +-
.../action/TransportXPackInfoActionTests.java | 0
.../common/IteratingActionListenerTests.java | 0
.../deprecation/DeprecationChecksTests.java | 0
.../DeprecationInfoActionRequestTests.java | 0
.../DeprecationInfoActionResponseTests.java | 0
.../deprecation/DeprecationIssueTests.java | 0
.../InstallXPackExtensionCommandTests.java | 5 +-
.../ListXPackExtensionCommandTests.java | 2 +-
.../RemoveXPackExtensionCommandTests.java | 2 +-
.../extensions/XPackExtensionInfoTests.java | 0
.../XPackExtensionSecurityTests.java | 0
.../extensions/XPackExtensionTestUtil.java | 0
.../XPackExtensionsServiceTests.java | 0
.../integration/MlRestTestStateCleaner.java | 0
.../test/MockPainlessScriptEngine.java | 0
.../CancelPersistentTaskRequestTests.java | 0
.../PersistentTasksClusterServiceTests.java | 0
.../PersistentTasksCustomMetaDataTests.java | 0
.../PersistentTasksExecutorFullRestartIT.java | 0
.../persistent/PersistentTasksExecutorIT.java | 0
.../PersistentTasksExecutorResponseTests.java | 0
...PersistentTasksNodeServiceStatusTests.java | 0
.../PersistentTasksNodeServiceTests.java | 0
.../RestartPersistentTaskRequestTests.java | 0
.../StartPersistentActionRequestTests.java | 0
.../persistent/TestPersistentTasksPlugin.java | 0
.../UpdatePersistentTaskRequestTests.java | 0
.../security/test/SecurityAssertions.java | 4 +-
.../xpack/ssl/CertUtilsTests.java | 0
.../xpack/ssl/RestrictedTrustConfigTests.java | 0
.../ssl/RestrictedTrustManagerTests.java | 0
.../ssl/SSLConfigurationReloaderTests.java | 0
.../ssl/SSLConfigurationSettingsTests.java | 0
.../xpack/ssl/SSLConfigurationTests.java | 0
.../xpack/ssl/SSLServiceTests.java | 0
.../xpack/ssl/StoreKeyConfigTests.java | 0
.../ssl/TLSLicenseBootstrapCheckTests.java | 0
.../xpack/ssl/TestsSSLService.java | 0
.../xpack/ssl/cert/CertificateInfoTests.java | 0
.../xpack/template/TemplateUtilsTests.java | 0
.../xpack/test/rest/XPackRestTestHelper.java | 4 +-
.../xpack/watcher/watch/clock/ClockMock.java | 0
.../src/test/resources/monitoring-test.json | 0
.../complex-x-pack-extension-security.policy | 0
.../simple-x-pack-extension-security.policy | 0
...nresolved-x-pack-extension-security.policy | 0
.../ssl/certs/simple/README.asciidoc | 0
.../ssl/certs/simple/active-directory-ca.crt | 0
.../transport/ssl/certs/simple/openldap.crt | 0
.../transport/ssl/certs/simple/openldap.der | Bin
.../ssl/certs/simple/openssl_config.cnf | 0
.../ssl/certs/simple/prime256v1-cert.pem | 0
.../certs/simple/prime256v1-key-noparam.pem | 0
.../ssl/certs/simple/prime256v1-key.pem | 0
.../simple/testclient-client-profile.crt | 0
.../simple/testclient-client-profile.jks | Bin
.../simple/testclient-client-profile.p12 | Bin
.../simple/testclient-client-profile.pem | 0
.../transport/ssl/certs/simple/testclient.crt | 0
.../transport/ssl/certs/simple/testclient.jks | Bin
.../transport/ssl/certs/simple/testclient.p12 | Bin
.../transport/ssl/certs/simple/testclient.pem | 0
.../certs/simple/testnode-client-profile.crt | 0
.../certs/simple/testnode-client-profile.jks | Bin
.../certs/simple/testnode-client-profile.p12 | Bin
.../certs/simple/testnode-client-profile.pem | 0
.../simple/testnode-different-passwords.jks | Bin
.../ssl/certs/simple/testnode-ip-only.crt | 0
.../ssl/certs/simple/testnode-ip-only.jks | Bin
.../certs/simple/testnode-no-subjaltname.cert | 0
.../certs/simple/testnode-no-subjaltname.jks | Bin
.../transport/ssl/certs/simple/testnode.crt | 0
.../transport/ssl/certs/simple/testnode.jks | Bin
.../transport/ssl/certs/simple/testnode.p12 | Bin
.../transport/ssl/certs/simple/testnode.pem | 0
.../certs/simple/truststore-testnode-only.jks | Bin
.../{ => core}/src/test/resources/private.key | Bin
.../{ => core}/src/test/resources/public.key | 0
plugin/deprecation/build.gradle | 31 +
.../xpack/deprecation/Deprecation.java | 4 +-
.../xpack/deprecation/DeprecationChecks.java | 0
.../deprecation/IndexDeprecationChecks.java | 0
.../RestDeprecationInfoAction.java | 0
.../TransportDeprecationInfoAction.java | 4 +-
.../plugin-metadata/plugin-security.policy | 50 ++
.../IndexDeprecationChecksTests.java | 0
plugin/graph/build.gradle | 23 +-
.../org/elasticsearch/xpack/graph/Graph.java | 20 +-
.../xpack/graph/GraphFeatureSet.java | 18 +-
.../action/TransportGraphExploreAction.java | 4 +-
.../graph/rest/action/RestGraphAction.java | 0
.../plugin-metadata/plugin-security.policy | 50 ++
.../xpack/graph/GraphFeatureSetTests.java | 4 +-
.../xpack/graph/test/GraphTests.java | 14 +-
plugin/logstash/build.gradle | 33 ++
.../xpack/logstash/Logstash.java | 7 +-
.../xpack/logstash/LogstashFeatureSet.java | 0
.../plugin-metadata/plugin-security.policy | 50 ++
.../logstash/LogstashFeatureSetTests.java | 0
plugin/ml-cpp-snapshot/build.gradle | 2 +-
plugin/ml/build.gradle | 41 +-
.../xpack/ml/InvalidLicenseEnforcer.java | 0
.../xpack/ml/MachineLearning.java | 161 +++--
.../xpack/ml/MachineLearningFeatureSet.java | 269 +++++++++
.../xpack/ml/MlAssignmentNotifier.java | 0
.../xpack/ml/MlDailyMaintenanceService.java | 0
.../xpack/ml/MlInitializationService.java | 0
.../xpack/ml/MlLifeCycleService.java | 0
.../ml/action/TransportCloseJobAction.java | 0
.../action/TransportDeleteCalendarAction.java | 0
.../TransportDeleteCalendarEventAction.java | 0
.../action/TransportDeleteDatafeedAction.java | 0
.../TransportDeleteExpiredDataAction.java | 0
.../action/TransportDeleteFilterAction.java | 0
.../ml/action/TransportDeleteJobAction.java | 4 +-
.../TransportDeleteModelSnapshotAction.java | 0
.../TransportFinalizeJobExecutionAction.java | 0
.../ml/action/TransportFlushJobAction.java | 0
.../ml/action/TransportForecastJobAction.java | 0
.../ml/action/TransportGetBucketsAction.java | 0
.../TransportGetCalendarEventsAction.java | 0
.../action/TransportGetCalendarsAction.java | 0
.../action/TransportGetCategoriesAction.java | 0
.../action/TransportGetDatafeedsAction.java | 0
.../TransportGetDatafeedsStatsAction.java | 0
.../ml/action/TransportGetFiltersAction.java | 0
.../action/TransportGetInfluencersAction.java | 0
.../ml/action/TransportGetJobsAction.java | 0
.../action/TransportGetJobsStatsAction.java | 0
.../TransportGetModelSnapshotsAction.java | 0
.../TransportGetOverallBucketsAction.java | 0
.../ml/action/TransportGetRecordsAction.java | 0
.../TransportIsolateDatafeedAction.java | 0
.../ml/action/TransportJobTaskAction.java | 0
.../ml/action/TransportKillProcessAction.java | 0
.../ml/action/TransportOpenJobAction.java | 4 +-
.../TransportPostCalendarEventsAction.java | 0
.../ml/action/TransportPostDataAction.java | 0
.../TransportPreviewDatafeedAction.java | 0
.../ml/action/TransportPutCalendarAction.java | 0
.../ml/action/TransportPutDatafeedAction.java | 5 +-
.../ml/action/TransportPutFilterAction.java | 0
.../ml/action/TransportPutJobAction.java | 5 +-
.../TransportRevertModelSnapshotAction.java | 0
.../action/TransportStartDatafeedAction.java | 4 +-
.../action/TransportStopDatafeedAction.java | 0
.../TransportUpdateCalendarJobAction.java | 0
.../action/TransportUpdateDatafeedAction.java | 0
.../ml/action/TransportUpdateJobAction.java | 0
.../TransportUpdateModelSnapshotAction.java | 0
.../action/TransportUpdateProcessAction.java | 0
.../TransportValidateDetectorAction.java | 0
.../TransportValidateJobConfigAction.java | 0
.../xpack/ml/datafeed/DatafeedJob.java | 0
.../xpack/ml/datafeed/DatafeedJobBuilder.java | 0
.../xpack/ml/datafeed/DatafeedManager.java | 0
.../ml/datafeed/DatafeedNodeSelector.java | 0
.../xpack/ml/datafeed/ProblemTracker.java | 0
.../extractor/DataExtractorFactory.java | 0
.../aggregation/AggregationDataExtractor.java | 0
.../AggregationDataExtractorContext.java | 0
.../AggregationDataExtractorFactory.java | 0
.../AggregationToJsonProcessor.java | 0
.../chunked/ChunkedDataExtractor.java | 0
.../chunked/ChunkedDataExtractorContext.java | 0
.../chunked/ChunkedDataExtractorFactory.java | 0
.../extractor/scroll/ExtractedField.java | 0
.../extractor/scroll/ExtractedFields.java | 0
.../extractor/scroll/ScrollDataExtractor.java | 0
.../scroll/ScrollDataExtractorContext.java | 0
.../scroll/ScrollDataExtractorFactory.java | 0
.../scroll/SearchHitToJsonProcessor.java | 0
.../xpack/ml/job/JobManager.java | 6 +-
.../ml/job/UpdateJobProcessNotifier.java | 0
.../CategorizationAnalyzer.java | 0
.../categorization/MlClassicTokenizer.java | 0
.../MlClassicTokenizerFactory.java | 0
.../persistence/JobDataCountsPersister.java | 0
.../JobRenormalizedResultsPersister.java | 0
.../job/persistence/JobResultsPersister.java | 0
.../ml/job/persistence/StateStreamer.java | 0
.../OverallBucketsAggregator.java | 0
.../OverallBucketsCollector.java | 0
.../OverallBucketsProcessor.java | 0
.../OverallBucketsProvider.java | 0
.../ml/job/process/CountingInputStream.java | 0
.../ml/job/process/DataCountsReporter.java | 0
.../ml/job/process/DataStreamDiagnostics.java | 0
.../ml/job/process/NativeController.java | 0
.../job/process/NativeControllerHolder.java | 4 +-
.../xpack/ml/job/process/ProcessCtrl.java | 0
.../xpack/ml/job/process/ProcessPipes.java | 0
.../process/autodetect/AutodetectBuilder.java | 0
.../autodetect/AutodetectCommunicator.java | 0
.../process/autodetect/AutodetectProcess.java | 0
.../autodetect/AutodetectProcessFactory.java | 0
.../autodetect/AutodetectProcessManager.java | 0
.../BlackHoleAutodetectProcess.java | 0
.../autodetect/NativeAutodetectProcess.java | 5 +-
.../NativeAutodetectProcessFactory.java | 0
.../process/autodetect/ProcessContext.java | 4 +-
.../job/process/autodetect/UpdateParams.java | 0
.../output/AutoDetectResultProcessor.java | 4 +-
.../output/AutodetectResultsParser.java | 0
.../autodetect/output/FlushListener.java | 0
.../autodetect/output/StateProcessor.java | 0
.../autodetect/params/DataLoadParams.java | 0
.../autodetect/params/FlushJobParams.java | 0
.../autodetect/params/ForecastParams.java | 0
.../process/autodetect/params/TimeRange.java | 0
.../writer/AbstractDataToProcessWriter.java | 0
.../writer/AnalysisLimitsWriter.java | 0
.../writer/CannotParseTimestampException.java | 0
.../writer/ControlMsgToProcessWriter.java | 0
.../writer/CsvDataToProcessWriter.java | 0
.../autodetect/writer/CsvRecordWriter.java | 0
.../writer/DataToProcessWriter.java | 0
.../writer/DataToProcessWriterFactory.java | 0
.../writer/DateFormatDateTransformer.java | 0
.../autodetect/writer/DateTransformer.java | 0
.../writer/DoubleDateTransformer.java | 0
.../autodetect/writer/FieldConfigWriter.java | 0
.../writer/JsonDataToProcessWriter.java | 0
.../writer/LengthEncodedWriter.java | 0
.../autodetect/writer/MlFilterWriter.java | 0
.../writer/ModelPlotConfigWriter.java | 0
.../writer/ScheduledEventsWriter.java | 0
.../autodetect/writer/WriterConstants.java | 0
.../writer/XContentRecordReader.java | 0
.../ml/job/process/logging/CppLogMessage.java | 0
.../process/logging/CppLogMessageHandler.java | 0
.../normalizer/AbstractLeafNormalizable.java | 0
.../BucketInfluencerNormalizable.java | 0
.../normalizer/BucketNormalizable.java | 0
.../normalizer/InfluencerNormalizable.java | 0
.../ml/job/process/normalizer/Level.java | 0
.../MultiplyingNormalizerProcess.java | 0
.../normalizer/NativeNormalizerProcess.java | 0
.../NativeNormalizerProcessFactory.java | 0
.../job/process/normalizer/Normalizable.java | 0
.../ml/job/process/normalizer/Normalizer.java | 0
.../process/normalizer/NormalizerFactory.java | 0
.../process/normalizer/NormalizerProcess.java | 0
.../normalizer/NormalizerProcessFactory.java | 0
.../process/normalizer/NormalizerResult.java | 0
.../PartitionScoreNormalizable.java | 0
.../normalizer/RecordNormalizable.java | 0
.../job/process/normalizer/Renormalizer.java | 0
.../job/process/normalizer/ScoresUpdater.java | 0
.../ShortCircuitingRenormalizer.java | 0
.../output/NormalizerResultHandler.java | 0
.../ml/job/results/AutodetectResult.java | 0
.../AbstractExpiredJobDataRemover.java | 0
.../retention/ExpiredForecastsRemover.java | 0
.../ExpiredModelSnapshotsRemover.java | 0
.../job/retention/ExpiredResultsRemover.java | 0
.../xpack/ml/job/retention/MlDataRemover.java | 0
.../xpack/ml/notifications/Auditor.java | 3 +-
.../ml/rest/RestDeleteExpiredDataAction.java | 0
.../calendar/RestDeleteCalendarAction.java | 0
.../RestDeleteCalendarEventAction.java | 0
.../calendar/RestDeleteCalendarJobAction.java | 0
.../calendar/RestGetCalendarEventsAction.java | 0
.../rest/calendar/RestGetCalendarsAction.java | 0
.../calendar/RestPostCalendarEventAction.java | 0
.../rest/calendar/RestPutCalendarAction.java | 0
.../calendar/RestPutCalendarJobAction.java | 0
.../datafeeds/RestDeleteDatafeedAction.java | 0
.../datafeeds/RestGetDatafeedStatsAction.java | 0
.../datafeeds/RestGetDatafeedsAction.java | 0
.../datafeeds/RestPreviewDatafeedAction.java | 0
.../rest/datafeeds/RestPutDatafeedAction.java | 0
.../datafeeds/RestStartDatafeedAction.java | 0
.../datafeeds/RestStopDatafeedAction.java | 0
.../datafeeds/RestUpdateDatafeedAction.java | 0
.../rest/filter/RestDeleteFilterAction.java | 0
.../ml/rest/filter/RestGetFiltersAction.java | 0
.../ml/rest/filter/RestPutFilterAction.java | 0
.../xpack/ml/rest/job/RestCloseJobAction.java | 0
.../ml/rest/job/RestDeleteJobAction.java | 0
.../xpack/ml/rest/job/RestFlushJobAction.java | 0
.../ml/rest/job/RestForecastJobAction.java | 0
.../ml/rest/job/RestGetJobStatsAction.java | 0
.../xpack/ml/rest/job/RestGetJobsAction.java | 0
.../xpack/ml/rest/job/RestOpenJobAction.java | 0
.../xpack/ml/rest/job/RestPostDataAction.java | 0
.../ml/rest/job/RestPostJobUpdateAction.java | 0
.../xpack/ml/rest/job/RestPutJobAction.java | 0
.../RestDeleteModelSnapshotAction.java | 0
.../RestGetModelSnapshotsAction.java | 0
.../RestRevertModelSnapshotAction.java | 0
.../RestUpdateModelSnapshotAction.java | 0
.../ml/rest/results/RestGetBucketsAction.java | 0
.../rest/results/RestGetCategoriesAction.java | 0
.../results/RestGetInfluencersAction.java | 0
.../results/RestGetOverallBucketsAction.java | 0
.../ml/rest/results/RestGetRecordsAction.java | 0
.../validate/RestValidateDetectorAction.java | 0
.../validate/RestValidateJobConfigAction.java | 0
.../xpack/ml/utils/DomainSplitFunction.java | 0
.../xpack/ml/utils/NamedPipeHelper.java | 0
.../xpack/ml/utils/StatsAccumulator.java | 0
.../ml/utils/VolatileCursorIterator.java | 0
.../plugin-metadata/plugin-security.policy | 50 ++
.../xpack/ml/transforms/exact.properties | 0
.../MachineLearningLicensingTests.java | 78 +--
.../xpack/ml/LocalStateMachineLearning.java | 67 +++
.../ml/MachineLearningFeatureSetTests.java | 12 +-
.../xpack/ml/MachineLearningTests.java | 15 +-
.../xpack/ml/MlAssignmentNotifierTests.java | 0
.../xpack/ml/MlClientHelperTests.java | 0
.../ml/MlDailyManagementServiceTests.java | 0
.../ml/MlInitializationServiceTests.java | 0
.../xpack/ml/MlMetadataTests.java | 0
.../ml/action/CloseJobActionRequestTests.java | 0
.../action/CloseJobActionResponseTests.java | 0
...DeleteCalendarEventActionRequestTests.java | 0
.../ml/action/DeleteDatafeedRequestTests.java | 0
.../DeleteExpiredDataActionResponseTests.java | 0
.../xpack/ml/action/DeleteJobActionTests.java | 0
.../ml/action/DeleteJobRequestTests.java | 0
.../action/ForecastJobActionRequestTests.java | 0
.../ForecastJobActionResponseTests.java | 0
.../action/GetBucketActionRequestTests.java | 0
.../action/GetBucketActionResponseTests.java | 0
.../GetCalendarEventsActionRequestTests.java | 0
.../GetCalendarsActionRequestTests.java | 0
.../ml/action/GetCategoriesRequestTests.java | 0
.../ml/action/GetCategoriesResponseTests.java | 0
.../GetDatafeedStatsActionRequestTests.java | 0
.../GetDatafeedStatsActionResponseTests.java | 0
.../GetDatafeedsActionRequestTests.java | 0
.../GetDatafeedsActionResponseTests.java | 0
.../action/GetFiltersActionRequestTests.java | 0
.../action/GetFiltersActionResponseTests.java | 0
.../GetInfluencersActionRequestTests.java | 0
.../GetInfluencersActionResponseTests.java | 0
.../action/GetJobStatsActionRequestTests.java | 0
.../GetJobStatsActionResponseTests.java | 0
.../ml/action/GetJobsActionRequestTests.java | 0
.../ml/action/GetJobsActionResponseTests.java | 0
.../ml/action/GetJobsStatsActionTests.java | 0
.../GetModelSnapshotsActionRequestTests.java | 0
.../GetModelSnapshotsActionResponseTests.java | 0
.../GetOverallBucketsActionRequestTests.java | 0
.../GetOverallBucketsActionResponseTests.java | 0
.../action/GetRecordsActionRequestTests.java | 0
.../action/GetRecordsActionResponseTests.java | 0
.../ml/action/OpenJobActionRequestTests.java | 0
.../xpack/ml/action/OpenJobActionTests.java | 4 +-
.../PostCalendarEventActionRequestTests.java | 0
.../ml/action/PostDataActionRequestTests.java | 0
.../action/PostDataActionResponseTests.java | 0
.../ml/action/PostDataFlushRequestTests.java | 0
.../ml/action/PostDataFlushResponseTests.java | 0
.../PreviewDatafeedActionRequestTests.java | 0
.../ml/action/PreviewDatafeedActionTests.java | 0
.../action/PutCalendarActionRequestTests.java | 0
.../PutCalendarActionResponseTests.java | 0
.../action/PutDatafeedActionRequestTests.java | 0
.../PutDatafeedActionResponseTests.java | 0
.../action/PutFilterActionRequestTests.java | 0
.../ml/action/PutJobActionRequestTests.java | 0
.../ml/action/PutJobActionResponseTests.java | 0
...RevertModelSnapshotActionRequestTests.java | 0
...evertModelSnapshotActionResponseTests.java | 0
.../StartDatafeedActionRequestTests.java | 0
.../ml/action/StartDatafeedActionTests.java | 0
.../StopDatafeedActionRequestTests.java | 0
.../UpdateCalendarJobActionResquestTests.java | 0
.../UpdateDatafeedActionRequestTests.java | 0
.../action/UpdateJobActionRequestTests.java | 0
...UpdateModelSnapshotActionRequestTests.java | 0
...pdateModelSnapshotActionResponseTests.java | 0
.../UpdateProcessActionRequestTests.java | 0
.../ValidateDetectorActionRequestTests.java | 0
.../ValidateJobConfigActionRequestTests.java | 0
.../xpack/ml/action/util/PageParamsTests.java | 0
.../xpack/ml/action/util/QueryPageTests.java | 0
.../xpack/ml/calendars/CalendarTests.java | 0
.../ml/calendars/ScheduledEventTests.java | 0
.../ml/datafeed/ChunkingConfigTests.java | 0
.../ml/datafeed/DatafeedConfigTests.java | 0
.../ml/datafeed/DatafeedJobBuilderTests.java | 0
.../xpack/ml/datafeed/DatafeedJobTests.java | 0
.../datafeed/DatafeedJobValidatorTests.java | 0
.../ml/datafeed/DatafeedManagerTests.java | 3 +-
.../datafeed/DatafeedNodeSelectorTests.java | 0
.../xpack/ml/datafeed/DatafeedStateTests.java | 0
.../ml/datafeed/DatafeedUpdateTests.java | 0
.../ml/datafeed/ProblemTrackerTests.java | 0
.../extractor/DataExtractorFactoryTests.java | 0
.../extractor/ExtractorUtilsTests.java | 0
.../AggregationDataExtractorFactoryTests.java | 0
.../AggregationDataExtractorTests.java | 0
.../aggregation/AggregationTestUtils.java | 0
.../AggregationToJsonProcessorTests.java | 0
.../ChunkedDataExtractorFactoryTests.java | 0
.../chunked/ChunkedDataExtractorTests.java | 0
.../extractor/scroll/ExtractedFieldTests.java | 0
.../scroll/ExtractedFieldsTests.java | 0
.../scroll/ScrollDataExtractorTests.java | 0
.../scroll/SearchHitToJsonProcessorTests.java | 0
.../integration/AutodetectMemoryLimitIT.java | 0
.../AutodetectResultProcessorIT.java | 3 +-
.../integration/BasicDistributedJobsIT.java | 0
.../integration/BasicRenormalizationIT.java | 0
.../ml/integration/CategorizationIT.java | 0
.../xpack/ml/integration/DatafeedJobsIT.java | 0
.../ml/integration/DatafeedJobsRestIT.java | 14 +-
.../ml/integration/DeleteExpiredDataIT.java | 0
.../xpack/ml/integration/DeleteJobIT.java | 0
.../ml/integration/DetectionRulesIT.java | 0
.../ml/integration/EstablishedMemUsageIT.java | 0
.../xpack/ml/integration/ForecastIT.java | 0
...erimResultsDeletedAfterReopeningJobIT.java | 0
.../xpack/ml/integration/JobProviderIT.java | 3 +-
.../integration/JobStorageDeletionTaskIT.java | 0
.../integration/MlDistributedFailureIT.java | 0
.../xpack/ml/integration/MlJobIT.java | 4 +-
.../MlNativeAutodetectIntegTestCase.java | 8 +-
.../ml/integration/NetworkDisruptionIT.java | 0
.../ml/integration/OverallBucketsIT.java | 0
.../integration/RestoreModelSnapshotIT.java | 0
.../ml/integration/RevertModelSnapshotIT.java | 0
.../xpack/ml/integration/TooManyJobsIT.java | 0
.../integration/UpdateInterimResultsIT.java | 0
.../xpack/ml/job/JobManagerTests.java | 4 +-
.../CategorizationAnalyzerTests.java | 5 +-
.../MlClassicTokenizerTests.java | 0
.../ml/job/config/AnalysisConfigTests.java | 0
.../ml/job/config/AnalysisLimitsTests.java | 0
.../CategorizationAnalyzerConfigTests.java | 0
.../xpack/ml/job/config/ConditionTests.java | 0
.../xpack/ml/job/config/ConnectiveTests.java | 0
.../ml/job/config/DataDescriptionTests.java | 0
.../xpack/ml/job/config/DataFormatTests.java | 0
.../DefaultDetectorDescriptionTests.java | 0
.../ml/job/config/DetectionRuleTests.java | 0
.../xpack/ml/job/config/DetectorTests.java | 0
.../xpack/ml/job/config/JobBuilderTests.java | 0
.../xpack/ml/job/config/JobStateTests.java | 0
.../ml/job/config/JobTaskStatusTests.java | 0
.../xpack/ml/job/config/JobTests.java | 4 +-
.../xpack/ml/job/config/JobUpdateTests.java | 0
.../xpack/ml/job/config/MlFilterTests.java | 0
.../ml/job/config/ModelPlotConfigTests.java | 0
.../xpack/ml/job/config/OperatorTests.java | 0
.../xpack/ml/job/config/RuleActionTests.java | 0
.../ml/job/config/RuleConditionTests.java | 0
.../ml/job/config/RuleConditionTypeTests.java | 0
.../ml/job/groups/GroupOrJobLookupTests.java | 0
.../xpack/ml/job/groups/GroupOrJobTests.java | 0
.../xpack/ml/job/messages/MessagesTests.java | 0
.../BatchedDocumentsIteratorTests.java | 0
.../ElasticsearchMappingsTests.java | 0
.../InfluencersQueryBuilderTests.java | 0
.../ml/job/persistence/JobProviderTests.java | 0
.../JobRenormalizedResultsPersisterTests.java | 0
.../persistence/JobResultsPersisterTests.java | 0
.../MockBatchedDocumentsIterator.java | 0
.../ml/job/persistence/MockClientBuilder.java | 0
.../ResultsFilterBuilderTests.java | 0
.../job/persistence/StateStreamerTests.java | 0
.../OverallBucketsAggregatorTests.java | 0
.../OverallBucketsCollectorTests.java | 0
.../OverallBucketsProviderTests.java | 0
.../job/process/CountingInputStreamTests.java | 0
.../job/process/DataCountsReporterTests.java | 0
.../process/DataStreamDiagnosticsTests.java | 0
.../job/process/DummyDataCountsReporter.java | 0
.../ml/job/process/NativeControllerTests.java | 0
.../ml/job/process/ProcessCtrlTests.java | 0
.../ml/job/process/ProcessPipesTests.java | 0
.../AutodetectCommunicatorTests.java | 0
.../AutodetectProcessManagerTests.java | 0
.../BlackHoleAutodetectProcessTests.java | 0
.../NativeAutodetectProcessTests.java | 0
.../AutoDetectResultProcessorTests.java | 0
.../output/AutodetectResultsParserTests.java | 0
.../output/FlushAcknowledgementTests.java | 0
.../autodetect/output/FlushListenerTests.java | 0
.../output/StateProcessorTests.java | 0
.../params/DataLoadParamsTests.java | 0
.../params/FlushJobParamsTests.java | 0
.../params/ForecastParamsTests.java | 0
.../autodetect/params/TimeRangeTests.java | 0
.../autodetect/state/DataCountsTests.java | 0
.../autodetect/state/MemoryStatusTests.java | 0
.../autodetect/state/ModelSizeStatsTests.java | 0
.../autodetect/state/ModelSnapshotTests.java | 0
.../autodetect/state/QuantilesTests.java | 0
.../AbstractDataToProcessWriterTests.java | 0
.../writer/AnalysisLimitsWriterTests.java | 0
.../ControlMsgToProcessWriterTests.java | 0
.../writer/CsvDataToProcessWriterTests.java | 0
.../autodetect/writer/CsvParserTests.java | 0
.../writer/CsvRecordWriterTests.java | 0
.../DataToProcessWriterFactoryTests.java | 0
.../DateFormatDateTransformerTests.java | 0
.../writer/DoubleDateTransformerTests.java | 0
.../writer/FieldConfigWriterTests.java | 0
.../writer/JsonDataToProcessWriterTests.java | 0
.../writer/LengthEncodedWriterTests.java | 0
.../writer/MlFilterWriterTests.java | 0
.../writer/ModelPlotConfigWriterTests.java | 0
.../writer/ScheduledEventsWriterTests.java | 0
.../writer/XContentRecordReaderTests.java | 0
.../logging/CppLogMessageHandlerTests.java | 0
.../process/logging/CppLogMessageTests.java | 0
.../BucketInfluencerNormalizableTests.java | 0
.../normalizer/BucketNormalizableTests.java | 0
.../InfluencerNormalizableTests.java | 0
.../normalizer/NormalizerResultTests.java | 0
.../process/normalizer/NormalizerTests.java | 0
.../normalizer/ScoresUpdaterTests.java | 0
.../ShortCircuitingRenormalizerTests.java | 0
.../output/NormalizerResultHandlerTests.java | 0
.../ml/job/results/AnomalyCauseTests.java | 0
.../ml/job/results/AnomalyRecordTests.java | 0
.../ml/job/results/AutodetectResultTests.java | 0
.../ml/job/results/BucketInfluencerTests.java | 0
.../xpack/ml/job/results/BucketTests.java | 0
.../job/results/CategoryDefinitionTests.java | 0
.../results/ForecastRequestStatsTests.java | 0
.../xpack/ml/job/results/ForecastTests.java | 0
.../xpack/ml/job/results/InfluenceTests.java | 0
.../xpack/ml/job/results/InfluencerTests.java | 0
.../xpack/ml/job/results/ModelPlotTests.java | 0
.../ml/job/results/OverallBucketTests.java | 0
.../ml/job/results/PartitionScoreTests.java | 0
.../job/results/ReservedFieldNamesTests.java | 0
.../ExpiredModelSnapshotsRemoverTests.java | 0
.../retention/ExpiredResultsRemoverTests.java | 0
.../GetModelSnapshotsTests.java | 0
.../UpdateModelSnapshotActionTests.java | 0
.../ml/notifications/AuditMessageTests.java | 0
.../xpack/ml/notifications/AuditorTests.java | 0
.../xpack/ml/notifications/LevelTests.java | 0
.../RestStartDatafeedActionTests.java | 0
.../xpack/ml/support/BaseMlIntegTestCase.java | 19 +-
.../xpack/ml/test/SearchHitBuilder.java | 0
.../xpack/ml/utils/IntervalsTests.java | 0
.../xpack/ml/utils/MlStringsTests.java | 0
.../xpack/ml/utils/NameResolverTests.java | 0
.../xpack/ml/utils/NamedPipeHelperTests.java | 0
.../xpack/ml/utils/StatsAccumulatorTests.java | 0
...eTimeFormatterTimestampConverterTests.java | 0
.../xpack/ml/utils/time/TimeUtilsTests.java | 0
plugin/monitoring/build.gradle | 45 +-
.../xpack/monitoring/Monitoring.java | 60 +-
.../monitoring/MonitoringFeatureSet.java | 40 +-
.../xpack/monitoring/MonitoringService.java | 0
.../action/TransportMonitoringBulkAction.java | 0
.../monitoring/cleaner/CleanerService.java | 0
.../xpack/monitoring/collector/Collector.java | 5 +-
.../cluster/ClusterStatsCollector.java | 0
.../cluster/ClusterStatsMonitoringDoc.java | 0
.../indices/IndexRecoveryCollector.java | 0
.../indices/IndexRecoveryMonitoringDoc.java | 0
.../indices/IndexStatsCollector.java | 0
.../indices/IndexStatsMonitoringDoc.java | 0
.../indices/IndicesStatsMonitoringDoc.java | 0
.../collector/ml/JobStatsCollector.java | 0
.../collector/ml/JobStatsMonitoringDoc.java | 0
.../collector/node/NodeStatsCollector.java | 0
.../node/NodeStatsMonitoringDoc.java | 0
.../collector/shards/ShardMonitoringDoc.java | 0
.../collector/shards/ShardsCollector.java | 0
.../exporter/BytesReferenceMonitoringDoc.java | 0
.../exporter/ClusterAlertsUtil.java | 0
.../xpack/monitoring/exporter/ExportBulk.java | 0
.../monitoring/exporter/ExportException.java | 0
.../xpack/monitoring/exporter/Exporter.java | 0
.../xpack/monitoring/exporter/Exporters.java | 0
.../exporter/FilteredMonitoringDoc.java | 0
.../http/ClusterAlertHttpResource.java | 0
.../exporter/http/HttpExportBulk.java | 0
.../http/HttpExportBulkResponseListener.java | 0
.../exporter/http/HttpExporter.java | 0
.../exporter/http/HttpHostBuilder.java | 0
.../exporter/http/HttpResource.java | 0
.../exporter/http/MultiHttpResource.java | 0
.../exporter/http/NodeFailureListener.java | 0
.../exporter/http/PipelineHttpResource.java | 0
.../http/PublishableHttpResource.java | 0
.../monitoring/exporter/http/Scheme.java | 0
.../SecurityHttpClientConfigCallback.java | 0
.../exporter/http/TemplateHttpResource.java | 0
.../http/TimeoutRequestConfigCallback.java | 0
.../exporter/http/VersionHttpResource.java | 0
.../http/WatcherExistsHttpResource.java | 0
.../monitoring/exporter/local/LocalBulk.java | 0
.../exporter/local/LocalExporter.java | 0
.../rest/MonitoringRestHandler.java | 0
.../rest/action/RestMonitoringBulkAction.java | 0
.../plugin-metadata/plugin-security.policy | 50 ++
.../watches/elasticsearch_cluster_status.json | 0
.../watches/elasticsearch_nodes.json | 0
.../elasticsearch_version_mismatch.json | 0
.../watches/kibana_version_mismatch.json | 0
.../watches/logstash_version_mismatch.json | 0
.../watches/xpack_license_expiration.json | 0
.../monitoring}/BaseCollectorTestCase.java | 22 +-
.../monitoring/LocalStateMonitoring.java | 51 ++
.../monitoring/MonitoredSystemTests.java | 0
.../monitoring/MonitoringFeatureSetTests.java | 2 +-
...onitoringHistoryDurationSettingsTests.java | 0
.../MonitoringPluginClientTests.java | 8 +-
.../monitoring/MonitoringServiceTests.java | 10 +-
.../xpack/monitoring/MonitoringTestUtils.java | 0
.../monitoring/MultiNodesStatsTests.java | 5 +
.../action/MonitoringBulkDocTests.java | 0
.../action/MonitoringBulkRequestTests.java | 0
.../action/MonitoringBulkResponseTests.java | 0
.../action/MonitoringIndexTests.java | 0
.../TransportMonitoringBulkActionTests.java | 0
.../AbstractIndicesCleanerTestCase.java | 4 +
.../cleaner/CleanerServiceTests.java | 0
.../local/LocalIndicesCleanerTests.java | 4 +
.../monitoring/collector/CollectorTests.java | 0
.../cluster/ClusterStatsCollectorTests.java | 33 +-
.../ClusterStatsMonitoringDocTests.java | 6 +-
.../indices/IndexRecoveryCollectorTests.java | 3 +-
.../IndexRecoveryMonitoringDocTests.java | 0
.../indices/IndexStatsCollectorTests.java | 2 +-
.../indices/IndexStatsMonitoringDocTests.java | 0
.../IndicesStatsMonitoringDocTests.java | 0
.../collector/ml/JobStatsCollectorTests.java | 2 +-
.../ml/JobStatsMonitoringDocTests.java | 0
.../node/NodeStatsCollectorTests.java | 2 +-
.../node/NodeStatsMonitoringDocTests.java | 0
.../shards/ShardsCollectorTests.java | 2 +-
.../shards/ShardsMonitoringDocTests.java | 0
.../BaseFilteredMonitoringDocTestCase.java | 0
.../exporter/BaseMonitoringDocTestCase.java | 0
.../BytesReferenceMonitoringDocTests.java | 0
.../exporter/ClusterAlertsUtilTests.java | 0
.../monitoring/exporter/ExportersTests.java | 0
.../MonitoringTemplateUtilsTests.java | 0
...stractPublishableHttpResourceTestCase.java | 0
.../http/ClusterAlertHttpResourceTests.java | 0
.../HttpExportBulkResponseListenerTests.java | 0
.../exporter/http/HttpExporterIT.java | 4 +
.../http/HttpExporterResourceTests.java | 0
.../exporter/http/HttpExporterTests.java | 0
.../exporter/http/HttpHostBuilderTests.java | 0
.../exporter/http/HttpResourceTests.java | 0
.../exporter/http/MockHttpResource.java | 0
.../exporter/http/MultiHttpResourceTests.java | 0
.../http/NodeFailureListenerTests.java | 0
.../http/PipelineHttpResourceTests.java | 0
.../http/PublishableHttpResourceTests.java | 0
.../monitoring/exporter/http/SchemeTests.java | 0
...SecurityHttpClientConfigCallbackTests.java | 0
.../http/TemplateHttpResourceTests.java | 0
.../TimeoutRequestConfigCallbackTests.java | 0
.../http/VersionHttpResourceTests.java | 0
.../http/WatcherExistsHttpResourceTests.java | 0
.../local/LocalExporterIntegTestCase.java | 6 +-
.../local/LocalExporterIntegTests.java | 5 +-
.../LocalExporterResourceIntegTests.java | 4 +
.../monitoring/integration/MonitoringIT.java | 2 +-
.../monitoring/test/MockIngestPlugin.java | 0
.../test/MonitoringIntegTestCase.java | 33 +-
.../src/test/resources/monitoring-test.json | 10 +
plugin/security/build.gradle | 89 ++-
.../forbidden/ldap-signatures.txt | 0
.../x-pack => security/src/main/bin}/certgen | 0
.../src/main/bin}/certgen.bat | 0
.../x-pack => security/src/main/bin}/certutil | 0
.../src/main/bin}/certutil.bat | 0
.../x-pack => security/src/main/bin}/migrate | 0
.../src/main/bin}/migrate.bat | 0
.../src/main/bin}/setup-passwords | 0
.../src/main/bin}/setup-passwords.bat | 0
.../src/main/bin}/syskeygen | 0
.../src/main/bin}/syskeygen.bat | 0
.../x-pack => security/src/main/bin}/users | 0
.../src/main/bin}/users.bat | 0
.../src/main/config}/role_mapping.yml | 0
.../src/main/config}/roles.yml | 0
.../x-pack => security/src/main/config}/users | 0
.../src/main/config}/users_roles | 0
.../security/PkiRealmBootstrapCheck.java | 4 +-
.../xpack/security/Security.java | 328 +++++-----
.../xpack/security/SecurityFeatureSet.java | 88 +--
.../security/SecurityLifecycleService.java | 3 +-
.../security/TokenSSLBootstrapCheck.java | 0
.../security/action/SecurityActionMapper.java | 0
.../action/filter/SecurityActionFilter.java | 6 +-
.../BulkShardRequestInterceptor.java | 4 +-
...cumentLevelSecurityRequestInterceptor.java | 4 +-
.../IndicesAliasesRequestInterceptor.java | 4 +-
.../interceptor/RequestInterceptor.java | 0
.../interceptor/ResizeRequestInterceptor.java | 4 +-
.../interceptor/SearchRequestInterceptor.java | 0
.../interceptor/UpdateRequestInterceptor.java | 0
.../realm/TransportClearRealmCacheAction.java | 8 +-
.../role/TransportClearRolesCacheAction.java | 4 +-
.../role/TransportDeleteRoleAction.java | 4 +-
.../action/role/TransportGetRolesAction.java | 3 +-
.../action/role/TransportPutRoleAction.java | 4 +-
.../TransportDeleteRoleMappingAction.java | 0
.../TransportGetRoleMappingsAction.java | 0
.../TransportPutRoleMappingAction.java | 0
.../token/TransportCreateTokenAction.java | 0
.../token/TransportInvalidateTokenAction.java | 0
.../token/TransportRefreshTokenAction.java | 0
.../user/TransportAuthenticateAction.java | 0
.../user/TransportChangePasswordAction.java | 0
.../user/TransportDeleteUserAction.java | 0
.../action/user/TransportGetUsersAction.java | 0
.../user/TransportHasPrivilegesAction.java | 0
.../action/user/TransportPutUserAction.java | 0
.../user/TransportSetEnabledAction.java | 0
.../xpack/security/audit/AuditLevel.java | 0
.../xpack/security/audit/AuditTrail.java | 0
.../security/audit/AuditTrailService.java | 0
.../xpack/security/audit/AuditUtil.java | 0
.../security/audit/index/IndexAuditTrail.java | 10 +-
.../audit/index/IndexNameResolver.java | 0
.../audit/logfile/LoggingAuditTrail.java | 0
.../security/authc/AuthenticationService.java | 0
.../security/authc/ExpiredTokenRemover.java | 0
.../xpack/security/authc/InternalRealms.java | 38 +-
.../xpack/security/authc/Realms.java | 22 +-
.../xpack/security/authc/TokenService.java | 83 +--
.../xpack/security/authc/UserToken.java | 0
.../esnative/ESNativeRealmMigrateTool.java | 0
.../security/authc/esnative/NativeRealm.java | 13 +-
.../authc/esnative/NativeUsersStore.java | 0
.../authc/esnative/ReservedRealm.java | 0
.../authc/esnative/UserAndPassword.java | 0
.../esnative/tool/CommandLineHttpClient.java | 0
.../esnative/tool/SetupPasswordTool.java | 0
.../xpack/security/authc/file/FileRealm.java | 12 +-
.../authc/file/FileUserPasswdStore.java | 0
.../authc/file/FileUserRolesStore.java | 0
.../security/authc/file/tool/UsersTool.java | 4 +-
.../ldap/ActiveDirectoryGroupsResolver.java | 4 +-
.../ldap/ActiveDirectorySessionFactory.java | 80 +--
.../xpack/security/authc/ldap/LdapRealm.java | 43 +-
.../authc/ldap/LdapSessionFactory.java | 22 +-
.../ldap/LdapUserSearchSessionFactory.java | 68 +--
.../authc/ldap/PoolingSessionFactory.java | 40 +-
.../authc/ldap/SearchGroupsResolver.java | 41 +-
.../ldap/UserAttributeGroupsResolver.java | 13 +-
.../authc/ldap/support/LdapLoadBalancing.java | 22 +-
.../ldap/support/LdapMetaDataResolver.java | 10 +-
.../authc/ldap/support/LdapSession.java | 0
.../authc/ldap/support/LdapUtils.java | 0
.../authc/ldap/support/SessionFactory.java | 56 +-
.../xpack/security/authc/pki/PkiRealm.java | 57 +-
.../authc/pki/X509AuthenticationToken.java | 0
.../security/authc/support/CachingRealm.java | 0
.../support/CachingUsernamePasswordRealm.java | 26 +-
.../security/authc/support/DnRoleMapper.java | 19 +-
.../RoleMappingFileBootstrapCheck.java | 3 +-
.../authc/support/UserRoleMapper.java | 0
.../authc/support/UsernamePasswordRealm.java | 0
.../support/mapper/CompositeRoleMapper.java | 3 -
.../mapper/NativeRoleMappingStore.java | 0
.../security/authz/AuthorizationService.java | 18 +-
.../security/authz/AuthorizationUtils.java | 0
.../security/authz/AuthorizedIndices.java | 0
.../authz/IndicesAndAliasesResolver.java | 9 +-
.../SecuritySearchOperationListener.java | 0
.../SecurityIndexSearcherWrapper.java | 3 +-
.../authz/store/CompositeRolesStore.java | 0
.../authz/store/NativeRolesStore.java | 0
.../security/crypto/tool/SystemKeyTool.java | 4 +-
.../xpack/security/rest/RemoteHostHeader.java | 0
.../security/rest/SecurityRestFilter.java | 0
.../rest/action/RestAuthenticateAction.java | 0
.../rest/action/SecurityBaseRestHandler.java | 2 +-
.../action/oauth2/RestGetTokenAction.java | 0
.../oauth2/RestInvalidateTokenAction.java | 0
.../realm/RestClearRealmCacheAction.java | 0
.../role/RestClearRolesCacheAction.java | 0
.../action/role/RestDeleteRoleAction.java | 0
.../rest/action/role/RestGetRolesAction.java | 0
.../rest/action/role/RestPutRoleAction.java | 0
.../RestDeleteRoleMappingAction.java | 0
.../RestGetRoleMappingsAction.java | 0
.../rolemapping/RestPutRoleMappingAction.java | 0
.../action/user/RestChangePasswordAction.java | 0
.../action/user/RestDeleteUserAction.java | 0
.../rest/action/user/RestGetUsersAction.java | 0
.../action/user/RestHasPrivilegesAction.java | 0
.../rest/action/user/RestPutUserAction.java | 0
.../action/user/RestSetEnabledAction.java | 0
.../support/AbstractSecurityModule.java | 0
.../support/FileAttributesChecker.java | 0
.../support/IndexLifecycleManager.java | 6 +-
.../xpack/security/support/SecurityFiles.java | 0
.../SecurityServerTransportInterceptor.java | 0
.../transport/ServerTransportFilter.java | 0
.../security/transport/filter/IPFilter.java | 0
.../transport/filter/PatternRule.java | 0
.../filter/SecurityIpFilterRule.java | 0
.../netty4/IpFilterRemoteAddressFilter.java | 0
.../SecurityNetty4HttpServerTransport.java | 0
.../netty4/SecurityNetty4ServerTransport.java | 4 +-
.../transport/nio/SSLChannelContext.java | 0
.../security/transport/nio/SSLDriver.java | 0
.../transport/nio/SecurityNioTransport.java | 0
.../plugin-metadata/plugin-security.policy | 50 ++
.../AbstractPrivilegeTestCase.java | 0
.../integration/BulkUpdateTests.java | 3 +-
.../integration/ClearRealmsCacheTests.java | 3 +-
.../integration/ClearRolesCacheTests.java | 0
.../integration/ClusterPrivilegeTests.java | 0
.../DateMathExpressionIntegTests.java | 0
.../DocumentAndFieldLevelSecurityTests.java | 0
.../DocumentLevelSecurityRandomTests.java | 0
.../DocumentLevelSecurityTests.java | 5 +-
.../FieldLevelSecurityRandomTests.java | 0
.../integration/FieldLevelSecurityTests.java | 5 +-
.../integration/IndexPrivilegeTests.java | 0
...onsWithAliasesWildcardsAndRegexsTests.java | 0
.../integration/KibanaUserRoleIntegTests.java | 0
.../MultipleIndicesPermissionsTests.java | 0
.../PermissionPrecedenceTests.java | 0
.../SecurityCachePermissionTests.java | 3 +-
.../integration/SecurityClearScrollTests.java | 5 +-
.../ShrinkIndexWithSecurityTests.java | 0
.../ldap/AbstractAdLdapRealmTestCase.java | 16 +-
.../ldap/ActiveDirectoryRunAsTests.java | 0
.../integration/ldap/GroupMappingTests.java | 0
.../ldap/MultiGroupMappingTests.java | 0
.../ldap/MultipleAdRealmTests.java | 0
...LicenseServiceSingleNodeSecurityTests.java | 0
.../LicenseServiceWithSecurityTests.java | 5 +-
.../elasticsearch/license/LicensingTests.java | 28 +-
.../license/XPackLicenseStateTests.java | 19 +-
.../test/NativeRealmIntegTestCase.java | 6 +-
.../test/SecurityIntegTestCase.java | 46 +-
.../test/SecuritySettingsSource.java | 44 +-
.../test/SecurityTestsUtils.java | 0
.../SecurityServerTransportServiceTests.java | 0
.../xpack/security/LocalStateSecurity.java | 58 ++
.../security/PkiRealmBootstrapCheckTests.java | 6 +-
.../security/ScrollHelperIntegTests.java | 0
.../xpack/security/SecurityContextTests.java | 0
.../security/SecurityFeatureSetTests.java | 6 +-
.../SecurityLifecycleServiceTests.java | 6 +-
.../xpack/security/SecurityPluginTests.java | 3 +-
.../xpack/security/SecuritySettingsTests.java | 30 +-
.../xpack/security/SecurityTests.java | 54 +-
.../xpack/security/TemplateUpgraderTests.java | 0
.../security/TokenSSLBootsrapCheckTests.java | 0
.../action/SecurityActionMapperTests.java | 0
.../filter/DestructiveOperationsTests.java | 0
.../filter/SecurityActionFilterTests.java | 0
...IndicesAliasesRequestInterceptorTests.java | 5 +-
.../ResizeRequestInterceptorTests.java | 5 +-
.../action/role/PutRoleBuilderTests.java | 0
.../role/TransportDeleteRoleActionTests.java | 0
.../role/TransportGetRolesActionTests.java | 0
.../role/TransportPutRoleActionTests.java | 0
.../PutRoleMappingRequestTests.java | 0
.../TransportGetRoleMappingsActionTests.java | 0
.../TransportPutRoleMappingActionTests.java | 0
.../action/token/CreateTokenRequestTests.java | 0
.../HasPrivilegesRequestBuilderTests.java | 0
.../user/PutUserRequestBuilderTests.java | 0
.../action/user/PutUserRequestTests.java | 0
.../TransportAuthenticateActionTests.java | 0
.../TransportChangePasswordActionTests.java | 10 +-
.../user/TransportDeleteUserActionTests.java | 0
.../user/TransportGetUsersActionTests.java | 0
.../TransportHasPrivilegesActionTests.java | 0
.../user/TransportPutUserActionTests.java | 4 +-
.../user/TransportSetEnabledActionTests.java | 0
.../xpack/security/audit/AuditLevelTests.java | 0
.../audit/AuditTrailServiceTests.java | 0
.../xpack/security/audit/AuditUtilTests.java | 0
.../security/audit/index/AuditTrailTests.java | 4 +-
.../index/IndexAuditTrailMutedTests.java | 0
.../audit/index/IndexAuditTrailTests.java | 22 +-
.../RemoteIndexAuditTrailStartingTests.java | 11 +-
.../audit/logfile/CapturingLogger.java | 0
.../logfile/LoggingAuditTrailFilterTests.java | 0
.../audit/logfile/LoggingAuditTrailTests.java | 0
.../authc/AuthenticationServiceTests.java | 0
.../security/authc/InternalRealmsTests.java | 11 +-
.../security/authc/RealmSettingsTests.java | 0
.../xpack/security/authc/RealmsTests.java | 65 +-
.../xpack/security/authc/RunAsIntegTests.java | 26 +-
.../security/authc/TokenAuthIntegTests.java | 33 +-
.../security/authc/TokenServiceTests.java | 0
.../xpack/security/authc/UserTokenTests.java | 0
.../esnative/ESNativeMigrateToolTests.java | 0
.../ESNativeRealmMigrateToolTests.java | 5 +-
.../authc/esnative/NativeRealmIntegTests.java | 13 +-
.../authc/esnative/NativeRealmTests.java | 0
.../authc/esnative/NativeUsersStoreTests.java | 0
.../esnative/ReservedRealmIntegTests.java | 0
.../authc/esnative/ReservedRealmTests.java | 0
.../esnative/tool/SetupPasswordToolTests.java | 0
.../security/authc/file/FileRealmTests.java | 0
.../authc/file/FileUserPasswdStoreTests.java | 8 +-
.../authc/file/FileUserRolesStoreTests.java | 4 +-
.../AbstractActiveDirectoryIntegTests.java | 11 +-
.../ActiveDirectoryGroupsResolverTests.java | 0
.../authc/ldap/ActiveDirectoryRealmTests.java | 60 +-
.../ActiveDirectorySessionFactoryTests.java | 15 +-
.../ldap/CancellableLdapRunnableTests.java | 0
.../authc/ldap/GroupsResolverTestCase.java | 0
.../security/authc/ldap/LdapRealmTests.java | 37 +-
.../authc/ldap/LdapSessionFactoryTests.java | 5 +-
.../security/authc/ldap/LdapTestUtils.java | 5 +-
.../LdapUserSearchSessionFactoryTests.java | 23 +-
.../SearchGroupsResolverInMemoryTests.java | 0
.../UserAttributeGroupsResolverTests.java | 0
.../authc/ldap/support/LDAPServersTests.java | 0
.../ldap/support/LdapLoadBalancingTests.java | 28 +-
.../support/LdapMetaDataResolverTests.java | 0
.../authc/ldap/support/LdapTestCase.java | 28 +-
.../SessionFactoryLoadBalancingTests.java | 0
.../ldap/support/SessionFactoryTests.java | 8 +-
.../authc/pki/PkiAuthenticationTests.java | 11 +-
.../authc/pki/PkiOptionalClientAuthTests.java | 4 +-
.../security/authc/pki/PkiRealmTests.java | 6 +-
.../security/authc/support/BCryptTests.java | 0
.../CachingUsernamePasswordRealmTests.java | 14 +-
.../authc/support/DnRoleMapperTests.java | 8 +-
.../security/authc/support/HasherTests.java | 0
.../RoleMappingFileBootstrapCheckTests.java | 2 +-
.../support/UsernamePasswordTokenTests.java | 0
.../mapper/ExpressionRoleMappingTests.java | 0
.../mapper/NativeUserRoleMapperTests.java | 0
.../expressiondsl/ExpressionParserTests.java | 7 +-
.../expressiondsl/FieldPredicateTests.java | 0
.../xpack/security/authz/AnalyzeTests.java | 0
.../authz/AuthorizationServiceTests.java | 86 +--
.../authz/AuthorizationUtilsTests.java | 0
.../authz/AuthorizedIndicesTests.java | 0
.../security/authz/IndexAliasesTests.java | 0
.../authz/IndicesAndAliasesResolverTests.java | 6 +-
.../security/authz/ReadActionsTests.java | 0
.../security/authz/RoleDescriptorTests.java | 0
.../security/authz/SecurityScrollTests.java | 6 +-
.../SecuritySearchOperationListenerTests.java | 0
.../security/authz/WriteActionsTests.java | 0
.../DocumentSubsetReaderTests.java | 0
...ldDataCacheWithFieldSubsetReaderTests.java | 0
.../accesscontrol/FieldExtractorTests.java | 0
.../accesscontrol/FieldSubsetReaderTests.java | 0
.../IndicesAccessControlTests.java | 0
.../accesscontrol/IndicesPermissionTests.java | 0
.../accesscontrol/OptOutQueryCacheTests.java | 0
...yIndexSearcherWrapperIntegrationTests.java | 0
...SecurityIndexSearcherWrapperUnitTests.java | 0
.../SetSecurityUserProcessorFactoryTests.java | 0
.../SetSecurityUserProcessorTests.java | 0
.../FieldPermissionsCacheTests.java | 0
.../permission/FieldPermissionsTests.java | 0
.../authz/permission/PermissionTests.java | 0
.../authz/privilege/PrivilegeTests.java | 0
.../authz/store/CompositeRolesStoreTests.java | 4 +-
.../authz/store/FileRolesStoreTests.java | 4 +-
.../authz/store/NativeRolesStoreTests.java | 3 +-
.../security/rest/RestRequestFilterTests.java | 0
.../rest/SecurityRestFilterTests.java | 6 +-
.../action/RestAuthenticateActionTests.java | 3 +-
.../action/SecurityBaseRestHandlerTests.java | 0
.../oauth2/RestGetTokenActionTests.java | 6 +-
.../user/HasPrivilegesRestResponseTests.java | 0
.../security/support/AutomatonsTests.java | 0
.../IndexLifecycleManagerIntegTests.java | 0
.../support/IndexLifecycleManagerTests.java | 0
.../security/support/ValidationTests.java | 0
.../security/test/SecurityTestUtils.java | 0
...curityServerTransportInterceptorTests.java | 0
...ServerTransportFilterIntegrationTests.java | 29 +-
.../transport/ServerTransportFilterTests.java | 0
.../transport/filter/IPFilterTests.java | 5 +-
.../filter/IpFilteringIntegrationTests.java | 0
.../filter/IpFilteringUpdateTests.java | 0
.../transport/filter/PatternRuleTests.java | 0
.../filter/SecurityIpFilterRuleTests.java | 0
.../DNSOnlyHostnameVerificationTests.java | 15 +-
.../netty4/IPHostnameVerificationTests.java | 0
.../IpFilterRemoteAddressFilterTests.java | 0
...ecurityNetty4HttpServerTransportTests.java | 0
.../SecurityNetty4ServerTransportTests.java | 0
.../netty4/SslHostnameVerificationTests.java | 4 +-
.../transport/ssl/EllipticCurveSSLTests.java | 0
.../transport/ssl/SslIntegrationTests.java | 6 +-
.../transport/ssl/SslMultiPortTests.java | 64 +-
.../transport/ssl/SslNullCipherTests.java | 0
.../user/AnonymousUserIntegTests.java | 0
.../security/user/AnonymousUserTests.java | 0
.../xpack/security/user/SystemUserTests.java | 0
.../xpack/security/user/UserTests.java | 0
.../xpack/security/user/XPackUserTests.java | 4 +-
.../xpack/ssl/SSLClientAuthTests.java | 6 +-
.../xpack/ssl/SSLReloadIntegTests.java | 7 +-
.../xpack/ssl/SSLTrustRestrictionsTests.java | 0
.../IndexLifecycleManagerTests-template.json | 0
...ssing-version-security-index-template.json | 0
.../security/action/role/roles2xformat.json | 0
.../xpack/security/authc/file/users | 0
.../xpack/security/authc/file/users_roles | 0
.../xpack/security/authc/ldap/ad-schema.ldif | 0
.../xpack/security/authc/ldap/ad.ldif | 0
.../security/authc/ldap/role_mapping.yml | 0
.../ldap/support/ldapWithGroupSearch.yml | 0
.../ldap/support/ldapWithRoleMapping.yml | 0
.../security/authc/ldap/support/ldaptrust.jks | Bin
.../authc/ldap/support/seven-seas.ldif | 0
.../xpack/security/authc/pki/role_mapping.yml | 0
.../security/authc/support/role_mapping.yml | 0
.../security/authz/store/default_roles.yml | 0
.../security/authz/store/invalid_roles.yml | 0
.../security/authz/store/reserved_roles.yml | 0
.../xpack/security/authz/store/roles.yml | 0
.../security/authz/store/roles2xformat.json | 0
.../security/authz/store/roles2xformat.yml | 0
.../keystore/testnode-different-passwords.jks | Bin
.../xpack/security/keystore/testnode.cert | 0
.../xpack/security/keystore/testnode.jks | Bin
.../keystore/truststore-testnode-only.jks | Bin
.../xpack/security/plugin/roles.yml | 0
.../elasticsearch/xpack/security/plugin/users | 0
.../xpack/security/plugin/users_roles | 0
.../ssl/certs/simple/README.asciidoc | 36 ++
.../ssl/certs/simple/active-directory-ca.crt | 23 +
.../transport/ssl/certs/simple/openldap.crt | 24 +
.../transport/ssl/certs/simple/openldap.der | Bin 0 -> 1035 bytes
.../ssl/certs/simple/openssl_config.cnf | 35 ++
.../ssl/certs/simple/prime256v1-cert.pem | 15 +
.../certs/simple/prime256v1-key-noparam.pem | 5 +
.../ssl/certs/simple/prime256v1-key.pem | 8 +
.../simple/testclient-client-profile.crt | 21 +
.../simple/testclient-client-profile.jks | Bin 0 -> 3300 bytes
.../simple/testclient-client-profile.p12 | Bin 0 -> 2648 bytes
.../simple/testclient-client-profile.pem | 30 +
.../transport/ssl/certs/simple/testclient.crt | 23 +
.../transport/ssl/certs/simple/testclient.jks | Bin 0 -> 3358 bytes
.../transport/ssl/certs/simple/testclient.p12 | Bin 0 -> 2666 bytes
.../transport/ssl/certs/simple/testclient.pem | 30 +
.../certs/simple/testnode-client-profile.crt | 21 +
.../certs/simple/testnode-client-profile.jks | Bin 0 -> 3239 bytes
.../certs/simple/testnode-client-profile.p12 | Bin 0 -> 2636 bytes
.../certs/simple/testnode-client-profile.pem | 30 +
.../simple/testnode-different-passwords.jks | Bin 0 -> 2339 bytes
.../ssl/certs/simple/testnode-ip-only.crt | 21 +
.../ssl/certs/simple/testnode-ip-only.jks | Bin 0 -> 2232 bytes
.../certs/simple/testnode-no-subjaltname.cert | 20 +
.../certs/simple/testnode-no-subjaltname.jks | Bin 0 -> 6284 bytes
.../transport/ssl/certs/simple/testnode.crt | 23 +
.../transport/ssl/certs/simple/testnode.jks | Bin 0 -> 6452 bytes
.../transport/ssl/certs/simple/testnode.p12 | Bin 0 -> 2654 bytes
.../transport/ssl/certs/simple/testnode.pem | 30 +
.../certs/simple/truststore-testnode-only.jks | Bin 0 -> 1048 bytes
plugin/sql/build.gradle | 8 +-
.../org/elasticsearch/xpack/XPackPlugin.java | 517 ----------------
.../logstash/LogstashSecurityExtension.java | 34 --
.../xpack/ml/MachineLearningFeatureSet.java | 319 ----------
.../ml/MachineLearningSecurityExtension.java | 47 --
.../MonitoringSecurityExtension.java | 79 ---
.../security/StackSecurityExtension.java | 68 ---
.../authz/store/ReservedRolesStore.java | 37 --
.../watcher/WatcherSecurityExtension.java | 55 --
...ticsearch.xpack.security.SecurityExtension | 5 -
.../meta-plugin-descriptor.properties | 21 +
.../xpack/CompositeTestingXPackPlugin.java | 72 +++
.../xpack/TimeWarpedXPackPlugin.java | 35 --
.../authz/store/ReservedRolesStoreTests.java | 50 +-
.../xpack/test/rest/XPackRestIT.java | 15 +-
.../xpack/watcher/test/TimeWarpedWatcher.java | 72 ---
.../rest-api-spec/test/xpack/10_basic.yml | 10 +-
plugin/upgrade/build.gradle | 35 ++
.../xpack/upgrade/IndexUpgradeCheck.java | 5 +-
.../upgrade/IndexUpgradeCheckFactory.java | 0
.../xpack/upgrade/IndexUpgradeService.java | 0
.../xpack/upgrade/InternalIndexReindexer.java | 0
.../elasticsearch/xpack/upgrade/Upgrade.java | 21 +-
.../actions/TransportIndexUpgradeAction.java | 0
.../TransportIndexUpgradeInfoAction.java | 4 +-
.../upgrade/rest/RestIndexUpgradeAction.java | 0
.../rest/RestIndexUpgradeInfoAction.java | 0
.../plugin-metadata/plugin-security.policy | 50 ++
.../xpack/upgrade/IndexUpgradeIT.java | 0
.../upgrade/IndexUpgradeIntegTestCase.java | 6 +-
.../upgrade/IndexUpgradeServiceTests.java | 0
.../xpack/upgrade/IndexUpgradeTasksIT.java | 2 +-
.../upgrade/InternalIndexReindexerIT.java | 0
.../IndexUpgradeActionRequestTests.java | 0
.../IndexUpgradeInfoActionRequestTests.java | 0
.../IndexUpgradeInfoActionResponseTests.java | 0
plugin/watcher/build.gradle | 64 +-
.../x-pack => watcher/src/main/bin}/croneval | 0
.../src/main/bin}/croneval.bat | 0
.../EncryptSensitiveDataBootstrapCheck.java | 4 +-
.../elasticsearch/xpack/watcher/Watcher.java | 105 ++--
.../xpack/watcher/WatcherClientHelper.java | 0
.../xpack/watcher/WatcherFeatureSet.java | 45 +-
.../watcher/WatcherIndexingListener.java | 0
.../watcher/WatcherLifeCycleService.java | 10 +-
.../xpack/watcher/WatcherService.java | 0
.../xpack/watcher/actions/ActionBuilders.java | 0
.../watcher/actions/email/EmailAction.java | 0
.../actions/email/EmailActionFactory.java | 0
.../actions/email/ExecutableEmailAction.java | 0
.../hipchat/ExecutableHipChatAction.java | 0
.../actions/hipchat/HipChatAction.java | 0
.../actions/hipchat/HipChatActionFactory.java | 0
.../actions/index/ExecutableIndexAction.java | 0
.../watcher/actions/index/IndexAction.java | 0
.../actions/index/IndexActionFactory.java | 0
.../actions/jira/ExecutableJiraAction.java | 0
.../watcher/actions/jira/JiraAction.java | 0
.../actions/jira/JiraActionFactory.java | 0
.../logging/ExecutableLoggingAction.java | 0
.../actions/logging/LoggingAction.java | 0
.../actions/logging/LoggingActionFactory.java | 0
.../watcher/actions/logging/LoggingLevel.java | 0
.../pagerduty/ExecutablePagerDutyAction.java | 0
.../actions/pagerduty/PagerDutyAction.java | 0
.../pagerduty/PagerDutyActionFactory.java | 0
.../actions/slack/ExecutableSlackAction.java | 0
.../watcher/actions/slack/SlackAction.java | 0
.../actions/slack/SlackActionFactory.java | 0
.../webhook/ExecutableWebhookAction.java | 0
.../actions/webhook/WebhookAction.java | 0
.../actions/webhook/WebhookActionFactory.java | 0
.../watcher/client/WatchSourceBuilders.java | 0
.../xpack/watcher/common/http/HttpClient.java | 0
.../watcher/common/http/HttpContentType.java | 0
.../xpack/watcher/common/http/HttpMethod.java | 0
.../xpack/watcher/common/http/HttpProxy.java | 0
.../watcher/common/http/HttpRequest.java | 0
.../common/http/HttpRequestTemplate.java | 0
.../watcher/common/http/HttpResponse.java | 0
.../watcher/common/http/HttpSettings.java | 0
.../xpack/watcher/common/http/Scheme.java | 0
.../common/http/SizeLimitInputStream.java | 0
.../common/http/auth/ApplicableHttpAuth.java | 0
.../watcher/common/http/auth/HttpAuth.java | 0
.../common/http/auth/HttpAuthFactory.java | 0
.../common/http/auth/HttpAuthRegistry.java | 0
.../http/auth/basic/ApplicableBasicAuth.java | 0
.../common/http/auth/basic/BasicAuth.java | 0
.../http/auth/basic/BasicAuthFactory.java | 0
.../xpack/watcher/common/stats/Counters.java | 0
.../watcher/common/text/TextTemplate.java | 0
.../common/text/TextTemplateEngine.java | 0
.../condition/AbstractCompareCondition.java | 0
.../condition/ArrayCompareCondition.java | 0
.../watcher/condition/CompareCondition.java | 0
.../condition/InternalAlwaysCondition.java | 0
.../watcher/condition/LenientCompare.java | 0
.../watcher/condition/NeverCondition.java | 0
.../watcher/condition/ScriptCondition.java | 0
.../execution/AsyncTriggerEventConsumer.java | 0
.../watcher/execution/CurrentExecutions.java | 0
.../watcher/execution/ExecutionService.java | 0
.../execution/InternalWatchExecutor.java | 4 +-
.../execution/ManualExecutionContext.java | 0
.../execution/SyncTriggerEventConsumer.java | 0
.../execution/TriggeredExecutionContext.java | 0
.../watcher/execution/TriggeredWatch.java | 0
.../execution/TriggeredWatchStore.java | 23 +-
.../watcher/execution/WatchExecutor.java | 0
.../xpack/watcher/history/HistoryStore.java | 20 +-
.../xpack/watcher/input/InputBuilders.java | 0
.../xpack/watcher/input/InputFactory.java | 0
.../xpack/watcher/input/InputRegistry.java | 0
.../xpack/watcher/input/chain/ChainInput.java | 0
.../input/chain/ChainInputFactory.java | 0
.../input/chain/ExecutableChainInput.java | 0
.../input/http/ExecutableHttpInput.java | 0
.../xpack/watcher/input/http/HttpInput.java | 0
.../watcher/input/http/HttpInputFactory.java | 0
.../input/none/ExecutableNoneInput.java | 0
.../watcher/input/none/NoneInputFactory.java | 0
.../input/search/ExecutableSearchInput.java | 0
.../watcher/input/search/SearchInput.java | 0
.../input/search/SearchInputFactory.java | 0
.../input/simple/ExecutableSimpleInput.java | 0
.../watcher/input/simple/SimpleInput.java | 0
.../input/simple/SimpleInputFactory.java | 0
.../transform/ExecutableTransformInput.java | 0
.../input/transform/TransformInput.java | 0
.../transform/TransformInputFactory.java | 0
.../notification/NotificationService.java | 0
.../watcher/notification/email/Account.java | 0
.../notification/email/Attachment.java | 0
.../notification/email/Authentication.java | 0
.../notification/email/DataAttachment.java | 0
.../watcher/notification/email/Email.java | 0
.../notification/email/EmailService.java | 0
.../notification/email/EmailTemplate.java | 0
.../notification/email/HtmlSanitizer.java | 0
.../watcher/notification/email/Profile.java | 0
.../email/attachment/DataAttachment.java | 0
.../attachment/DataAttachmentParser.java | 0
.../attachment/EmailAttachmentParser.java | 0
.../email/attachment/EmailAttachments.java | 0
.../attachment/EmailAttachmentsParser.java | 0
.../HttpEmailAttachementParser.java | 0
.../attachment/HttpRequestAttachment.java | 0
.../email/attachment/ReportingAttachment.java | 0
.../attachment/ReportingAttachmentParser.java | 0
.../email/support/BodyPartSource.java | 0
.../notification/hipchat/HipChatAccount.java | 0
.../notification/hipchat/HipChatMessage.java | 0
.../notification/hipchat/HipChatServer.java | 0
.../notification/hipchat/HipChatService.java | 0
.../hipchat/IntegrationAccount.java | 0
.../notification/hipchat/SentMessages.java | 0
.../notification/hipchat/UserAccount.java | 0
.../notification/hipchat/V1Account.java | 0
.../notification/jira/JiraAccount.java | 0
.../watcher/notification/jira/JiraIssue.java | 0
.../notification/jira/JiraService.java | 0
.../notification/pagerduty/IncidentEvent.java | 0
.../pagerduty/IncidentEventContext.java | 0
.../pagerduty/IncidentEventDefaults.java | 0
.../pagerduty/PagerDutyAccount.java | 0
.../pagerduty/PagerDutyService.java | 0
.../notification/pagerduty/SentEvent.java | 0
.../notification/slack/SentMessages.java | 0
.../notification/slack/SlackAccount.java | 0
.../notification/slack/SlackService.java | 0
.../notification/slack/message/Action.java | 0
.../slack/message/Attachment.java | 0
.../slack/message/DynamicAttachments.java | 0
.../notification/slack/message/Field.java | 0
.../slack/message/MessageElement.java | 0
.../slack/message/SlackMessage.java | 0
.../slack/message/SlackMessageDefaults.java | 0
.../watcher/rest/WatcherRestHandler.java | 0
.../rest/action/RestAckWatchAction.java | 0
.../rest/action/RestActivateWatchAction.java | 0
.../rest/action/RestDeleteWatchAction.java | 0
.../rest/action/RestExecuteWatchAction.java | 0
.../rest/action/RestGetWatchAction.java | 0
.../rest/action/RestPutWatchAction.java | 0
.../rest/action/RestWatchServiceAction.java | 0
.../rest/action/RestWatcherStatsAction.java | 0
.../watcher/support/ArrayObjectIterator.java | 0
.../xpack/watcher/support/Strings.java | 0
.../xpack/watcher/support/Variables.java | 0
.../support/WatcherIndexTemplateRegistry.java | 34 +-
.../support/XContentFilterKeysUtils.java | 0
.../search/WatcherSearchTemplateRequest.java | 0
.../search/WatcherSearchTemplateService.java | 0
.../watcher/transform/TransformBuilders.java | 0
.../script/ExecutableScriptTransform.java | 0
.../transform/script/ScriptTransform.java | 0
.../script/ScriptTransformFactory.java | 0
.../search/ExecutableSearchTransform.java | 0
.../transform/search/SearchTransform.java | 0
.../search/SearchTransformFactory.java | 0
.../actions/WatcherTransportAction.java | 4 +-
.../actions/ack/TransportAckWatchAction.java | 0
.../TransportActivateWatchAction.java | 0
.../delete/TransportDeleteWatchAction.java | 0
.../execute/TransportExecuteWatchAction.java | 4 +-
.../actions/get/TransportGetWatchAction.java | 0
.../actions/put/TransportPutWatchAction.java | 0
.../TransportWatcherServiceAction.java | 0
.../stats/TransportWatcherStatsAction.java | 0
.../watcher/trigger/TriggerBuilders.java | 0
.../xpack/watcher/trigger/TriggerEngine.java | 0
.../xpack/watcher/trigger/TriggerService.java | 0
.../watcher/trigger/manual/ManualTrigger.java | 0
.../trigger/manual/ManualTriggerEngine.java | 0
.../trigger/manual/ManualTriggerEvent.java | 0
.../xpack/watcher/trigger/schedule/Cron.java | 0
.../trigger/schedule/CronSchedule.java | 0
.../trigger/schedule/CronnableSchedule.java | 0
.../trigger/schedule/DailySchedule.java | 0
.../trigger/schedule/HourlySchedule.java | 0
.../trigger/schedule/IntervalSchedule.java | 0
.../trigger/schedule/MonthlySchedule.java | 0
.../watcher/trigger/schedule/Schedule.java | 0
.../trigger/schedule/ScheduleRegistry.java | 0
.../trigger/schedule/ScheduleTrigger.java | 0
.../schedule/ScheduleTriggerEngine.java | 0
.../schedule/ScheduleTriggerEvent.java | 0
.../watcher/trigger/schedule/Schedules.java | 0
.../trigger/schedule/WeeklySchedule.java | 0
.../trigger/schedule/YearlySchedule.java | 0
.../engine/TickerScheduleTriggerEngine.java | 0
.../trigger/schedule/support/DayOfWeek.java | 0
.../trigger/schedule/support/DayTimes.java | 0
.../trigger/schedule/support/Month.java | 0
.../trigger/schedule/support/MonthTimes.java | 0
.../trigger/schedule/support/Times.java | 0
.../trigger/schedule/support/WeekTimes.java | 0
.../trigger/schedule/support/YearTimes.java | 0
.../trigger/schedule/tool/CronEvalTool.java | 0
.../xpack/watcher/watch/WatchParser.java | 0
.../xpack/watcher/watch/WatchStoreUtils.java | 0
.../watcher/watch/clock/HaltedClock.java | 0
.../plugin-metadata/plugin-security.policy | 50 ++
.../NotificationServiceTests.java | 0
...cryptSensitiveDataBootstrapCheckTests.java | 0
.../watcher/WatcherClientHelperTests.java | 0
.../xpack/watcher/WatcherFeatureSetTests.java | 6 +-
.../watcher/WatcherIndexingListenerTests.java | 0
.../watcher/WatcherLifeCycleServiceTests.java | 9 +-
.../WatcherMetaDataSerializationTests.java | 6 +-
.../xpack/watcher/WatcherPluginTests.java | 6 +-
.../xpack/watcher/WatcherServiceTests.java | 0
.../actions/ActionErrorIntegrationTests.java | 0
.../watcher/actions/ActionWrapperTests.java | 0
.../actions/TimeThrottleIntegrationTests.java | 12 +-
.../actions/email/EmailActionTests.java | 0
.../actions/email/EmailAttachmentTests.java | 4 +-
.../hipchat/HipChatActionFactoryTests.java | 0
.../actions/hipchat/HipChatActionTests.java | 0
.../actions/index/IndexActionTests.java | 0
.../jira/ExecutableJiraActionTests.java | 0
.../actions/jira/JiraActionFactoryTests.java | 0
.../watcher/actions/jira/JiraActionTests.java | 0
.../actions/logging/LoggingActionTests.java | 0
.../PagerDutyActionFactoryTests.java | 0
.../pagerduty/PagerDutyActionTests.java | 0
.../slack/ExecutableSlackActionTests.java | 0
.../slack/SlackActionFactoryTests.java | 0
.../actions/slack/SlackActionTests.java | 0
.../actions/throttler/AckThrottlerTests.java | 0
.../throttler/ActionThrottleTests.java | 0
.../throttler/PeriodThrottlerTests.java | 0
.../throttler/WatchThrottlerTests.java | 0
.../actions/webhook/WebhookActionTests.java | 0
.../webhook/WebhookHttpsIntegrationTests.java | 0
.../webhook/WebhookIntegrationTests.java | 0
.../watcher/common/http/HttpClientTests.java | 0
.../http/HttpConnectionTimeoutTests.java | 0
.../common/http/HttpReadTimeoutTests.java | 0
.../common/http/HttpRequestTemplateTests.java | 0
.../watcher/common/http/HttpRequestTests.java | 0
.../common/http/HttpResponseTests.java | 0
.../http/SizeLimitInputStreamTests.java | 0
.../watcher/common/stats/CountersTests.java | 0
.../common/text/TextTemplateTests.java | 0
.../condition/AlwaysConditionTests.java | 0
.../ArrayCompareConditionSearchTests.java | 1 +
.../condition/ArrayCompareConditionTests.java | 0
.../CompareConditionSearchTests.java | 0
.../condition/CompareConditionTests.java | 0
.../condition/NeverConditionTests.java | 0
.../condition/ScriptConditionTests.java | 0
.../watcher/crypto/CryptoServiceTests.java | 0
.../execution/ExecutionServiceTests.java | 0
.../execution/TriggeredWatchStoreTests.java | 24 +-
.../history/HistoryActionConditionTests.java | 0
.../watcher/history/HistoryStoreTests.java | 4 +-
.../HistoryTemplateEmailMappingsTests.java | 2 +-
.../HistoryTemplateHttpMappingsTests.java | 10 +-
...storyTemplateIndexActionMappingsTests.java | 2 +-
...storyTemplateSearchInputMappingsTests.java | 4 +-
.../HistoryTemplateTimeMappingsTests.java | 2 +-
...HistoryTemplateTransformMappingsTests.java | 0
.../watcher/input/InputRegistryTests.java | 0
.../watcher/input/chain/ChainInputTests.java | 4 +-
.../input/chain/ChainIntegrationTests.java | 0
.../chain/ExecutableChainInputTests.java | 0
.../watcher/input/http/HttpInputTests.java | 0
.../input/simple/SimpleInputTests.java | 0
.../input/transform/TransformInputTests.java | 0
.../notification/email/AccountTests.java | 0
.../notification/email/AccountsTests.java | 0
.../email/DataAttachmentTests.java | 0
.../email/EmailSecretsIntegrationTests.java | 1 -
.../notification/email/EmailServiceTests.java | 0
.../email/EmailTemplateTests.java | 0
.../notification/email/EmailTests.java | 0
.../email/HtmlSanitizerTests.java | 0
.../notification/email/ProfileTests.java | 0
.../attachment/DataAttachmentParserTests.java | 0
.../EmailAttachmentParsersTests.java | 0
.../HttpEmailAttachementParserTests.java | 0
.../ReportingAttachmentParserTests.java | 0
.../email/support/EmailServer.java | 0
.../hipchat/HipChatAccountsTests.java | 0
.../hipchat/HipChatMessageTests.java | 0
.../hipchat/HipChatServiceTests.java | 0
.../hipchat/IntegrationAccountTests.java | 0
.../hipchat/UserAccountTests.java | 0
.../notification/hipchat/V1AccountTests.java | 0
.../notification/jira/JiraAccountTests.java | 0
.../notification/jira/JiraIssueTests.java | 0
.../pagerduty/IncidentEventDefaultsTests.java | 0
.../pagerduty/PagerDutyAccountsTests.java | 0
.../message/SlackMessageDefaultsTests.java | 0
.../slack/message/SlackMessageTests.java | 0
.../action/RestExecuteWatchActionTests.java | 0
.../watcher/support/FilterXContentTests.java | 0
.../xpack/watcher/support/VariablesTests.java | 0
.../support/WatcherDateTimeUtilsTests.java | 0
.../WatcherIndexTemplateRegistryTests.java | 22 +-
.../watcher/support/WatcherUtilsTests.java | 0
.../WatcherSearchTemplateRequestTests.java | 0
.../support/xcontent/MapPathTests.java | 0
.../support/xcontent/XContentSourceTests.java | 0
.../AbstractWatcherIntegrationTestCase.java | 68 +--
.../xpack/watcher/test/LocalStateWatcher.java | 34 ++
.../watcher/test/MockTextTemplateEngine.java | 0
.../xpack/watcher/test/TimeWarpedWatcher.java | 108 ++++
.../WatchExecutionContextMockBuilder.java | 0
.../xpack/watcher/test/WatcherTestUtils.java | 0
.../bench/ScheduleEngineTriggerBenchmark.java | 0
.../WatcherExecutorServiceBenchmark.java | 27 +-
.../bench/WatcherScheduleEngineBenchmark.java | 11 +-
.../test/integration/BasicWatcherTests.java | 0
.../test/integration/BootStrapTests.java | 21 +-
.../ExecutionVarsIntegrationTests.java | 0
.../test/integration/HipChatServiceTests.java | 9 +-
.../integration/HistoryIntegrationTests.java | 0
.../HttpSecretsIntegrationTests.java | 0
.../integration/PagerDutyServiceTests.java | 0
.../test/integration/SearchInputTests.java | 0
.../integration/SearchTransformTests.java | 0
.../test/integration/SlackServiceTests.java | 0
.../test/integration/WatchAckTests.java | 6 +-
.../test/integration/WatchMetadataTests.java | 4 +-
.../transform/TransformIntegrationTests.java | 0
.../transform/chain/ChainTransformTests.java | 0
.../script/ScriptTransformTests.java | 0
.../action/WatchRequestValidationTests.java | 0
.../action/activate/ActivateWatchTests.java | 0
.../action/delete/DeleteWatchTests.java | 5 +-
.../execute/ExecuteWatchRequestTests.java | 0
.../action/execute/ExecuteWatchTests.java | 0
.../transport/action/get/GetWatchTests.java | 0
.../put/PutWatchSerializationTests.java | 0
.../put/TransportPutWatchActionTests.java | 0
.../trigger/ScheduleTriggerEngineMock.java | 0
.../trigger/schedule/CronScheduleTests.java | 0
.../trigger/schedule/DailyScheduleTests.java | 0
.../trigger/schedule/HourlyScheduleTests.java | 0
.../schedule/IntervalScheduleTests.java | 0
.../schedule/MonthlyScheduleTests.java | 0
.../schedule/ScheduleRegistryTests.java | 0
.../trigger/schedule/ScheduleTestCase.java | 0
.../schedule/ScheduleTriggerEventTests.java | 0
.../trigger/schedule/WeeklyScheduleTests.java | 0
.../trigger/schedule/YearlyScheduleTests.java | 0
.../engine/TickerScheduleEngineTests.java | 0
.../schedule/tool/CronEvalToolTests.java | 0
.../watch/WatchStatusIntegrationTests.java | 2 +-
.../xpack/watcher/watch/WatchStatusTests.java | 0
.../xpack/watcher/watch/WatchTests.java | 0
.../xpack/watcher/watch/clock/ClockTests.java | 0
.../xpack/security/keystore/testnode.jks | Bin 0 -> 6766 bytes
.../keystore/truststore-testnode-only.jks | Bin 0 -> 943 bytes
.../certs/simple/testnode-no-subjaltname.jks | Bin 0 -> 6284 bytes
qa/audit-tests/build.gradle | 12 +-
.../xpack/security/audit/IndexAuditIT.java | 14 +-
qa/core-rest-tests-with-security/build.gradle | 3 +-
qa/full-cluster-restart/build.gradle | 22 +-
qa/ml-basic-multi-node/build.gradle | 3 +-
qa/ml-disabled/build.gradle | 3 +-
qa/ml-no-bootstrap-tests/build.gradle | 3 +-
qa/ml-single-node-tests/build.gradle | 3 +-
qa/multi-cluster-search-security/build.gradle | 4 +-
qa/multi-node/build.gradle | 2 +-
qa/openldap-tests/build.gradle | 5 +-
.../org/elasticsearch/test/OpenLdapTests.java | 3 +-
.../authc/ldap/SearchGroupsResolverTests.java | 2 +-
qa/reindex-tests-with-security/build.gradle | 5 +-
.../xpack/security/ReindexWithSecurityIT.java | 26 +-
qa/rolling-upgrade/build.gradle | 18 +-
.../TokenBackwardsCompatibilityIT.java | 10 +-
qa/security-client-tests/build.gradle | 6 +-
.../qa/SecurityTransportClientIT.java | 13 +-
qa/security-example-extension/build.gradle | 6 +-
.../example/realm/CustomRealmIT.java | 3 +-
.../example/role/CustomRolesProviderIT.java | 4 +-
qa/security-migrate-tests/build.gradle | 3 +-
.../xpack/security/MigrateToolTestCase.java | 2 +-
qa/security-setup-password-tests/build.gradle | 5 +-
qa/security-tools-tests/build.gradle | 14 +
.../authc/file/tool/UsersToolTests.java | 42 +-
.../crypto/tool/SystemKeyToolTests.java | 4 +-
.../support/FileAttributesCheckerTests.java | 0
.../security/support/SecurityFilesTests.java | 0
.../ssl/CertificateGenerateToolTests.java | 74 +--
.../xpack/ssl/CertificateToolTests.java | 112 ++--
.../build.gradle | 2 +-
qa/smoke-test-ml-with-security/build.gradle | 3 +-
.../smoketest/MlWithSecurityIT.java | 8 +-
.../build.gradle | 4 +-
qa/smoke-test-plugins-ssl/build.gradle | 19 +-
.../SmokeTestMonitoringWithSecurityIT.java | 6 +-
qa/smoke-test-plugins/build.gradle | 10 +-
...SmokeTestPluginsClientYamlTestSuiteIT.java | 1 +
.../build.gradle | 4 +-
.../build.gradle | 3 +-
.../smoketest/WatcherWithMustacheIT.java | 4 +-
.../build.gradle | 2 +-
.../smoketest/WatcherWithPainlessIT.java | 4 +-
.../build.gradle | 2 +-
...cherWithSecurityClientYamlTestSuiteIT.java | 4 +-
qa/smoke-test-watcher/build.gradle | 2 +-
...SmokeTestWatcherClientYamlTestSuiteIT.java | 4 +-
qa/transport-client-tests/build.gradle | 2 +-
qa/tribe-tests-with-license/build.gradle | 11 +-
.../license/TribeTransportTestCase.java | 43 +-
.../elasticsearch/test/LicensingTribeIT.java | 7 +-
.../monitoring/MonitoringPluginTests.java | 17 +-
.../monitoring/MonitoringTribeTests.java | 3 +-
qa/tribe-tests-with-security/build.gradle | 7 +-
.../test/TribeWithSecurityIT.java | 24 +-
.../xpack/security/SecurityTribeTests.java | 5 +-
qa/vagrant/build.gradle | 2 +-
transport-client/build.gradle | 2 +
.../client/PreBuiltXPackTransportClient.java | 6 +-
.../PreBuiltXPackTransportClientTests.java | 5 +-
1826 files changed, 7722 insertions(+), 4185 deletions(-)
delete mode 100644 plugin/bin/x-pack/x-pack-env
delete mode 100644 plugin/bin/x-pack/x-pack-env.bat
rename plugin/{security => core}/licenses/bcpkix-jdk15on-1.58.jar.sha1 (100%)
rename plugin/{security => core}/licenses/bcprov-jdk15on-1.58.jar.sha1 (100%)
rename plugin/{security => core}/licenses/bouncycastle-LICENSE.txt (100%)
rename plugin/{security => core}/licenses/bouncycastle-NOTICE.txt (100%)
create mode 100644 plugin/core/licenses/commons-LICENSE.txt
create mode 100644 plugin/core/licenses/commons-NOTICE.txt
create mode 100644 plugin/core/licenses/commons-codec-1.10.jar.sha1
create mode 100644 plugin/core/licenses/commons-logging-1.1.3.jar.sha1
create mode 100644 plugin/core/licenses/httpasyncclient-4.1.2.jar.sha1
create mode 100644 plugin/core/licenses/httpclient-4.5.2.jar.sha1
create mode 100644 plugin/core/licenses/httpclient-LICENSE.txt
create mode 100644 plugin/core/licenses/httpclient-NOTICE.txt
create mode 100644 plugin/core/licenses/httpcore-4.4.5.jar.sha1
rename plugin/{security => core}/licenses/unboundid-ldapsdk-3.2.0.jar.sha1 (100%)
rename plugin/{security => core}/licenses/unboundid-ldapsdk-LICENSE.txt (100%)
rename plugin/{security => core}/licenses/unboundid-ldapsdk-NOTICE.txt (100%)
rename plugin/{bin/x-pack => core/src/main/bin}/extension (100%)
rename plugin/{bin/x-pack => core/src/main/bin}/extension.bat (100%)
create mode 100644 plugin/core/src/main/bin/x-pack-env
create mode 100644 plugin/core/src/main/bin/x-pack-env.bat
rename plugin/{config/x-pack => core/src/main/config}/log4j2.properties (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/common/network/InetAddressHelper.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/CryptUtils.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/ExpirationCallback.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/LicenseService.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/LicenseUtils.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/LicenseVerifier.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/LicensesMetaData.java (97%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/Licensing.java (88%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/LicensingClient.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/RestGetTrialStatus.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/RestPostStartTrialLicense.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/SelfGeneratedLicense.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/TransportDeleteLicenseAction.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/TransportGetLicenseAction.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/TransportGetTrialStatusAction.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/TransportPostStartTrialAction.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/TransportPutLicenseAction.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/license/package-info.java (100%)
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/EmptyXPackFeatureSet.java
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/XPackClient.java (100%)
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/XPackClientPlugin.java
rename plugin/core/src/main/java/org/elasticsearch/xpack/{XpackField.java => XPackField.java} (92%)
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/XPackPlugin.java
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/action/TransportXPackInfoAction.java (98%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/action/TransportXPackUsageAction.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/common/IteratingActionListener.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/common/socket/SocketAccess.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/extensions/InstallXPackExtensionCommand.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/extensions/ListXPackExtensionCommand.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/extensions/RemoveXPackExtensionCommand.java (90%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/extensions/XPackExtension.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionCli.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionInfo.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionPolicy.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionSecurity.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionsService.java (100%)
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/graph/GraphFeatureSetUsage.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/ml/MachineLearningFeatureSetUsage.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/ml/MachineLearningField.java
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ml/client/MachineLearningClient.java (100%)
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/ml/notifications/AuditorField.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSetUsage.java
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/monitoring/client/MonitoringClient.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/rest/XPackRestHandler.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/rest/action/RestXPackInfoAction.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/rest/action/RestXPackUsageAction.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/scheduler/SchedulerEngine.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/ScrollHelper.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/SecurityContext.java (94%)
delete mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityExtension.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityFeatureSetUsage.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/SecurityLifecycleServiceField.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/SecuritySettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/UserSettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailField.java
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authc/Authentication.java (98%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationFailureHandler.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationResult.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationToken.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authc/DefaultAuthenticationFailureHandler.java (100%)
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/InternalRealmsSettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/KeyAndTimestamp.java
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authc/Realm.java (96%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authc/RealmConfig.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authc/RealmSettings.java (98%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authc/TokenMetaData.java (86%)
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmSettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/file/FileRealmSettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactorySettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealmSettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactorySettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactorySettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/PoolingSessionFactorySettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverSettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolverSettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancingSettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapMetaDataResolverSettings.java
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSearchScope.java (100%)
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactorySettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmSettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealmSettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapperSettings.java
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordToken.java (98%)
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/CompositeRoleMapperSettings.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceField.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolverField.java
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReader.java (98%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractor.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReader.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControl.java (97%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java (98%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessor.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/permission/ClusterPermission.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissions.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCache.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsDefinition.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/permission/IndicesPermission.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/permission/Role.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/permission/RunAsPermission.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/privilege/ClusterPrivilege.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/privilege/HealthAndStatsPrivilege.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/privilege/IndexPrivilege.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/privilege/Privilege.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/privilege/SystemPrivilege.java (100%)
delete mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/ClientReservedRoles.java
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java (98%)
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStore.java
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/client/SecurityClient.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/rest/RestRequestFilter.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/support/NoOpLogger.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/transport/SSLExceptionHelper.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4Transport.java (93%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/user/BuiltinUserInfo.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/user/ElasticUser.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/user/InternalUserSerializationHelper.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/user/KibanaUser.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/user/LogstashSystemUser.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/user/SystemUser.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/user/XPackSecurityUser.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/security/user/XPackUser.java (93%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/CertUtils.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/CertificateGenerateTool.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/CertificateTool.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/CertificateTrustRestrictions.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/DefaultJDKTrustConfig.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/KeyConfig.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/PEMKeyConfig.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/PEMTrustConfig.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/RestrictedTrustConfig.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/RestrictedTrustManager.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/SSLConfiguration.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloader.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/SSLService.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/StoreKeyConfig.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/StoreTrustConfig.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/TLSLicenseBootstrapCheck.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/TrustAllConfig.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/TrustConfig.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/action/TransportGetCertificateInfoAction.java (100%)
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/ssl/rest/RestGetCertificateInfoAction.java (100%)
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeCheckVersion.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/UpgradeField.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/watcher/WatcherFeatureSetUsage.java
rename plugin/{ => core}/src/main/java/org/elasticsearch/xpack/watcher/client/WatcherClient.java (100%)
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreField.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/watcher/history/HistoryStoreField.java
create mode 100644 plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryField.java
rename plugin/{ => core}/src/main/plugin-metadata/plugin-security.policy (100%)
rename plugin/{ => core}/src/main/resources/logstash-index-template.json (100%)
rename plugin/{ => core}/src/main/resources/monitoring-alerts.json (100%)
rename plugin/{ => core}/src/main/resources/monitoring-beats.json (100%)
rename plugin/{ => core}/src/main/resources/monitoring-es.json (100%)
rename plugin/{ => core}/src/main/resources/monitoring-kibana.json (100%)
rename plugin/{ => core}/src/main/resources/monitoring-logstash.json (100%)
rename plugin/{ => core}/src/main/resources/security-index-template.json (100%)
rename plugin/{ => core}/src/main/resources/security_audit_log.json (100%)
rename plugin/{ => core}/src/main/resources/triggered-watches.json (100%)
rename plugin/{ => core}/src/main/resources/watch-history.json (100%)
rename plugin/{ => core}/src/main/resources/watches.json (100%)
rename plugin/{src/main/resources/org/elasticsearch => core/src/main/resources}/xpack/security/crypto/migrate.help (100%)
rename plugin/{src/main/resources/org/elasticsearch => core/src/main/resources}/xpack/security/crypto/tool/syskey-generate.help (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/action/MockIndicesRequest.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsResponseTestUtils.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/http/netty4/Netty4HttpMockUtil.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/AbstractLicenseServiceTestCase.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java (85%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/ExpirationCallbackTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/LicenseClusterChangeTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/LicenseOperationModeTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/LicenseOperationModeUpdateTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/LicenseRegistrationTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/LicenseScheduleTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/LicenseSerializationTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/LicenseServiceClusterNotRecoveredTests.java (92%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/LicenseServiceClusterTests.java (97%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/LicenseUtilsTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/LicensesAcknowledgementTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/LicensesManagerServiceTests.java (96%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/LicensesMetaDataSerializationTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/LicensesTransportTests.java (96%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/OperationModeFileWatcherTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/PutLicenseResponseTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/SelfGeneratedLicenseTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/TestUtils.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/license/UpgradeToTrialTests.java (92%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java (95%)
create mode 100644 plugin/core/src/test/java/org/elasticsearch/test/SecuritySettingsSourceField.java
rename plugin/{ => core}/src/test/java/org/elasticsearch/test/TestMatchers.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/test/http/Headers.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/test/http/MockRequest.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/test/http/MockResponse.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/test/http/MockWebServer.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/ClientHelperTests.java (100%)
create mode 100644 plugin/core/src/test/java/org/elasticsearch/xpack/LocalStateCompositeXPackPlugin.java
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/TestXPackTransportClient.java (89%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/XPackSettingsTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/XPackSingleNodeTestCase.java (70%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/action/TransportXPackInfoActionTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/common/IteratingActionListenerTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationChecksTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationInfoActionRequestTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationInfoActionResponseTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/deprecation/DeprecationIssueTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/extensions/InstallXPackExtensionCommandTests.java (97%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/extensions/ListXPackExtensionCommandTests.java (98%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/extensions/RemoveXPackExtensionCommandTests.java (98%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionInfoTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionSecurityTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionTestUtil.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionsServiceTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/ml/integration/MlRestTestStateCleaner.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/monitoring/test/MockPainlessScriptEngine.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/persistent/CancelPersistentTaskRequestTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksClusterServiceTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksCustomMetaDataTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutorFullRestartIT.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutorIT.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksExecutorResponseTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksNodeServiceStatusTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksNodeServiceTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/persistent/RestartPersistentTaskRequestTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/persistent/StartPersistentActionRequestTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/persistent/TestPersistentTasksPlugin.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/persistent/UpdatePersistentTaskRequestTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/security/test/SecurityAssertions.java (90%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/ssl/CertUtilsTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/ssl/RestrictedTrustConfigTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/ssl/RestrictedTrustManagerTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloaderTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationSettingsTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/ssl/SSLServiceTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/ssl/StoreKeyConfigTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/ssl/TLSLicenseBootstrapCheckTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/ssl/TestsSSLService.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/ssl/cert/CertificateInfoTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/template/TemplateUtilsTests.java (100%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestTestHelper.java (97%)
rename plugin/{ => core}/src/test/java/org/elasticsearch/xpack/watcher/watch/clock/ClockMock.java (100%)
rename plugin/{ => core}/src/test/resources/monitoring-test.json (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/extensions/security/complex-x-pack-extension-security.policy (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/extensions/security/simple-x-pack-extension-security.policy (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/extensions/security/unresolved-x-pack-extension-security.policy (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/README.asciidoc (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/active-directory-ca.crt (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openldap.crt (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openldap.der (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openssl_config.cnf (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/prime256v1-cert.pem (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/prime256v1-key-noparam.pem (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/prime256v1-key.pem (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.crt (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.jks (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.p12 (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.pem (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.crt (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.jks (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.p12 (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.pem (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.crt (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.jks (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.p12 (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.pem (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-different-passwords.jks (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-ip-only.crt (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-ip-only.jks (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-no-subjaltname.cert (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-no-subjaltname.jks (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.crt (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.jks (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.p12 (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.pem (100%)
rename plugin/{ => core}/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/truststore-testnode-only.jks (100%)
rename plugin/{ => core}/src/test/resources/private.key (100%)
rename plugin/{ => core}/src/test/resources/public.key (100%)
create mode 100644 plugin/deprecation/build.gradle
rename plugin/{ => deprecation}/src/main/java/org/elasticsearch/xpack/deprecation/Deprecation.java (92%)
rename plugin/{ => deprecation}/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecks.java (100%)
rename plugin/{ => deprecation}/src/main/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecks.java (100%)
rename plugin/{ => deprecation}/src/main/java/org/elasticsearch/xpack/deprecation/RestDeprecationInfoAction.java (100%)
rename plugin/{ => deprecation}/src/main/java/org/elasticsearch/xpack/deprecation/TransportDeprecationInfoAction.java (98%)
create mode 100644 plugin/deprecation/src/main/plugin-metadata/plugin-security.policy
rename plugin/{ => deprecation}/src/test/java/org/elasticsearch/xpack/deprecation/IndexDeprecationChecksTests.java (100%)
rename plugin/{ => graph}/src/main/java/org/elasticsearch/xpack/graph/Graph.java (78%)
rename plugin/{ => graph}/src/main/java/org/elasticsearch/xpack/graph/GraphFeatureSet.java (75%)
rename plugin/{ => graph}/src/main/java/org/elasticsearch/xpack/graph/action/TransportGraphExploreAction.java (99%)
rename plugin/{ => graph}/src/main/java/org/elasticsearch/xpack/graph/rest/action/RestGraphAction.java (100%)
create mode 100644 plugin/graph/src/main/plugin-metadata/plugin-security.policy
rename plugin/{ => graph}/src/test/java/org/elasticsearch/xpack/graph/GraphFeatureSetTests.java (97%)
rename plugin/{ => graph}/src/test/java/org/elasticsearch/xpack/graph/test/GraphTests.java (97%)
create mode 100644 plugin/logstash/build.gradle
rename plugin/{ => logstash}/src/main/java/org/elasticsearch/xpack/logstash/Logstash.java (89%)
rename plugin/{ => logstash}/src/main/java/org/elasticsearch/xpack/logstash/LogstashFeatureSet.java (100%)
create mode 100644 plugin/logstash/src/main/plugin-metadata/plugin-security.policy
rename plugin/{ => logstash}/src/test/java/org/elasticsearch/xpack/logstash/LogstashFeatureSetTests.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/InvalidLicenseEnforcer.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/MachineLearning.java (88%)
create mode 100644 plugin/ml/src/main/java/org/elasticsearch/xpack/ml/MachineLearningFeatureSet.java
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/MlAssignmentNotifier.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/MlDailyMaintenanceService.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/MlInitializationService.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/MlLifeCycleService.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportCloseJobAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteCalendarAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteCalendarEventAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteDatafeedAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteExpiredDataAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteFilterAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteJobAction.java (98%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportDeleteModelSnapshotAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportFinalizeJobExecutionAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportFlushJobAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportForecastJobAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetBucketsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetCalendarEventsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetCalendarsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetCategoriesAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetDatafeedsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetDatafeedsStatsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetFiltersAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetInfluencersAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetJobsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetJobsStatsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetModelSnapshotsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetOverallBucketsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportGetRecordsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportIsolateDatafeedAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportJobTaskAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportKillProcessAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportOpenJobAction.java (99%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportPostCalendarEventsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportPostDataAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportPreviewDatafeedAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutCalendarAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutDatafeedAction.java (99%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutFilterAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutJobAction.java (96%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportRevertModelSnapshotAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportStartDatafeedAction.java (99%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportStopDatafeedAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateCalendarJobAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateDatafeedAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateJobAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateModelSnapshotAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpdateProcessAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportValidateDetectorAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/action/TransportValidateJobConfigAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJob.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobBuilder.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedManager.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedNodeSelector.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/ProblemTracker.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractorFactory.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractor.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorContext.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorFactory.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationToJsonProcessor.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractor.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorContext.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorFactory.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedField.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFields.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractor.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorContext.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorFactory.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/SearchHitToJsonProcessor.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/JobManager.java (98%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/UpdateJobProcessNotifier.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/categorization/CategorizationAnalyzer.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/categorization/MlClassicTokenizer.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/categorization/MlClassicTokenizerFactory.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobDataCountsPersister.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersister.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersister.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/persistence/StateStreamer.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsAggregator.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsCollector.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsProcessor.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsProvider.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/CountingInputStream.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporter.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/DataStreamDiagnostics.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/NativeController.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/NativeControllerHolder.java (93%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrl.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/ProcessPipes.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectBuilder.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicator.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcess.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessFactory.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManager.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcess.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcess.java (98%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessFactory.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/ProcessContext.java (96%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/UpdateParams.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessor.java (99%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutodetectResultsParser.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListener.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/StateProcessor.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/DataLoadParams.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/FlushJobParams.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/ForecastParams.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRange.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriter.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriter.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CannotParseTimestampException.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriter.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriter.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvRecordWriter.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriter.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactory.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateFormatDateTransformer.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateTransformer.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DoubleDateTransformer.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriter.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriter.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/LengthEncodedWriter.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/MlFilterWriter.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelPlotConfigWriter.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ScheduledEventsWriter.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/WriterConstants.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/XContentRecordReader.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessage.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessageHandler.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/AbstractLeafNormalizable.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizable.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizable.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizable.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Level.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/MultiplyingNormalizerProcess.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcess.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcessFactory.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Normalizable.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Normalizer.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerFactory.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerProcess.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerProcessFactory.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerResult.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/PartitionScoreNormalizable.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/RecordNormalizable.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Renormalizer.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdater.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizer.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/output/NormalizerResultHandler.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/results/AutodetectResult.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/retention/AbstractExpiredJobDataRemover.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredForecastsRemover.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredModelSnapshotsRemover.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredResultsRemover.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/job/retention/MlDataRemover.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/notifications/Auditor.java (95%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/RestDeleteExpiredDataAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestDeleteCalendarAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestDeleteCalendarEventAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestDeleteCalendarJobAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestGetCalendarEventsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestGetCalendarsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestPostCalendarEventAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestPutCalendarAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/calendar/RestPutCalendarJobAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestDeleteDatafeedAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedStatsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestPreviewDatafeedAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestPutDatafeedAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStartDatafeedAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStopDatafeedAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestUpdateDatafeedAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestDeleteFilterAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestGetFiltersAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestPutFilterAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestCloseJobAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestDeleteJobAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestFlushJobAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestForecastJobAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobStatsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestOpenJobAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostDataAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostJobUpdateAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPutJobAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestDeleteModelSnapshotAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestGetModelSnapshotsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestRevertModelSnapshotAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestUpdateModelSnapshotAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetBucketsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetCategoriesAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetInfluencersAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetOverallBucketsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetRecordsAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateDetectorAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateJobConfigAction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/utils/DomainSplitFunction.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/utils/NamedPipeHelper.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/utils/StatsAccumulator.java (100%)
rename plugin/{ => ml}/src/main/java/org/elasticsearch/xpack/ml/utils/VolatileCursorIterator.java (100%)
create mode 100644 plugin/ml/src/main/plugin-metadata/plugin-security.policy
rename plugin/{ => ml}/src/main/resources/org/elasticsearch/xpack/ml/transforms/exact.properties (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/license/MachineLearningLicensingTests.java (92%)
create mode 100644 plugin/ml/src/test/java/org/elasticsearch/xpack/ml/LocalStateMachineLearning.java
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/MachineLearningFeatureSetTests.java (97%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/MachineLearningTests.java (92%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/MlAssignmentNotifierTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/MlClientHelperTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/MlDailyManagementServiceTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/MlInitializationServiceTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/MlMetadataTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/DeleteCalendarEventActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/DeleteDatafeedRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/DeleteExpiredDataActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/DeleteJobActionTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/DeleteJobRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/ForecastJobActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/ForecastJobActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetCalendarEventsActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetCalendarsActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsStatsActionTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetOverallBucketsActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetOverallBucketsActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionTests.java (99%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/PostCalendarEventActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/PreviewDatafeedActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/PreviewDatafeedActionTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/PutCalendarActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/PutCalendarActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/PutFilterActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/StopDatafeedActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/UpdateCalendarJobActionResquestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/UpdateDatafeedActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/UpdateJobActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotActionResponseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/UpdateProcessActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/ValidateDetectorActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/ValidateJobConfigActionRequestTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/util/PageParamsTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/action/util/QueryPageTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/calendars/CalendarTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/calendars/ScheduledEventTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/ChunkingConfigTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedConfigTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobBuilderTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobValidatorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedManagerTests.java (99%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedNodeSelectorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedStateTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedUpdateTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/ProblemTrackerTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractorFactoryTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/ExtractorUtilsTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorFactoryTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationTestUtils.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationToJsonProcessorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorFactoryTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFieldTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFieldsTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/SearchHitToJsonProcessorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/AutodetectMemoryLimitIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/AutodetectResultProcessorIT.java (99%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/BasicDistributedJobsIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/BasicRenormalizationIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/CategorizationIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobsIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobsRestIT.java (99%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/DeleteExpiredDataIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/DeleteJobIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/DetectionRulesIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/EstablishedMemUsageIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/ForecastIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/InterimResultsDeletedAfterReopeningJobIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/JobProviderIT.java (99%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/JobStorageDeletionTaskIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/MlJobIT.java (99%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeAutodetectIntegTestCase.java (98%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/NetworkDisruptionIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/OverallBucketsIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/RestoreModelSnapshotIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/RevertModelSnapshotIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/integration/UpdateInterimResultsIT.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/JobManagerTests.java (99%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/categorization/CategorizationAnalyzerTests.java (98%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/categorization/MlClassicTokenizerTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfigTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/AnalysisLimitsTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/CategorizationAnalyzerConfigTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/ConditionTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/ConnectiveTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/DataDescriptionTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/DataFormatTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/DefaultDetectorDescriptionTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/DetectionRuleTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/DetectorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/JobBuilderTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/JobStateTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/JobTaskStatusTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/JobTests.java (99%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/JobUpdateTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/MlFilterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/ModelPlotConfigTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/OperatorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleActionTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleConditionTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleConditionTypeTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/groups/GroupOrJobLookupTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/groups/GroupOrJobTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/messages/MessagesTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/persistence/BatchedDocumentsIteratorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappingsTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/persistence/InfluencersQueryBuilderTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobProviderTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersisterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersisterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockBatchedDocumentsIterator.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockClientBuilder.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ResultsFilterBuilderTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/persistence/StateStreamerTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsAggregatorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsCollectorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/persistence/overallbuckets/OverallBucketsProviderTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/CountingInputStreamTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/DataStreamDiagnosticsTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/DummyDataCountsReporter.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/NativeControllerTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrlTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/ProcessPipesTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicatorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManagerTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcessTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutodetectResultsParserTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushAcknowledgementTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListenerTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/StateProcessorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/DataLoadParamsTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/FlushJobParamsTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/ForecastParamsTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRangeTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/DataCountsTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/MemoryStatusTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSizeStatsTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshotTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/QuantilesTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvParserTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvRecordWriterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactoryTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateFormatDateTransformerTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DoubleDateTransformerTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/LengthEncodedWriterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/MlFilterWriterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelPlotConfigWriterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ScheduledEventsWriterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/XContentRecordReaderTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessageHandlerTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessageTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizableTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizableTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizableTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerResultTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdaterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizerTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/output/NormalizerResultHandlerTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/results/AnomalyCauseTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/results/AnomalyRecordTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/results/AutodetectResultTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketInfluencerTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/results/CategoryDefinitionTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/results/ForecastRequestStatsTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/results/ForecastTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluenceTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluencerTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/results/ModelPlotTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/results/OverallBucketTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/results/PartitionScoreTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/results/ReservedFieldNamesTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/retention/ExpiredModelSnapshotsRemoverTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/job/retention/ExpiredResultsRemoverTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/GetModelSnapshotsTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/UpdateModelSnapshotActionTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditMessageTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/notifications/LevelTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStartDatafeedActionTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java (95%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/test/SearchHitBuilder.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/utils/IntervalsTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/utils/MlStringsTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/utils/NameResolverTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/utils/NamedPipeHelperTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/utils/StatsAccumulatorTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/utils/time/DateTimeFormatterTimestampConverterTests.java (100%)
rename plugin/{ => ml}/src/test/java/org/elasticsearch/xpack/ml/utils/time/TimeUtilsTests.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/Monitoring.java (81%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSet.java (63%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringService.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkAction.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerService.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/collector/Collector.java (97%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollector.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsMonitoringDoc.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollector.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryMonitoringDoc.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollector.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDoc.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDoc.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsCollector.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsMonitoringDoc.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollector.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDoc.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardMonitoringDoc.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollector.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/BytesReferenceMonitoringDoc.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ClusterAlertsUtil.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportBulk.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportException.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporter.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporters.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/FilteredMonitoringDoc.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/ClusterAlertHttpResource.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulkResponseListener.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpHostBuilder.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpResource.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/MultiHttpResource.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/NodeFailureListener.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResource.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PublishableHttpResource.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/Scheme.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/SecurityHttpClientConfigCallback.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResource.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/TimeoutRequestConfigCallback.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/VersionHttpResource.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/WatcherExistsHttpResource.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalBulk.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporter.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/rest/MonitoringRestHandler.java (100%)
rename plugin/{ => monitoring}/src/main/java/org/elasticsearch/xpack/monitoring/rest/action/RestMonitoringBulkAction.java (100%)
create mode 100644 plugin/monitoring/src/main/plugin-metadata/plugin-security.policy
rename plugin/{ => monitoring}/src/main/resources/monitoring/watches/elasticsearch_cluster_status.json (100%)
rename plugin/{ => monitoring}/src/main/resources/monitoring/watches/elasticsearch_nodes.json (100%)
rename plugin/{ => monitoring}/src/main/resources/monitoring/watches/elasticsearch_version_mismatch.json (100%)
rename plugin/{ => monitoring}/src/main/resources/monitoring/watches/kibana_version_mismatch.json (100%)
rename plugin/{ => monitoring}/src/main/resources/monitoring/watches/logstash_version_mismatch.json (100%)
rename plugin/{ => monitoring}/src/main/resources/monitoring/watches/xpack_license_expiration.json (100%)
rename plugin/{src/test/java/org/elasticsearch/xpack/monitoring/collector => monitoring/src/test/java/org/elasticsearch/xpack/monitoring}/BaseCollectorTestCase.java (85%)
create mode 100644 plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/LocalStateMonitoring.java
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/MonitoredSystemTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSetTests.java (99%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringHistoryDurationSettingsTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringPluginClientTests.java (84%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringServiceTests.java (95%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringTestUtils.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/MultiNodesStatsTests.java (96%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkDocTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequestTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponseTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringIndexTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkActionTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/AbstractIndicesCleanerTestCase.java (99%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerServiceTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/local/LocalIndicesCleanerTests.java (97%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/collector/CollectorTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollectorTests.java (91%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsMonitoringDocTests.java (99%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollectorTests.java (98%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryMonitoringDocTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollectorTests.java (99%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDocTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDocTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsCollectorTests.java (99%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/collector/ml/JobStatsMonitoringDocTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollectorTests.java (98%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDocTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollectorTests.java (98%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsMonitoringDocTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/BaseFilteredMonitoringDocTestCase.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/BaseMonitoringDocTestCase.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/BytesReferenceMonitoringDocTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ClusterAlertsUtilTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringTemplateUtilsTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/AbstractPublishableHttpResourceTestCase.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/ClusterAlertHttpResourceTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulkResponseListenerTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java (99%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterResourceTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpHostBuilderTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpResourceTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/MockHttpResource.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/MultiHttpResourceTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/NodeFailureListenerTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResourceTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/PublishableHttpResourceTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/SchemeTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/SecurityHttpClientConfigCallbackTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResourceTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/TimeoutRequestConfigCallbackTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/VersionHttpResourceTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/WatcherExistsHttpResourceTests.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterIntegTestCase.java (95%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterIntegTests.java (99%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterResourceIntegTests.java (98%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/integration/MonitoringIT.java (99%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/test/MockIngestPlugin.java (100%)
rename plugin/{ => monitoring}/src/test/java/org/elasticsearch/xpack/monitoring/test/MonitoringIntegTestCase.java (86%)
create mode 100644 plugin/monitoring/src/test/resources/monitoring-test.json
rename plugin/{ => security}/forbidden/ldap-signatures.txt (100%)
rename plugin/{bin/x-pack => security/src/main/bin}/certgen (100%)
rename plugin/{bin/x-pack => security/src/main/bin}/certgen.bat (100%)
rename plugin/{bin/x-pack => security/src/main/bin}/certutil (100%)
rename plugin/{bin/x-pack => security/src/main/bin}/certutil.bat (100%)
rename plugin/{bin/x-pack => security/src/main/bin}/migrate (100%)
rename plugin/{bin/x-pack => security/src/main/bin}/migrate.bat (100%)
rename plugin/{bin/x-pack => security/src/main/bin}/setup-passwords (100%)
rename plugin/{bin/x-pack => security/src/main/bin}/setup-passwords.bat (100%)
rename plugin/{bin/x-pack => security/src/main/bin}/syskeygen (100%)
rename plugin/{bin/x-pack => security/src/main/bin}/syskeygen.bat (100%)
rename plugin/{bin/x-pack => security/src/main/bin}/users (100%)
rename plugin/{bin/x-pack => security/src/main/bin}/users.bat (100%)
rename plugin/{config/x-pack => security/src/main/config}/role_mapping.yml (100%)
rename plugin/{config/x-pack => security/src/main/config}/roles.yml (100%)
rename plugin/{config/x-pack => security/src/main/config}/users (100%)
rename plugin/{config/x-pack => security/src/main/config}/users_roles (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/PkiRealmBootstrapCheck.java (95%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/Security.java (84%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/SecurityFeatureSet.java (60%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/SecurityLifecycleService.java (99%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/TokenSSLBootstrapCheck.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/SecurityActionMapper.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilter.java (98%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/interceptor/BulkShardRequestInterceptor.java (97%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/interceptor/FieldAndDocumentLevelSecurityRequestInterceptor.java (97%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/interceptor/IndicesAliasesRequestInterceptor.java (98%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/interceptor/RequestInterceptor.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/interceptor/ResizeRequestInterceptor.java (97%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/interceptor/SearchRequestInterceptor.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/interceptor/UpdateRequestInterceptor.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/realm/TransportClearRealmCacheAction.java (93%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/role/TransportClearRolesCacheAction.java (95%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleAction.java (94%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesAction.java (96%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleAction.java (95%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/TransportDeleteRoleMappingAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/TransportGetRoleMappingsAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/TransportPutRoleMappingAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/token/TransportCreateTokenAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/token/TransportInvalidateTokenAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/token/TransportRefreshTokenAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/user/TransportHasPrivilegesAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/user/TransportPutUserAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/audit/AuditLevel.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrail.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrailService.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/audit/AuditUtil.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrail.java (99%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexNameResolver.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrail.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationService.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/ExpiredTokenRemover.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/InternalRealms.java (74%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/Realms.java (93%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/TokenService.java (96%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/UserToken.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateTool.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealm.java (85%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStore.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealm.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/esnative/UserAndPassword.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/esnative/tool/CommandLineHttpClient.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordTool.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/file/FileRealm.java (87%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStore.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStore.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/file/tool/UsersTool.java (99%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolver.java (98%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactory.java (87%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealm.java (88%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactory.java (86%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactory.java (79%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/ldap/PoolingSessionFactory.java (77%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolver.java (76%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolver.java (85%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancing.java (79%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapMetaDataResolver.java (88%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSession.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapUtils.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactory.java (76%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealm.java (79%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/pki/X509AuthenticationToken.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingRealm.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealm.java (88%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapper.java (91%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/support/RoleMappingFileBootstrapCheck.java (91%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/support/UserRoleMapper.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordRealm.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/CompositeRoleMapper.java (95%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeRoleMappingStore.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationService.java (97%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationUtils.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizedIndices.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolver.java (98%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authz/SecuritySearchOperationListener.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapper.java (99%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStore.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStore.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyTool.java (97%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/RemoteHostHeader.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/SecurityRestFilter.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/SecurityBaseRestHandler.java (97%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/oauth2/RestGetTokenAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/oauth2/RestInvalidateTokenAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/realm/RestClearRealmCacheAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestClearRolesCacheAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestDeleteRoleAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestGetRolesAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestPutRoleAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/rolemapping/RestDeleteRoleMappingAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/rolemapping/RestGetRoleMappingsAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/rolemapping/RestPutRoleMappingAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestChangePasswordAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestDeleteUserAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestGetUsersAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestHasPrivilegesAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestPutUserAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestSetEnabledAction.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/support/AbstractSecurityModule.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/support/FileAttributesChecker.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/support/IndexLifecycleManager.java (99%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/support/SecurityFiles.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptor.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/transport/ServerTransportFilter.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/transport/filter/IPFilter.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/transport/filter/PatternRule.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/transport/filter/SecurityIpFilterRule.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/transport/netty4/IpFilterRemoteAddressFilter.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransport.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4ServerTransport.java (94%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/transport/nio/SSLChannelContext.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/transport/nio/SSLDriver.java (100%)
rename plugin/{ => security}/src/main/java/org/elasticsearch/xpack/security/transport/nio/SecurityNioTransport.java (100%)
create mode 100644 plugin/security/src/main/plugin-metadata/plugin-security.policy
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/AbstractPrivilegeTestCase.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/BulkUpdateTests.java (97%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/ClearRealmsCacheTests.java (99%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/ClearRolesCacheTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/ClusterPrivilegeTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/DateMathExpressionIntegTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/DocumentAndFieldLevelSecurityTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityRandomTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java (99%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/FieldLevelSecurityRandomTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/FieldLevelSecurityTests.java (99%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/IndexPrivilegeTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/IndicesPermissionsWithAliasesWildcardsAndRegexsTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/KibanaUserRoleIntegTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/MultipleIndicesPermissionsTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/PermissionPrecedenceTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/SecurityCachePermissionTests.java (95%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/SecurityClearScrollTests.java (97%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/ShrinkIndexWithSecurityTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/ldap/AbstractAdLdapRealmTestCase.java (98%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/ldap/ActiveDirectoryRunAsTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/ldap/GroupMappingTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/ldap/MultiGroupMappingTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/integration/ldap/MultipleAdRealmTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/license/LicenseServiceSingleNodeSecurityTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/license/LicenseServiceWithSecurityTests.java (91%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/license/LicensingTests.java (92%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/license/XPackLicenseStateTests.java (95%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/test/NativeRealmIntegTestCase.java (96%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/test/SecurityIntegTestCase.java (93%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/test/SecuritySettingsSource.java (92%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/test/SecurityTestsUtils.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/transport/SecurityServerTransportServiceTests.java (100%)
create mode 100644 plugin/security/src/test/java/org/elasticsearch/xpack/security/LocalStateSecurity.java
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/PkiRealmBootstrapCheckTests.java (97%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/ScrollHelperIntegTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/SecurityContextTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/SecurityFeatureSetTests.java (98%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/SecurityLifecycleServiceTests.java (98%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/SecurityPluginTests.java (95%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/SecuritySettingsTests.java (92%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/SecurityTests.java (92%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/TemplateUpgraderTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/TokenSSLBootsrapCheckTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/SecurityActionMapperTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/filter/DestructiveOperationsTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilterTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/interceptor/IndicesAliasesRequestInterceptorTests.java (96%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/interceptor/ResizeRequestInterceptorTests.java (95%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/role/PutRoleBuilderTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleActionTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesActionTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleActionTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/rolemapping/PutRoleMappingRequestTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/rolemapping/TransportGetRoleMappingsActionTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/rolemapping/TransportPutRoleMappingActionTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/token/CreateTokenRequestTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/user/HasPrivilegesRequestBuilderTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestBuilderTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateActionTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordActionTests.java (97%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserActionTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersActionTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/user/TransportHasPrivilegesActionTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/user/TransportPutUserActionTests.java (99%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledActionTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/audit/AuditLevelTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/audit/AuditTrailServiceTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/audit/AuditUtilTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/audit/index/AuditTrailTests.java (98%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailMutedTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailTests.java (98%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/audit/index/RemoteIndexAuditTrailStartingTests.java (95%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/audit/logfile/CapturingLogger.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrailFilterTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrailTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/InternalRealmsTests.java (79%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/RealmSettingsTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/RealmsTests.java (91%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/RunAsIntegTests.java (90%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/TokenAuthIntegTests.java (95%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/TokenServiceTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/UserTokenTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeMigrateToolTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateToolTests.java (97%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmIntegTests.java (98%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStoreTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmIntegTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordToolTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/file/FileRealmTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStoreTests.java (97%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStoreTests.java (99%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/AbstractActiveDirectoryIntegTests.java (89%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolverTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryRealmTests.java (89%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactoryTests.java (97%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/CancellableLdapRunnableTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/GroupsResolverTestCase.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealmTests.java (92%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactoryTests.java (97%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapTestUtils.java (94%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactoryTests.java (97%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverInMemoryTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolverTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LDAPServersTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancingTests.java (83%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapMetaDataResolverTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapTestCase.java (90%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryLoadBalancingTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryTests.java (95%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiAuthenticationTests.java (95%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiOptionalClientAuthTests.java (97%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmTests.java (98%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/support/BCryptTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealmTests.java (97%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapperTests.java (98%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/support/HasherTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/support/RoleMappingFileBootstrapCheckTests.java (99%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordTokenTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/ExpressionRoleMappingTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/NativeUserRoleMapperTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExpressionParserTests.java (96%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/FieldPredicateTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/AnalyzeTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java (95%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationUtilsTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizedIndicesTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/IndexAliasesTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolverTests.java (99%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/ReadActionsTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/RoleDescriptorTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/SecurityScrollTests.java (95%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/SecuritySearchOperationListenerTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/WriteActionsTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReaderTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldDataCacheWithFieldSubsetReaderTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractorTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReaderTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControlTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesPermissionTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCacheTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapperIntegrationTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapperUnitTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorFactoryTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCacheTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/permission/PermissionTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/privilege/PrivilegeTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStoreTests.java (99%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/store/FileRolesStoreTests.java (99%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStoreTests.java (99%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/rest/RestRequestFilterTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/rest/SecurityRestFilterTests.java (97%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateActionTests.java (95%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/rest/action/SecurityBaseRestHandlerTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/rest/action/oauth2/RestGetTokenActionTests.java (95%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/rest/action/user/HasPrivilegesRestResponseTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/support/AutomatonsTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/support/IndexLifecycleManagerIntegTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/support/IndexLifecycleManagerTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/support/ValidationTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/test/SecurityTestUtils.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptorTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterIntegrationTests.java (92%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/filter/IPFilterTests.java (98%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/filter/IpFilteringIntegrationTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/filter/IpFilteringUpdateTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/filter/PatternRuleTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/filter/SecurityIpFilterRuleTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/netty4/DNSOnlyHostnameVerificationTests.java (93%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/netty4/IPHostnameVerificationTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/netty4/IpFilterRemoteAddressFilterTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransportTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4ServerTransportTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SslHostnameVerificationTests.java (97%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/ssl/EllipticCurveSSLTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslIntegrationTests.java (97%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslMultiPortTests.java (87%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslNullCipherTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserIntegTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/user/SystemUserTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/user/UserTests.java (100%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/security/user/XPackUserTests.java (96%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/ssl/SSLClientAuthTests.java (96%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/ssl/SSLReloadIntegTests.java (97%)
rename plugin/{ => security}/src/test/java/org/elasticsearch/xpack/ssl/SSLTrustRestrictionsTests.java (100%)
rename plugin/{ => security}/src/test/resources/IndexLifecycleManagerTests-template.json (100%)
rename plugin/{ => security}/src/test/resources/missing-version-security-index-template.json (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/action/role/roles2xformat.json (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authc/file/users (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authc/file/users_roles (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/ad-schema.ldif (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/ad.ldif (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/role_mapping.yml (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/ldapWithGroupSearch.yml (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/ldapWithRoleMapping.yml (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/ldaptrust.jks (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/seven-seas.ldif (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authc/pki/role_mapping.yml (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authc/support/role_mapping.yml (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authz/store/default_roles.yml (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authz/store/invalid_roles.yml (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authz/store/reserved_roles.yml (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authz/store/roles.yml (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authz/store/roles2xformat.json (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/authz/store/roles2xformat.yml (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/keystore/testnode-different-passwords.jks (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/keystore/testnode.cert (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/keystore/testnode.jks (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/keystore/truststore-testnode-only.jks (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/plugin/roles.yml (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/plugin/users (100%)
rename plugin/{ => security}/src/test/resources/org/elasticsearch/xpack/security/plugin/users_roles (100%)
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/README.asciidoc
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/active-directory-ca.crt
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openldap.crt
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openldap.der
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openssl_config.cnf
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/prime256v1-cert.pem
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/prime256v1-key-noparam.pem
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/prime256v1-key.pem
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.crt
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.jks
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.p12
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.pem
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.crt
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.jks
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.p12
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.pem
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.crt
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.jks
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.p12
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.pem
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-different-passwords.jks
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-ip-only.crt
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-ip-only.jks
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-no-subjaltname.cert
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-no-subjaltname.jks
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.crt
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.jks
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.p12
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.pem
create mode 100644 plugin/security/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/truststore-testnode-only.jks
delete mode 100644 plugin/src/main/java/org/elasticsearch/xpack/XPackPlugin.java
delete mode 100644 plugin/src/main/java/org/elasticsearch/xpack/logstash/LogstashSecurityExtension.java
delete mode 100644 plugin/src/main/java/org/elasticsearch/xpack/ml/MachineLearningFeatureSet.java
delete mode 100644 plugin/src/main/java/org/elasticsearch/xpack/ml/MachineLearningSecurityExtension.java
delete mode 100644 plugin/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringSecurityExtension.java
delete mode 100644 plugin/src/main/java/org/elasticsearch/xpack/security/StackSecurityExtension.java
delete mode 100644 plugin/src/main/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStore.java
delete mode 100644 plugin/src/main/java/org/elasticsearch/xpack/watcher/WatcherSecurityExtension.java
delete mode 100644 plugin/src/main/resources/META-INF/services/org.elasticsearch.xpack.security.SecurityExtension
create mode 100644 plugin/src/main/resources/meta-plugin-descriptor.properties
create mode 100644 plugin/src/test/java/org/elasticsearch/xpack/CompositeTestingXPackPlugin.java
delete mode 100644 plugin/src/test/java/org/elasticsearch/xpack/TimeWarpedXPackPlugin.java
delete mode 100644 plugin/src/test/java/org/elasticsearch/xpack/watcher/test/TimeWarpedWatcher.java
create mode 100644 plugin/upgrade/build.gradle
rename plugin/{ => upgrade}/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeCheck.java (97%)
rename plugin/{ => upgrade}/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeCheckFactory.java (100%)
rename plugin/{ => upgrade}/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeService.java (100%)
rename plugin/{ => upgrade}/src/main/java/org/elasticsearch/xpack/upgrade/InternalIndexReindexer.java (100%)
rename plugin/{ => upgrade}/src/main/java/org/elasticsearch/xpack/upgrade/Upgrade.java (85%)
rename plugin/{ => upgrade}/src/main/java/org/elasticsearch/xpack/upgrade/actions/TransportIndexUpgradeAction.java (100%)
rename plugin/{ => upgrade}/src/main/java/org/elasticsearch/xpack/upgrade/actions/TransportIndexUpgradeInfoAction.java (98%)
rename plugin/{ => upgrade}/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeAction.java (100%)
rename plugin/{ => upgrade}/src/main/java/org/elasticsearch/xpack/upgrade/rest/RestIndexUpgradeInfoAction.java (100%)
create mode 100644 plugin/upgrade/src/main/plugin-metadata/plugin-security.policy
rename plugin/{ => upgrade}/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIT.java (100%)
rename plugin/{ => upgrade}/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIntegTestCase.java (94%)
rename plugin/{ => upgrade}/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeServiceTests.java (100%)
rename plugin/{ => upgrade}/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeTasksIT.java (98%)
rename plugin/{ => upgrade}/src/test/java/org/elasticsearch/xpack/upgrade/InternalIndexReindexerIT.java (100%)
rename plugin/{ => upgrade}/src/test/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeActionRequestTests.java (100%)
rename plugin/{ => upgrade}/src/test/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoActionRequestTests.java (100%)
rename plugin/{ => upgrade}/src/test/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoActionResponseTests.java (100%)
rename plugin/{bin/x-pack => watcher/src/main/bin}/croneval (100%)
rename plugin/{bin/x-pack => watcher/src/main/bin}/croneval.bat (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/EncryptSensitiveDataBootstrapCheck.java (95%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/Watcher.java (91%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/WatcherClientHelper.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/WatcherFeatureSet.java (54%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/WatcherIndexingListener.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleService.java (96%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/WatcherService.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionBuilders.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/email/ExecutableEmailAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/ExecutableHipChatAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/index/ExecutableIndexAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/ExecutableLoggingAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingLevel.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/ExecutablePagerDutyAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/ExecutableWebhookAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/client/WatchSourceBuilders.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpClient.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpContentType.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpMethod.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpProxy.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpRequest.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpRequestTemplate.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpResponse.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpSettings.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/Scheme.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/SizeLimitInputStream.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/ApplicableHttpAuth.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/HttpAuth.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/HttpAuthFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/HttpAuthRegistry.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/basic/ApplicableBasicAuth.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/basic/BasicAuth.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/http/auth/basic/BasicAuthFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/stats/Counters.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/text/TextTemplate.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/common/text/TextTemplateEngine.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/condition/AbstractCompareCondition.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareCondition.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/condition/CompareCondition.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/condition/InternalAlwaysCondition.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/condition/LenientCompare.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/condition/NeverCondition.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/condition/ScriptCondition.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/execution/AsyncTriggerEventConsumer.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/execution/CurrentExecutions.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionService.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/execution/InternalWatchExecutor.java (92%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/execution/ManualExecutionContext.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/execution/SyncTriggerEventConsumer.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredExecutionContext.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatch.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStore.java (92%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutor.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/history/HistoryStore.java (87%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/InputBuilders.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/InputFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/InputRegistry.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInput.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInput.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/http/ExecutableHttpInput.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/http/HttpInput.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/http/HttpInputFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/none/ExecutableNoneInput.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInputFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/search/ExecutableSearchInput.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/search/SearchInput.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/search/SearchInputFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/simple/ExecutableSimpleInput.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInput.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInputFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/transform/ExecutableTransformInput.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/transform/TransformInput.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/input/transform/TransformInputFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/NotificationService.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/Account.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/Attachment.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/Authentication.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/DataAttachment.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/Email.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/EmailService.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/EmailTemplate.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/HtmlSanitizer.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/Profile.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/DataAttachment.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/DataAttachmentParser.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/EmailAttachmentParser.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/EmailAttachments.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/EmailAttachmentsParser.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/HttpEmailAttachementParser.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/HttpRequestAttachment.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/ReportingAttachment.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/attachment/ReportingAttachmentParser.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/email/support/BodyPartSource.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/hipchat/HipChatAccount.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/hipchat/HipChatMessage.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/hipchat/HipChatServer.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/hipchat/HipChatService.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/hipchat/IntegrationAccount.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/hipchat/SentMessages.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/hipchat/UserAccount.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/hipchat/V1Account.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/jira/JiraAccount.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/jira/JiraIssue.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/jira/JiraService.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/IncidentEvent.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/IncidentEventContext.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/IncidentEventDefaults.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/PagerDutyAccount.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/PagerDutyService.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/pagerduty/SentEvent.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/SentMessages.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/SlackAccount.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/SlackService.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/message/Action.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/message/Attachment.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/message/DynamicAttachments.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/message/Field.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/message/MessageElement.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/message/SlackMessage.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/message/SlackMessageDefaults.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/rest/WatcherRestHandler.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/support/ArrayObjectIterator.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/support/Strings.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/support/Variables.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistry.java (84%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/support/XContentFilterKeysUtils.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateRequest.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateService.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformBuilders.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ExecutableScriptTransform.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransform.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/transform/search/ExecutableSearchTransform.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransform.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransformFactory.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/WatcherTransportAction.java (96%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/TransportAckWatchAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/TransportActivateWatchAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/TransportDeleteWatchAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/TransportExecuteWatchAction.java (98%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/TransportGetWatchAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/TransportPutWatchAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/TransportWatcherServiceAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/TransportWatcherStatsAction.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerBuilders.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerEngine.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerService.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTrigger.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEngine.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEvent.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Cron.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/CronSchedule.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/CronnableSchedule.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/DailySchedule.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/HourlySchedule.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/IntervalSchedule.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/MonthlySchedule.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Schedule.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleRegistry.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTrigger.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEngine.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEvent.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Schedules.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/WeeklySchedule.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/YearlySchedule.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleTriggerEngine.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/DayOfWeek.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/DayTimes.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/Month.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/MonthTimes.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/Times.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/WeekTimes.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/YearTimes.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/tool/CronEvalTool.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchParser.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchStoreUtils.java (100%)
rename plugin/{ => watcher}/src/main/java/org/elasticsearch/xpack/watcher/watch/clock/HaltedClock.java (100%)
create mode 100644 plugin/watcher/src/main/plugin-metadata/plugin-security.policy
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/notification/NotificationServiceTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/EncryptSensitiveDataBootstrapCheckTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/WatcherClientHelperTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/WatcherFeatureSetTests.java (94%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/WatcherIndexingListenerTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleServiceTests.java (99%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/WatcherMetaDataSerializationTests.java (92%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/WatcherPluginTests.java (96%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/WatcherServiceTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/ActionErrorIntegrationTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/ActionWrapperTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/TimeThrottleIntegrationTests.java (94%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailAttachmentTests.java (98%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionFactoryTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraActionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionFactoryTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionFactoryTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackActionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionFactoryTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/AckThrottlerTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/ActionThrottleTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/PeriodThrottlerTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/WatchThrottlerTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookHttpsIntegrationTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookIntegrationTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpClientTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpConnectionTimeoutTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpReadTimeoutTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpRequestTemplateTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpRequestTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/common/http/HttpResponseTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/common/http/SizeLimitInputStreamTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/common/stats/CountersTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/common/text/TextTemplateTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/condition/AlwaysConditionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionSearchTests.java (99%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionSearchTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/condition/NeverConditionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/crypto/CryptoServiceTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/execution/ExecutionServiceTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreTests.java (97%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryActionConditionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryStoreTests.java (99%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateEmailMappingsTests.java (99%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateHttpMappingsTests.java (96%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateIndexActionMappingsTests.java (97%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateSearchInputMappingsTests.java (98%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateTimeMappingsTests.java (97%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateTransformMappingsTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/input/InputRegistryTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputTests.java (99%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ChainIntegrationTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInputTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/input/http/HttpInputTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInputTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/input/transform/TransformInputTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/email/AccountTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/email/AccountsTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/email/DataAttachmentTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/email/EmailSecretsIntegrationTests.java (99%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/email/EmailServiceTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/email/EmailTemplateTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/email/EmailTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/email/HtmlSanitizerTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/email/ProfileTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/email/attachment/DataAttachmentParserTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/email/attachment/EmailAttachmentParsersTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/email/attachment/HttpEmailAttachementParserTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/email/attachment/ReportingAttachmentParserTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/email/support/EmailServer.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/hipchat/HipChatAccountsTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/hipchat/HipChatMessageTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/hipchat/HipChatServiceTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/hipchat/IntegrationAccountTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/hipchat/UserAccountTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/hipchat/V1AccountTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/jira/JiraAccountTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/jira/JiraIssueTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/pagerduty/IncidentEventDefaultsTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/pagerduty/PagerDutyAccountsTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/slack/message/SlackMessageDefaultsTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/notification/slack/message/SlackMessageTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchActionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/support/FilterXContentTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/support/VariablesTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherDateTimeUtilsTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryTests.java (91%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherUtilsTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateRequestTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/MapPathTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/XContentSourceTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/AbstractWatcherIntegrationTestCase.java (94%)
create mode 100644 plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/LocalStateWatcher.java
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/MockTextTemplateEngine.java (100%)
create mode 100644 plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/TimeWarpedWatcher.java
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/WatchExecutionContextMockBuilder.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/WatcherTestUtils.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/bench/ScheduleEngineTriggerBenchmark.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherExecutorServiceBenchmark.java (90%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherScheduleEngineBenchmark.java (98%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BasicWatcherTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BootStrapTests.java (95%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/integration/ExecutionVarsIntegrationTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HipChatServiceTests.java (96%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HistoryIntegrationTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HttpSecretsIntegrationTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/integration/PagerDutyServiceTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SearchInputTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SearchTransformTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SlackServiceTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchAckTests.java (98%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchMetadataTests.java (97%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/transform/TransformIntegrationTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransformTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/transport/action/WatchRequestValidationTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/transport/action/activate/ActivateWatchTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/transport/action/delete/DeleteWatchTests.java (95%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchRequestTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/transport/action/get/GetWatchTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/transport/action/put/PutWatchSerializationTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/transport/actions/put/TransportPutWatchActionTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/trigger/ScheduleTriggerEngineMock.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/CronScheduleTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/DailyScheduleTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/HourlyScheduleTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/IntervalScheduleTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/MonthlyScheduleTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleRegistryTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTestCase.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEventTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/WeeklyScheduleTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/YearlyScheduleTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleEngineTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/tool/CronEvalToolTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchStatusIntegrationTests.java (97%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchStatusTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchTests.java (100%)
rename plugin/{ => watcher}/src/test/java/org/elasticsearch/xpack/watcher/watch/clock/ClockTests.java (100%)
create mode 100644 plugin/watcher/src/test/resources/org/elasticsearch/xpack/security/keystore/testnode.jks
create mode 100644 plugin/watcher/src/test/resources/org/elasticsearch/xpack/security/keystore/truststore-testnode-only.jks
create mode 100644 plugin/watcher/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-no-subjaltname.jks
create mode 100644 qa/security-tools-tests/build.gradle
rename {plugin => qa/security-tools-tests}/src/test/java/org/elasticsearch/xpack/security/authc/file/tool/UsersToolTests.java (94%)
rename {plugin => qa/security-tools-tests}/src/test/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyToolTests.java (97%)
rename {plugin => qa/security-tools-tests}/src/test/java/org/elasticsearch/xpack/security/support/FileAttributesCheckerTests.java (100%)
rename {plugin => qa/security-tools-tests}/src/test/java/org/elasticsearch/xpack/security/support/SecurityFilesTests.java (100%)
rename {plugin => qa/security-tools-tests}/src/test/java/org/elasticsearch/xpack/ssl/CertificateGenerateToolTests.java (98%)
rename {plugin => qa/security-tools-tests}/src/test/java/org/elasticsearch/xpack/ssl/CertificateToolTests.java (97%)
diff --git a/build.gradle b/build.gradle
index 164f980f661..cd69373a7e0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -53,8 +53,16 @@ subprojects {
approvedLicenses = ['Elasticsearch Confidential']
additionalLicense 'ESCON', 'Elasticsearch Confidential', 'ELASTICSEARCH CONFIDENTIAL'
}
- ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-api:${version}": ':x-pack-elasticsearch:plugin']
+ ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-api:${version}": ':x-pack-elasticsearch:plugin:core']
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-core:${version}": ':x-pack-elasticsearch:plugin:core']
+ ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-deprecation:${version}": ':x-pack-elasticsearch:plugin:deprecation']
+ ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-graph:${version}": ':x-pack-elasticsearch:plugin:graph']
+ ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-logstash:${version}": ':x-pack-elasticsearch:plugin:logstash']
+ ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-ml:${version}": ':x-pack-elasticsearch:plugin:ml']
+ ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-monitoring:${version}": ':x-pack-elasticsearch:plugin:monitoring']
+ ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-security:${version}": ':x-pack-elasticsearch:plugin:security']
+ ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-upgrade:${version}": ':x-pack-elasticsearch:plugin:upgrade']
+ ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-watcher:${version}": ':x-pack-elasticsearch:plugin:watcher']
for (final Version version : versionCollection.versionsIndexCompatibleWithCurrent) {
if (version.branch != null) {
diff --git a/dev-tools/checkstyle_suppressions.xml b/dev-tools/checkstyle_suppressions.xml
index ea7537e6a0e..2301cdeeb84 100644
--- a/dev-tools/checkstyle_suppressions.xml
+++ b/dev-tools/checkstyle_suppressions.xml
@@ -5,23 +5,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/build.gradle b/docs/build.gradle
index f6835aa0c8a..cd76b620863 100644
--- a/docs/build.gradle
+++ b/docs/build.gradle
@@ -93,7 +93,8 @@ buildRestTests.expectedUnconvertedCandidates = [
]
dependencies {
- testCompile project(path: ':x-pack-elasticsearch:plugin', configuration: 'runtime')
+ testCompile project(path: ':x-pack-elasticsearch:plugin:core', configuration: 'runtime')
+ testCompile project(path: ':x-pack-elasticsearch:plugin:core', configuration: 'testArtifacts')
testCompile project(path: ':x-pack-elasticsearch:plugin', configuration: 'testArtifacts')
}
diff --git a/license-tools/build.gradle b/license-tools/build.gradle
index 5c47e0045dc..125f09cf932 100644
--- a/license-tools/build.gradle
+++ b/license-tools/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'elasticsearch.build'
dependencies {
- compile project(':x-pack-elasticsearch:plugin')
+ compile project(':x-pack-elasticsearch:plugin:core')
compile "org.elasticsearch:elasticsearch:${version}"
testCompile "org.elasticsearch.test:framework:${version}"
}
diff --git a/plugin/bin/x-pack/x-pack-env b/plugin/bin/x-pack/x-pack-env
deleted file mode 100644
index db28c03d1fd..00000000000
--- a/plugin/bin/x-pack/x-pack-env
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
-# or more contributor license agreements. Licensed under the Elastic License;
-# you may not use this file except in compliance with the Elastic License.
-
-ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/x-pack/*"
diff --git a/plugin/bin/x-pack/x-pack-env.bat b/plugin/bin/x-pack/x-pack-env.bat
deleted file mode 100644
index d6642fe2e34..00000000000
--- a/plugin/bin/x-pack/x-pack-env.bat
+++ /dev/null
@@ -1,5 +0,0 @@
-rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
-rem or more contributor license agreements. Licensed under the Elastic License;
-rem you may not use this file except in compliance with the Elastic License.
-
-set ES_CLASSPATH=!ES_CLASSPATH!;!ES_HOME!/plugins/x-pack/*
diff --git a/plugin/build.gradle b/plugin/build.gradle
index 4dce3291361..1631552836c 100644
--- a/plugin/build.gradle
+++ b/plugin/build.gradle
@@ -6,200 +6,63 @@ import java.nio.charset.StandardCharsets
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.StandardCopyOption
+import org.elasticsearch.gradle.test.RunTask;
-group 'org.elasticsearch.plugin'
+apply plugin: 'elasticsearch.es-meta-plugin'
-apply plugin: 'elasticsearch.esplugin'
-esplugin {
- name 'x-pack'
- description 'Elasticsearch Expanded Pack Plugin'
- classname 'org.elasticsearch.xpack.XPackPlugin'
- hasNativeController true
- requiresKeystore true
- licenseFile project(':x-pack-elasticsearch').file('LICENSE.txt')
- noticeFile project(':x-pack-elasticsearch').file('NOTICE.txt')
-}
archivesBaseName = 'x-pack' // for api jar
-// TODO: fix this! https://github.com/elastic/x-plugins/issues/1066
-ext.compactProfile = 'full'
+//dependencyLicenses {
+// mapping from: /netty-.*/, to: 'netty'
+// mapping from: /bc.*/, to: 'bouncycastle'
+// mapping from: /owasp-java-html-sanitizer.*/, to: 'owasp-java-html-sanitizer'
+// mapping from: /transport-netty.*/, to: 'elasticsearch'
+// mapping from: /transport-nio.*/, to: 'elasticsearch'
+// mapping from: /elasticsearch-nio.*/, to: 'elasticsearch'
+// mapping from: /elasticsearch-rest-client.*/, to: 'elasticsearch'
+// mapping from: /http.*/, to: 'httpclient' // pulled in by rest client
+// mapping from: /commons-.*/, to: 'commons' // pulled in by rest client
+// ignoreSha 'elasticsearch-rest-client'
+// ignoreSha 'transport-netty4'
+// ignoreSha 'transport-nio'
+// ignoreSha 'elasticsearch-nio'
+// ignoreSha 'elasticsearch-rest-client-sniffer'
+// ignoreSha 'x-pack-core'
+//}
-dependencyLicenses {
- mapping from: /netty-.*/, to: 'netty'
- mapping from: /bc.*/, to: 'bouncycastle'
- mapping from: /owasp-java-html-sanitizer.*/, to: 'owasp-java-html-sanitizer'
- mapping from: /transport-netty.*/, to: 'elasticsearch'
- mapping from: /transport-nio.*/, to: 'elasticsearch'
- mapping from: /elasticsearch-nio.*/, to: 'elasticsearch'
- mapping from: /elasticsearch-rest-client.*/, to: 'elasticsearch'
- mapping from: /http.*/, to: 'httpclient' // pulled in by rest client
- mapping from: /commons-.*/, to: 'commons' // pulled in by rest client
- ignoreSha 'elasticsearch-rest-client'
- ignoreSha 'transport-netty4'
- ignoreSha 'transport-nio'
- ignoreSha 'elasticsearch-nio'
- ignoreSha 'elasticsearch-rest-client-sniffer'
- ignoreSha 'x-pack-core'
+es_meta_plugin {
+ name = 'x-pack'
+ description = 'Elasticsearch Expanded Pack Plugin'
+ plugins = ['core', 'deprecation', 'graph', 'logstash',
+ 'ml', 'monitoring', 'security', 'upgrade', 'watcher']
}
-configurations {
- nativeBundle {
- resolutionStrategy.dependencySubstitution {
- if (findProject(':machine-learning-cpp') != null) {
- substitute module("org.elasticsearch.ml:ml-cpp") with project(":machine-learning-cpp")
- } else {
- substitute module("org.elasticsearch.ml:ml-cpp") with project("${project.path}:ml-cpp-snapshot")
- }
- }
- }
-}
-
-dependencies {
- // CLI deps
- compile project(path: ':server:cli', configuration: 'runtime')
-
- // Core project deps (this is temporary)
- compile project(':x-pack-elasticsearch:plugin:core')
-
- // security deps
- compile project(path: ':modules:transport-netty4', configuration: 'runtime')
- compile project(path: ':plugins:transport-nio', configuration: 'runtime')
- compile 'com.unboundid:unboundid-ldapsdk:3.2.0'
- compile 'org.bouncycastle:bcprov-jdk15on:1.58'
- compile 'org.bouncycastle:bcpkix-jdk15on:1.58'
- testCompile 'com.google.jimfs:jimfs:1.1'
-
- // watcher deps
- compile 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:r239'
- compile 'com.google.guava:guava:16.0.1' // needed by watcher for the html sanitizer and security tests for jimfs
- compile 'com.sun.mail:javax.mail:1.5.6'
- // HACK: java 9 removed javax.activation from the default modules, so instead of trying to add modules, which would have
- // to be conditionalized for java 8/9, we pull in the classes directly
- compile 'javax.activation:activation:1.1.1'
-
- testCompile 'org.subethamail:subethasmtp:3.1.7'
- // needed for subethasmtp, has @GuardedBy annotation
- testCompile 'com.google.code.findbugs:jsr305:3.0.1'
-
- // monitoring deps
- compile "org.elasticsearch.client:elasticsearch-rest-client:${version}"
- compile "org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}"
-
- // ml deps
- compile 'net.sf.supercsv:super-csv:2.4.0'
- nativeBundle "org.elasticsearch.ml:ml-cpp:${project.version}@zip"
- testCompile 'org.ini4j:ini4j:0.5.2'
-
- // common test deps
- testCompile 'org.elasticsearch:securemock:1.2'
- testCompile "org.elasticsearch:mocksocket:${versions.mocksocket}"
- testCompile 'org.slf4j:slf4j-log4j12:1.6.2'
- testCompile 'org.slf4j:slf4j-api:1.6.2'
- testCompile project(path: ':modules:reindex', configuration: 'runtime')
- testCompile project(path: ':modules:parent-join', configuration: 'runtime')
- testCompile project(path: ':modules:analysis-common', configuration: 'runtime')
-}
-
-// make LicenseSigner available for testing signed licenses
-sourceSets.test.java {
- srcDir '../license-tools/src/main/java'
-}
-
-compileJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
-compileTestJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
-
ext.expansions = [
- 'project.version': version,
+ 'project.version': version,
]
-processResources {
- from(sourceSets.main.resources.srcDirs) {
- exclude '**/public.key'
- inputs.properties(expansions)
- MavenFilteringHack.filter(it, expansions)
- }
- boolean snapshot = "true".equals(System.getProperty("build.snapshot", "true"))
- if (snapshot) {
- from 'keys/dev/public.key'
- } else {
- from 'keys/prod/public.key'
- }
+dependencies {
+ testCompile project(path: ':x-pack-elasticsearch:plugin:core', configuration: 'testArtifacts')
+ testCompile project(path: ':x-pack-elasticsearch:plugin:deprecation')
+ testCompile project(path: ':x-pack-elasticsearch:plugin:graph')
+ testCompile project(path: ':x-pack-elasticsearch:plugin:logstash')
+ testCompile project(path: ':x-pack-elasticsearch:plugin:ml')
+ testCompile project(path: ':x-pack-elasticsearch:plugin:monitoring')
+ testCompile project(path: ':x-pack-elasticsearch:plugin:security')
+ testCompile project(path: ':x-pack-elasticsearch:plugin:upgrade')
+ testCompile project(path: ':x-pack-elasticsearch:plugin:watcher')
}
-forbiddenPatterns {
- exclude '**/*.key'
- exclude '**/*.p12'
- exclude '**/*.der'
- exclude '**/*.zip'
+// https://github.com/elastic/x-plugins/issues/724
+configurations {
+ testArtifacts.extendsFrom testRuntime
}
-
-forbiddenApisMain {
- signaturesURLs += file('forbidden/ldap-signatures.txt').toURI().toURL()
+task testJar(type: Jar) {
+ appendix 'test'
+ from sourceSets.test.output
}
-
-task extractNativeLicenses(type: Copy) {
- dependsOn configurations.nativeBundle
- into "${buildDir}"
- from {
- project.zipTree(configurations.nativeBundle.singleFile)
- }
- include 'platform/licenses/**'
- // This is to reduce the risk of credentials used to access the native bundle not
- // having propagated throughout AWS by the time it's downloaded; the time needed
- // to compile the Java is extra time during which the propagation can take place
- shouldRunAfter compileJava
-}
-
-// TODO: standardize packaging config for plugins
-bundlePlugin {
- dependsOn configurations.nativeBundle
- from('bin/x-pack') {
- into 'bin'
- }
- from('config/x-pack') {
- into 'config'
- }
- from {
- project.zipTree(configurations.nativeBundle.singleFile)
- }
- // We don't ship the individual nativeBundle licenses - instead
- // they get combined into the top level NOTICES file we ship
- exclude 'platform/licenses/**'
-}
-
-// add api jar for extension authors to compile against
-// note this is just the normal x-pack jar for now, with a different name
-project.afterEvaluate {
- task apiJar {
- dependsOn('generatePomFileForApijarPublication', project.jar)
- doFirst {
- Path jarFile = project.jar.outputs.files.singleFile.toPath()
- String apiFileName = jarFile.fileName.toString().replace(project.version, "api-${project.version}")
- Files.copy(jarFile, jarFile.resolveSibling(apiFileName), StandardCopyOption.REPLACE_EXISTING)
-
- String pomFileName = jarFile.fileName.toString().replace('.jar', '.pom')
- String apiPomFileName = apiFileName.replace('.jar', '.pom')
- Files.copy(jarFile.resolveSibling(pomFileName), jarFile.resolveSibling(apiPomFileName),
- StandardCopyOption.REPLACE_EXISTING)
- }
- }
- assemble.dependsOn(apiJar)
- project.publishing {
- publications {
- apijar(MavenPublication) {
- from project.components.java
- artifactId = 'x-pack-api'
- pom.withXml { XmlProvider xml ->
- Node root = xml.asNode()
- root.appendNode('name', project.pluginProperties.extension.name)
- root.appendNode('description', project.pluginProperties.extension.description)
- }
- }
- }
- }
- // Add an extra licenses directory to the combined notices
- project.tasks.findByName('generateNotice').dependsOn extractNativeLicenses
- project.tasks.findByName('generateNotice').licensesDir new File("${project.buildDir}/platform/licenses")
+artifacts {
+ testArtifacts testJar
}
integTestRunner {
@@ -303,14 +166,6 @@ integTestCluster {
}
}
-test {
- /*
- * We have to disable setting the number of available processors as tests in the same JVM randomize processors and will step on each
- * other if we allow them to set the number of available processors as it's set-once in Netty.
- */
- systemProperty 'es.set.netty.runtime.available.processors', 'false'
-}
-
integTestRunner {
/*
* We have to disable setting the number of available processors as tests in the same JVM randomize processors and will step on each
@@ -319,73 +174,6 @@ integTestRunner {
systemProperty 'es.set.netty.runtime.available.processors', 'false'
}
-// TODO: don't publish test artifacts just to run messy tests, fix the tests!
-// https://github.com/elastic/x-plugins/issues/724
-configurations {
- testArtifacts.extendsFrom testRuntime
-}
-task testJar(type: Jar) {
- appendix 'test'
- from sourceSets.test.output
-}
-artifacts {
- // normal es plugins do not publish the jar but we need to since users need it for Transport Clients and extensions
- archives jar
- testArtifacts testJar
-}
-
-// classes are missing, e.g. com.ibm.icu.lang.UCharacter
-thirdPartyAudit.excludes = [
- // uses internal java api: sun.misc.Unsafe
- 'com.google.common.cache.Striped64',
- 'com.google.common.cache.Striped64$1',
- 'com.google.common.cache.Striped64$Cell',
- 'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator',
- 'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator$1',
-
- // pulled in as external dependency to work on java 9
- 'com.sun.activation.registries.LineTokenizer',
- 'com.sun.activation.registries.LogSupport',
- 'com.sun.activation.registries.MailcapFile',
- 'com.sun.activation.registries.MailcapTokenizer',
- 'com.sun.activation.registries.MimeTypeEntry',
- 'com.sun.activation.registries.MimeTypeFile',
- 'javax.activation.MailcapCommandMap',
- 'javax.activation.MimetypesFileTypeMap',
-]
-
-// pulled in as external dependency to work on java 9
-if (JavaVersion.current() <= JavaVersion.VERSION_1_8) {
- thirdPartyAudit.excludes += [
- 'com.sun.activation.registries.MailcapParseException',
- 'javax.activation.ActivationDataFlavor',
- 'javax.activation.CommandInfo',
- 'javax.activation.CommandMap',
- 'javax.activation.CommandObject',
- 'javax.activation.DataContentHandler',
- 'javax.activation.DataContentHandlerFactory',
- 'javax.activation.DataHandler$1',
- 'javax.activation.DataHandler',
- 'javax.activation.DataHandlerDataSource',
- 'javax.activation.DataSource',
- 'javax.activation.DataSourceDataContentHandler',
- 'javax.activation.FileDataSource',
- 'javax.activation.FileTypeMap',
- 'javax.activation.MimeType',
- 'javax.activation.MimeTypeParameterList',
- 'javax.activation.MimeTypeParseException',
- 'javax.activation.ObjectDataContentHandler',
- 'javax.activation.SecuritySupport$1',
- 'javax.activation.SecuritySupport$2',
- 'javax.activation.SecuritySupport$3',
- 'javax.activation.SecuritySupport$4',
- 'javax.activation.SecuritySupport$5',
- 'javax.activation.SecuritySupport',
- 'javax.activation.URLDataSource',
- 'javax.activation.UnsupportedDataTypeException'
- ]
-}
-
run {
setting 'xpack.ml.enabled', 'true'
setting 'xpack.graph.enabled', 'true'
diff --git a/plugin/core/build.gradle b/plugin/core/build.gradle
index b79df34e746..71d7a45e688 100644
--- a/plugin/core/build.gradle
+++ b/plugin/core/build.gradle
@@ -1,22 +1,300 @@
-apply plugin: 'elasticsearch.build'
+import org.elasticsearch.gradle.MavenFilteringHack
+
+apply plugin: 'elasticsearch.esplugin'
+esplugin {
+ name 'x-pack-core'
+ description 'Elasticsearch Expanded Pack Plugin - Core'
+ classname 'org.elasticsearch.xpack.XPackPlugin'
+ hasNativeController true
+ requiresKeystore true
+ licenseFile project(':x-pack-elasticsearch').file('LICENSE.txt')
+ noticeFile project(':x-pack-elasticsearch').file('NOTICE.txt')
+}
+
+integTest.enabled = false
+
+dependencyLicenses {
+ mapping from: /netty-.*/, to: 'netty'
+ mapping from: /bc.*/, to: 'bouncycastle'
+ mapping from: /owasp-java-html-sanitizer.*/, to: 'owasp-java-html-sanitizer'
+ mapping from: /transport-netty.*/, to: 'elasticsearch'
+ mapping from: /transport-nio.*/, to: 'elasticsearch'
+ mapping from: /elasticsearch-nio.*/, to: 'elasticsearch'
+ mapping from: /elasticsearch-rest-client.*/, to: 'elasticsearch'
+ mapping from: /http.*/, to: 'httpclient' // pulled in by rest client
+ mapping from: /commons-.*/, to: 'commons' // pulled in by rest client
+ ignoreSha 'elasticsearch-rest-client'
+ ignoreSha 'transport-netty4'
+ ignoreSha 'transport-nio'
+ ignoreSha 'elasticsearch-nio'
+ ignoreSha 'elasticsearch-rest-client-sniffer'
+ ignoreSha 'x-pack-core'
+}
dependencies {
provided "org.elasticsearch:elasticsearch:${version}"
+ compile "org.apache.httpcomponents:httpclient:${versions.httpclient}"
+ compile "org.apache.httpcomponents:httpcore:${versions.httpcore}"
+ compile "org.apache.httpcomponents:httpasyncclient:${versions.httpasyncclient}"
+
+ compile "commons-logging:commons-logging:${versions.commonslogging}"
+ compile "commons-codec:commons-codec:${versions.commonscodec}"
+
+ // security deps
+ compile 'com.unboundid:unboundid-ldapsdk:3.2.0'
+ compile 'org.bouncycastle:bcprov-jdk15on:1.58'
+ compile 'org.bouncycastle:bcpkix-jdk15on:1.58'
+ compile project(path: ':modules:transport-netty4', configuration: 'runtime')
+
+ //testCompile project(path: ':core:cli', configuration: 'runtime')
+ testCompile 'org.elasticsearch:securemock:1.2'
+ testCompile "org.elasticsearch:mocksocket:${versions.mocksocket}"
+ testCompile 'org.slf4j:slf4j-log4j12:1.6.2'
+ testCompile 'org.slf4j:slf4j-api:1.6.2'
+ testCompile project(path: ':modules:reindex', configuration: 'runtime')
+ testCompile project(path: ':modules:parent-join', configuration: 'runtime')
+ testCompile project(path: ':modules:analysis-common', configuration: 'runtime')
+}
+
+processResources {
+ from(sourceSets.main.resources.srcDirs) {
+ exclude '**/public.key'
+ inputs.properties(expansions)
+ MavenFilteringHack.filter(it, expansions)
+ }
+ boolean snapshot = "true".equals(System.getProperty("build.snapshot", "true"))
+ if (snapshot) {
+ from '../keys/dev/public.key'
+ } else {
+ from '../keys/prod/public.key'
+ }
+}
+
+forbiddenPatterns {
+ exclude '**/*.key'
+ exclude '**/*.p12'
+ exclude '**/*.der'
+ exclude '**/*.zip'
}
archivesBaseName = 'x-pack-core'
compileJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
-//compileTestJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
+compileTestJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
-// TODO: enable this once we have tests
-test.enabled=false
+// TODO: fix these!
+thirdPartyAudit.enabled = false
licenseHeaders {
approvedLicenses << 'BCrypt (BSD-like)'
additionalLicense 'BCRYP', 'BCrypt (BSD-like)', 'Copyright (c) 2006 Damien Miller '
+ enabled = false
}
-parent.bundlePlugin {
- from jar
+// make LicenseSigner available for testing signed licenses
+sourceSets.test.java {
+ srcDir '../../license-tools/src/main/java'
+}
+
+//// add api jar for extension authors to compile against
+//// note this is just the normal x-pack jar for now, with a different name
+//project.afterEvaluate {
+// task apiJar {
+// dependsOn('generatePomFileForApijarPublication', project.jar)
+// doFirst {
+// Path jarFile = project.jar.outputs.files.singleFile.toPath()
+// String apiFileName = jarFile.fileName.toString().replace(project.version, "api-${project.version}")
+// Files.copy(jarFile, jarFile.resolveSibling(apiFileName), StandardCopyOption.REPLACE_EXISTING)
+//
+// String pomFileName = jarFile.fileName.toString().replace('.jar', '.pom')
+// String apiPomFileName = apiFileName.replace('.jar', '.pom')
+// Files.copy(jarFile.resolveSibling(pomFileName), jarFile.resolveSibling(apiPomFileName),
+// StandardCopyOption.REPLACE_EXISTING)
+// }
+// }
+// assemble.dependsOn(apiJar)
+// project.publishing {
+// publications {
+// apijar(MavenPublication) {
+// from project.components.java
+// artifactId = 'x-pack-api'
+// pom.withXml { XmlProvider xml ->
+// Node root = xml.asNode()
+// root.appendNode('name', project.pluginProperties.extension.name)
+// root.appendNode('description', project.pluginProperties.extension.description)
+// }
+// }
+// }
+// }
+// // Add an extra licenses directory to the combined notices
+// project.tasks.findByName('generateNotice').dependsOn extractNativeLicenses
+// project.tasks.findByName('generateNotice').licensesDir new File("${project.buildDir}/platform/licenses")
+//}
+//
+// integTestRunner {
+// // TODO: fix this rest test to not depend on a hardcoded port!
+// def blacklist = ['getting_started/10_monitor_cluster_health/*']
+// boolean snapshot = "true".equals(System.getProperty("build.snapshot", "true"))
+// if (!snapshot) {
+// // these tests attempt to install basic/internal licenses signed against the dev/public.key
+// // Since there is no infrastructure in place (anytime soon) to generate licenses using the production
+// // private key, these tests are whitelisted in non-snapshot test runs
+// blacklist.addAll(['xpack/15_basic/*', 'license/20_put_license/*'])
+// }
+// systemProperty 'tests.rest.blacklist', blacklist.join(',')
+// }
+
+// // location of generated keystores and certificates
+// File keystoreDir = new File(project.buildDir, 'keystore')
+
+// // Generate the node's keystore
+// File nodeKeystore = new File(keystoreDir, 'test-node.jks')
+// task createNodeKeyStore(type: LoggedExec) {
+// doFirst {
+// if (nodeKeystore.parentFile.exists() == false) {
+// nodeKeystore.parentFile.mkdirs()
+// }
+// if (nodeKeystore.exists()) {
+// delete nodeKeystore
+// }
+// }
+// executable = new File(project.javaHome, 'bin/keytool')
+// standardInput = new ByteArrayInputStream('FirstName LastName\nUnit\nOrganization\nCity\nState\nNL\nyes\n\n'.getBytes('UTF-8'))
+// args '-genkey',
+// '-alias', 'test-node',
+// '-keystore', nodeKeystore,
+// '-keyalg', 'RSA',
+// '-keysize', '2048',
+// '-validity', '712',
+// '-dname', 'CN=smoke-test-plugins-ssl',
+// '-keypass', 'keypass',
+// '-storepass', 'keypass'
+// }
+
+// Add keystores to test classpath: it expects it there
+//sourceSets.test.resources.srcDir(keystoreDir)
+//processTestResources.dependsOn(createNodeKeyStore)
+
+// integTestCluster {
+// dependsOn createNodeKeyStore
+// setting 'xpack.ml.enabled', 'true'
+// setting 'logger.org.elasticsearch.xpack.ml.datafeed', 'TRACE'
+// // Integration tests are supposed to enable/disable exporters before/after each test
+// setting 'xpack.monitoring.exporters._local.type', 'local'
+// setting 'xpack.monitoring.exporters._local.enabled', 'false'
+// setting 'xpack.monitoring.collection.interval', '-1'
+// setting 'xpack.security.authc.token.enabled', 'true'
+// setting 'xpack.security.transport.ssl.enabled', 'true'
+// setting 'xpack.security.transport.ssl.keystore.path', nodeKeystore.name
+// setting 'xpack.security.transport.ssl.verification_mode', 'certificate'
+// setting 'xpack.security.audit.enabled', 'true'
+// keystoreSetting 'bootstrap.password', 'x-pack-test-password'
+// keystoreSetting 'xpack.security.transport.ssl.keystore.secure_password', 'keypass'
+// distribution = 'zip' // this is important since we use the reindex module in ML
+
+// setupCommand 'setupTestUser', 'bin/x-pack/users', 'useradd', 'x_pack_rest_user', '-p', 'x-pack-test-password', '-r', 'superuser'
+
+// extraConfigFile nodeKeystore.name, nodeKeystore
+
+// waitCondition = { NodeInfo node, AntBuilder ant ->
+// File tmpFile = new File(node.cwd, 'wait.success')
+
+// for (int i = 0; i < 10; i++) {
+// // we use custom wait logic here as the elastic user is not available immediately and ant.get will fail when a 401 is returned
+// HttpURLConnection httpURLConnection = null;
+// try {
+// httpURLConnection = (HttpURLConnection) new URL("http://${node.httpUri()}/_cluster/health?wait_for_nodes=${numNodes}&wait_for_status=yellow").openConnection();
+// httpURLConnection.setRequestProperty("Authorization", "Basic " +
+// Base64.getEncoder().encodeToString("x_pack_rest_user:x-pack-test-password".getBytes(StandardCharsets.UTF_8)));
+// httpURLConnection.setRequestMethod("GET");
+// httpURLConnection.connect();
+// if (httpURLConnection.getResponseCode() == 200) {
+// tmpFile.withWriter StandardCharsets.UTF_8.name(), {
+// it.write(httpURLConnection.getInputStream().getText(StandardCharsets.UTF_8.name()))
+// }
+// }
+// } catch (Exception e) {
+// if (i == 9) {
+// logger.error("final attempt of calling cluster health failed", e)
+// } else {
+// logger.debug("failed to call cluster health", e)
+// }
+// } finally {
+// if (httpURLConnection != null) {
+// httpURLConnection.disconnect();
+// }
+// }
+
+// // did not start, so wait a bit before trying again
+// Thread.sleep(500L);
+// }
+// return tmpFile.exists()
+// }
+//}
+
+test {
+ /*
+ * We have to disable setting the number of available processors as tests in the same JVM randomize processors and will step on each
+ * other if we allow them to set the number of available processors as it's set-once in Netty.
+ */
+ systemProperty 'es.set.netty.runtime.available.processors', 'false'
+}
+
+integTestRunner {
+ /*
+ * We have to disable setting the number of available processors as tests in the same JVM randomize processors and will step on each
+ * other if we allow them to set the number of available processors as it's set-once in Netty.
+ */
+ systemProperty 'es.set.netty.runtime.available.processors', 'false'
+}
+
+// TODO: don't publish test artifacts just to run messy tests, fix the tests!
+// https://github.com/elastic/x-plugins/issues/724
+configurations {
+ testArtifacts.extendsFrom testRuntime
+}
+task testJar(type: Jar) {
+ appendix 'test'
+ from sourceSets.test.output
+}
+artifacts {
+ // normal es plugins do not publish the jar but we need to since users need it for Transport Clients and extensions
+ archives jar
+ testArtifacts testJar
+}
+
+// pulled in as external dependency to work on java 9
+if (JavaVersion.current() <= JavaVersion.VERSION_1_8) {
+ thirdPartyAudit.excludes += [
+ 'com.sun.activation.registries.MailcapParseException',
+ 'javax.activation.ActivationDataFlavor',
+ 'javax.activation.CommandInfo',
+ 'javax.activation.CommandMap',
+ 'javax.activation.CommandObject',
+ 'javax.activation.DataContentHandler',
+ 'javax.activation.DataContentHandlerFactory',
+ 'javax.activation.DataHandler$1',
+ 'javax.activation.DataHandler',
+ 'javax.activation.DataHandlerDataSource',
+ 'javax.activation.DataSource',
+ 'javax.activation.DataSourceDataContentHandler',
+ 'javax.activation.FileDataSource',
+ 'javax.activation.FileTypeMap',
+ 'javax.activation.MimeType',
+ 'javax.activation.MimeTypeParameterList',
+ 'javax.activation.MimeTypeParseException',
+ 'javax.activation.ObjectDataContentHandler',
+ 'javax.activation.SecuritySupport$1',
+ 'javax.activation.SecuritySupport$2',
+ 'javax.activation.SecuritySupport$3',
+ 'javax.activation.SecuritySupport$4',
+ 'javax.activation.SecuritySupport$5',
+ 'javax.activation.SecuritySupport',
+ 'javax.activation.URLDataSource',
+ 'javax.activation.UnsupportedDataTypeException'
+ ]
+}
+
+run {
+ distribution = 'zip'
}
diff --git a/plugin/security/licenses/bcpkix-jdk15on-1.58.jar.sha1 b/plugin/core/licenses/bcpkix-jdk15on-1.58.jar.sha1
similarity index 100%
rename from plugin/security/licenses/bcpkix-jdk15on-1.58.jar.sha1
rename to plugin/core/licenses/bcpkix-jdk15on-1.58.jar.sha1
diff --git a/plugin/security/licenses/bcprov-jdk15on-1.58.jar.sha1 b/plugin/core/licenses/bcprov-jdk15on-1.58.jar.sha1
similarity index 100%
rename from plugin/security/licenses/bcprov-jdk15on-1.58.jar.sha1
rename to plugin/core/licenses/bcprov-jdk15on-1.58.jar.sha1
diff --git a/plugin/security/licenses/bouncycastle-LICENSE.txt b/plugin/core/licenses/bouncycastle-LICENSE.txt
similarity index 100%
rename from plugin/security/licenses/bouncycastle-LICENSE.txt
rename to plugin/core/licenses/bouncycastle-LICENSE.txt
diff --git a/plugin/security/licenses/bouncycastle-NOTICE.txt b/plugin/core/licenses/bouncycastle-NOTICE.txt
similarity index 100%
rename from plugin/security/licenses/bouncycastle-NOTICE.txt
rename to plugin/core/licenses/bouncycastle-NOTICE.txt
diff --git a/plugin/core/licenses/commons-LICENSE.txt b/plugin/core/licenses/commons-LICENSE.txt
new file mode 100644
index 00000000000..d6456956733
--- /dev/null
+++ b/plugin/core/licenses/commons-LICENSE.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/plugin/core/licenses/commons-NOTICE.txt b/plugin/core/licenses/commons-NOTICE.txt
new file mode 100644
index 00000000000..1da9af50f60
--- /dev/null
+++ b/plugin/core/licenses/commons-NOTICE.txt
@@ -0,0 +1,17 @@
+Apache Commons Codec
+Copyright 2002-2014 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+src/test/org/apache/commons/codec/language/DoubleMetaphoneTest.java
+contains test data from http://aspell.net/test/orig/batch0.tab.
+Copyright (C) 2002 Kevin Atkinson (kevina@gnu.org)
+
+===============================================================================
+
+The content of package org.apache.commons.codec.language.bm has been translated
+from the original php source code available at http://stevemorse.org/phoneticinfo.htm
+with permission from the original authors.
+Original source copyright:
+Copyright (c) 2008 Alexander Beider & Stephen P. Morse.
diff --git a/plugin/core/licenses/commons-codec-1.10.jar.sha1 b/plugin/core/licenses/commons-codec-1.10.jar.sha1
new file mode 100644
index 00000000000..3fe8682a1b0
--- /dev/null
+++ b/plugin/core/licenses/commons-codec-1.10.jar.sha1
@@ -0,0 +1 @@
+4b95f4897fa13f2cd904aee711aeafc0c5295cd8
\ No newline at end of file
diff --git a/plugin/core/licenses/commons-logging-1.1.3.jar.sha1 b/plugin/core/licenses/commons-logging-1.1.3.jar.sha1
new file mode 100644
index 00000000000..5b8f029e582
--- /dev/null
+++ b/plugin/core/licenses/commons-logging-1.1.3.jar.sha1
@@ -0,0 +1 @@
+f6f66e966c70a83ffbdb6f17a0919eaf7c8aca7f
\ No newline at end of file
diff --git a/plugin/core/licenses/httpasyncclient-4.1.2.jar.sha1 b/plugin/core/licenses/httpasyncclient-4.1.2.jar.sha1
new file mode 100644
index 00000000000..065ed920a17
--- /dev/null
+++ b/plugin/core/licenses/httpasyncclient-4.1.2.jar.sha1
@@ -0,0 +1 @@
+95aa3e6fb520191a0970a73cf09f62948ee614be
\ No newline at end of file
diff --git a/plugin/core/licenses/httpclient-4.5.2.jar.sha1 b/plugin/core/licenses/httpclient-4.5.2.jar.sha1
new file mode 100644
index 00000000000..6937112a09f
--- /dev/null
+++ b/plugin/core/licenses/httpclient-4.5.2.jar.sha1
@@ -0,0 +1 @@
+733db77aa8d9b2d68015189df76ab06304406e50
\ No newline at end of file
diff --git a/plugin/core/licenses/httpclient-LICENSE.txt b/plugin/core/licenses/httpclient-LICENSE.txt
new file mode 100644
index 00000000000..32f01eda18f
--- /dev/null
+++ b/plugin/core/licenses/httpclient-LICENSE.txt
@@ -0,0 +1,558 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+=========================================================================
+
+This project includes Public Suffix List copied from
+
+licensed under the terms of the Mozilla Public License, v. 2.0
+
+Full license text:
+
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
diff --git a/plugin/core/licenses/httpclient-NOTICE.txt b/plugin/core/licenses/httpclient-NOTICE.txt
new file mode 100644
index 00000000000..91e5c40c4c6
--- /dev/null
+++ b/plugin/core/licenses/httpclient-NOTICE.txt
@@ -0,0 +1,6 @@
+Apache HttpComponents Client
+Copyright 1999-2016 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
diff --git a/plugin/core/licenses/httpcore-4.4.5.jar.sha1 b/plugin/core/licenses/httpcore-4.4.5.jar.sha1
new file mode 100644
index 00000000000..58172660174
--- /dev/null
+++ b/plugin/core/licenses/httpcore-4.4.5.jar.sha1
@@ -0,0 +1 @@
+e7501a1b34325abb00d17dde96150604a0658b54
\ No newline at end of file
diff --git a/plugin/security/licenses/unboundid-ldapsdk-3.2.0.jar.sha1 b/plugin/core/licenses/unboundid-ldapsdk-3.2.0.jar.sha1
similarity index 100%
rename from plugin/security/licenses/unboundid-ldapsdk-3.2.0.jar.sha1
rename to plugin/core/licenses/unboundid-ldapsdk-3.2.0.jar.sha1
diff --git a/plugin/security/licenses/unboundid-ldapsdk-LICENSE.txt b/plugin/core/licenses/unboundid-ldapsdk-LICENSE.txt
similarity index 100%
rename from plugin/security/licenses/unboundid-ldapsdk-LICENSE.txt
rename to plugin/core/licenses/unboundid-ldapsdk-LICENSE.txt
diff --git a/plugin/security/licenses/unboundid-ldapsdk-NOTICE.txt b/plugin/core/licenses/unboundid-ldapsdk-NOTICE.txt
similarity index 100%
rename from plugin/security/licenses/unboundid-ldapsdk-NOTICE.txt
rename to plugin/core/licenses/unboundid-ldapsdk-NOTICE.txt
diff --git a/plugin/bin/x-pack/extension b/plugin/core/src/main/bin/extension
similarity index 100%
rename from plugin/bin/x-pack/extension
rename to plugin/core/src/main/bin/extension
diff --git a/plugin/bin/x-pack/extension.bat b/plugin/core/src/main/bin/extension.bat
similarity index 100%
rename from plugin/bin/x-pack/extension.bat
rename to plugin/core/src/main/bin/extension.bat
diff --git a/plugin/core/src/main/bin/x-pack-env b/plugin/core/src/main/bin/x-pack-env
new file mode 100644
index 00000000000..504014acc4b
--- /dev/null
+++ b/plugin/core/src/main/bin/x-pack-env
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+# or more contributor license agreements. Licensed under the Elastic License;
+# you may not use this file except in compliance with the Elastic License.
+
+ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/x-pack/x-pack-core/*"
+ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/x-pack/x-pack-logstash/*"
+ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/x-pack/x-pack-ml/*"
+ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/x-pack/x-pack-monitoring/*"
+ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/x-pack/x-pack-security/*"
+ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/x-pack/x-pack-watcher/*"
diff --git a/plugin/core/src/main/bin/x-pack-env.bat b/plugin/core/src/main/bin/x-pack-env.bat
new file mode 100644
index 00000000000..f40a0b9b53c
--- /dev/null
+++ b/plugin/core/src/main/bin/x-pack-env.bat
@@ -0,0 +1,10 @@
+rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+rem or more contributor license agreements. Licensed under the Elastic License;
+rem you may not use this file except in compliance with the Elastic License.
+
+set ES_CLASSPATH=!ES_CLASSPATH!;!ES_HOME!/plugins/x-pack/x-pack-core/*
+set ES_CLASSPATH=!ES_CLASSPATH!;!ES_HOME!/plugins/x-pack/x-pack-logstash*
+set ES_CLASSPATH=!ES_CLASSPATH!;!ES_HOME!/plugins/x-pack/x-pack-ml/*
+set ES_CLASSPATH=!ES_CLASSPATH!;!ES_HOME!/plugins/x-pack/x-pack-monitoring/*
+set ES_CLASSPATH=!ES_CLASSPATH!;!ES_HOME!/plugins/x-pack/x-pack-security/*
+set ES_CLASSPATH=!ES_CLASSPATH!;!ES_HOME!/plugins/x-pack/x-pack-watcher/*
diff --git a/plugin/config/x-pack/log4j2.properties b/plugin/core/src/main/config/log4j2.properties
similarity index 100%
rename from plugin/config/x-pack/log4j2.properties
rename to plugin/core/src/main/config/log4j2.properties
diff --git a/plugin/src/main/java/org/elasticsearch/common/network/InetAddressHelper.java b/plugin/core/src/main/java/org/elasticsearch/common/network/InetAddressHelper.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/common/network/InetAddressHelper.java
rename to plugin/core/src/main/java/org/elasticsearch/common/network/InetAddressHelper.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/CryptUtils.java b/plugin/core/src/main/java/org/elasticsearch/license/CryptUtils.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/CryptUtils.java
rename to plugin/core/src/main/java/org/elasticsearch/license/CryptUtils.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/ExpirationCallback.java b/plugin/core/src/main/java/org/elasticsearch/license/ExpirationCallback.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/ExpirationCallback.java
rename to plugin/core/src/main/java/org/elasticsearch/license/ExpirationCallback.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/LicenseService.java b/plugin/core/src/main/java/org/elasticsearch/license/LicenseService.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/LicenseService.java
rename to plugin/core/src/main/java/org/elasticsearch/license/LicenseService.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/LicenseUtils.java b/plugin/core/src/main/java/org/elasticsearch/license/LicenseUtils.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/LicenseUtils.java
rename to plugin/core/src/main/java/org/elasticsearch/license/LicenseUtils.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/LicenseVerifier.java b/plugin/core/src/main/java/org/elasticsearch/license/LicenseVerifier.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/LicenseVerifier.java
rename to plugin/core/src/main/java/org/elasticsearch/license/LicenseVerifier.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/LicensesMetaData.java b/plugin/core/src/main/java/org/elasticsearch/license/LicensesMetaData.java
similarity index 97%
rename from plugin/src/main/java/org/elasticsearch/license/LicensesMetaData.java
rename to plugin/core/src/main/java/org/elasticsearch/license/LicensesMetaData.java
index d0a5b6e3307..ffb9faab44e 100644
--- a/plugin/src/main/java/org/elasticsearch/license/LicensesMetaData.java
+++ b/plugin/core/src/main/java/org/elasticsearch/license/LicensesMetaData.java
@@ -23,7 +23,7 @@ import java.util.EnumSet;
/**
* Contains metadata about registered licenses
*/
-class LicensesMetaData extends AbstractNamedDiffable implements MetaData.Custom,
+public class LicensesMetaData extends AbstractNamedDiffable implements MetaData.Custom,
MergableCustomMetaData {
public static final String TYPE = "licenses";
@@ -170,7 +170,7 @@ class LicensesMetaData extends AbstractNamedDiffable implements
}
}
- LicensesMetaData(StreamInput streamInput) throws IOException {
+ public LicensesMetaData(StreamInput streamInput) throws IOException {
if (streamInput.readBoolean()) {
license = License.readLicense(streamInput);
} else {
diff --git a/plugin/src/main/java/org/elasticsearch/license/Licensing.java b/plugin/core/src/main/java/org/elasticsearch/license/Licensing.java
similarity index 88%
rename from plugin/src/main/java/org/elasticsearch/license/Licensing.java
rename to plugin/core/src/main/java/org/elasticsearch/license/Licensing.java
index 08c864d6cf9..7df8a264d2e 100644
--- a/plugin/src/main/java/org/elasticsearch/license/Licensing.java
+++ b/plugin/core/src/main/java/org/elasticsearch/license/Licensing.java
@@ -7,6 +7,7 @@ package org.elasticsearch.license;
import org.elasticsearch.action.ActionRequest;
import org.elasticsearch.action.ActionResponse;
+import org.elasticsearch.action.GenericAction;
import org.elasticsearch.cluster.NamedDiff;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.metadata.MetaData;
@@ -39,6 +40,8 @@ public class Licensing implements ActionPlugin {
private final boolean isTransportClient;
private final boolean isTribeNode;
+ // Until this is moved out to its own plugin (its currently in XPackPlugin.java, we need to make sure that any edits to this file
+ // are also carried out in XPackClientPlugin.java
public List getNamedWriteables() {
List entries = new ArrayList<>();
entries.add(new NamedWriteableRegistry.Entry(MetaData.Custom.class, LicensesMetaData.TYPE, LicensesMetaData::new));
@@ -46,6 +49,8 @@ public class Licensing implements ActionPlugin {
return entries;
}
+ // Until this is moved out to its own plugin (its currently in XPackPlugin.java, we need to make sure that any edits to this file
+ // are also carried out in XPackClientPlugin.java
public List getNamedXContent() {
List entries = new ArrayList<>();
// Metadata
@@ -87,6 +92,8 @@ public class Licensing implements ActionPlugin {
return handlers;
}
+ // Until this is moved out to its own plugin (its currently in XPackPlugin.java, we need to make sure that any edits to this file
+ // are also carried out in XPackClientPlugin.java
public List> getSettings() {
// TODO convert this wildcard to a real setting
return Collections.singletonList(Setting.groupSetting("license.", Setting.Property.NodeScope));
diff --git a/plugin/src/main/java/org/elasticsearch/license/LicensingClient.java b/plugin/core/src/main/java/org/elasticsearch/license/LicensingClient.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/LicensingClient.java
rename to plugin/core/src/main/java/org/elasticsearch/license/LicensingClient.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java b/plugin/core/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java
rename to plugin/core/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java b/plugin/core/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java
rename to plugin/core/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/RestGetTrialStatus.java b/plugin/core/src/main/java/org/elasticsearch/license/RestGetTrialStatus.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/RestGetTrialStatus.java
rename to plugin/core/src/main/java/org/elasticsearch/license/RestGetTrialStatus.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/RestPostStartTrialLicense.java b/plugin/core/src/main/java/org/elasticsearch/license/RestPostStartTrialLicense.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/RestPostStartTrialLicense.java
rename to plugin/core/src/main/java/org/elasticsearch/license/RestPostStartTrialLicense.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java b/plugin/core/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java
rename to plugin/core/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/SelfGeneratedLicense.java b/plugin/core/src/main/java/org/elasticsearch/license/SelfGeneratedLicense.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/SelfGeneratedLicense.java
rename to plugin/core/src/main/java/org/elasticsearch/license/SelfGeneratedLicense.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/TransportDeleteLicenseAction.java b/plugin/core/src/main/java/org/elasticsearch/license/TransportDeleteLicenseAction.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/TransportDeleteLicenseAction.java
rename to plugin/core/src/main/java/org/elasticsearch/license/TransportDeleteLicenseAction.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/TransportGetLicenseAction.java b/plugin/core/src/main/java/org/elasticsearch/license/TransportGetLicenseAction.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/TransportGetLicenseAction.java
rename to plugin/core/src/main/java/org/elasticsearch/license/TransportGetLicenseAction.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/TransportGetTrialStatusAction.java b/plugin/core/src/main/java/org/elasticsearch/license/TransportGetTrialStatusAction.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/TransportGetTrialStatusAction.java
rename to plugin/core/src/main/java/org/elasticsearch/license/TransportGetTrialStatusAction.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/TransportPostStartTrialAction.java b/plugin/core/src/main/java/org/elasticsearch/license/TransportPostStartTrialAction.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/TransportPostStartTrialAction.java
rename to plugin/core/src/main/java/org/elasticsearch/license/TransportPostStartTrialAction.java
diff --git a/plugin/src/main/java/org/elasticsearch/license/TransportPutLicenseAction.java b/plugin/core/src/main/java/org/elasticsearch/license/TransportPutLicenseAction.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/TransportPutLicenseAction.java
rename to plugin/core/src/main/java/org/elasticsearch/license/TransportPutLicenseAction.java
diff --git a/plugin/core/src/main/java/org/elasticsearch/license/XPackLicenseState.java b/plugin/core/src/main/java/org/elasticsearch/license/XPackLicenseState.java
index 0e6d191494d..756688660a6 100644
--- a/plugin/core/src/main/java/org/elasticsearch/license/XPackLicenseState.java
+++ b/plugin/core/src/main/java/org/elasticsearch/license/XPackLicenseState.java
@@ -9,7 +9,7 @@ import org.elasticsearch.common.Strings;
import org.elasticsearch.common.logging.LoggerMessageFormat;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.license.License.OperationMode;
-import org.elasticsearch.xpack.XpackField;
+import org.elasticsearch.xpack.XPackField;
import org.elasticsearch.xpack.monitoring.MonitoringField;
import java.util.Collections;
@@ -29,32 +29,32 @@ public class XPackLicenseState {
static final Map EXPIRATION_MESSAGES;
static {
Map messages = new LinkedHashMap<>();
- messages.put(XpackField.SECURITY, new String[] {
+ messages.put(XPackField.SECURITY, new String[] {
"Cluster health, cluster stats and indices stats operations are blocked",
"All data operations (read and write) continue to work"
});
- messages.put(XpackField.WATCHER, new String[] {
+ messages.put(XPackField.WATCHER, new String[] {
"PUT / GET watch APIs are disabled, DELETE watch API continues to work",
"Watches execute and write to the history",
"The actions of the watches don't execute"
});
- messages.put(XpackField.MONITORING, new String[] {
+ messages.put(XPackField.MONITORING, new String[] {
"The agent will stop collecting cluster and indices metrics",
"The agent will stop automatically cleaning indices older than [xpack.monitoring.history.duration]"
});
- messages.put(XpackField.GRAPH, new String[] {
+ messages.put(XPackField.GRAPH, new String[] {
"Graph explore APIs are disabled"
});
- messages.put(XpackField.MACHINE_LEARNING, new String[] {
+ messages.put(XPackField.MACHINE_LEARNING, new String[] {
"Machine learning APIs are disabled"
});
- messages.put(XpackField.LOGSTASH, new String[] {
+ messages.put(XPackField.LOGSTASH, new String[] {
"Logstash will continue to poll centrally-managed pipelines"
});
- messages.put(XpackField.DEPRECATION, new String[] {
+ messages.put(XPackField.DEPRECATION, new String[] {
"Deprecation APIs are disabled"
});
- messages.put(XpackField.UPGRADE, new String[] {
+ messages.put(XPackField.UPGRADE, new String[] {
"Upgrade API is disabled"
});
EXPIRATION_MESSAGES = Collections.unmodifiableMap(messages);
@@ -67,12 +67,12 @@ public class XPackLicenseState {
static final Map> ACKNOWLEDGMENT_MESSAGES;
static {
Map> messages = new LinkedHashMap<>();
- messages.put(XpackField.SECURITY, XPackLicenseState::securityAcknowledgementMessages);
- messages.put(XpackField.WATCHER, XPackLicenseState::watcherAcknowledgementMessages);
- messages.put(XpackField.MONITORING, XPackLicenseState::monitoringAcknowledgementMessages);
- messages.put(XpackField.GRAPH, XPackLicenseState::graphAcknowledgementMessages);
- messages.put(XpackField.MACHINE_LEARNING, XPackLicenseState::machineLearningAcknowledgementMessages);
- messages.put(XpackField.LOGSTASH, XPackLicenseState::logstashAcknowledgementMessages);
+ messages.put(XPackField.SECURITY, XPackLicenseState::securityAcknowledgementMessages);
+ messages.put(XPackField.WATCHER, XPackLicenseState::watcherAcknowledgementMessages);
+ messages.put(XPackField.MONITORING, XPackLicenseState::monitoringAcknowledgementMessages);
+ messages.put(XPackField.GRAPH, XPackLicenseState::graphAcknowledgementMessages);
+ messages.put(XPackField.MACHINE_LEARNING, XPackLicenseState::machineLearningAcknowledgementMessages);
+ messages.put(XPackField.LOGSTASH, XPackLicenseState::logstashAcknowledgementMessages);
ACKNOWLEDGMENT_MESSAGES = Collections.unmodifiableMap(messages);
}
diff --git a/plugin/src/main/java/org/elasticsearch/license/package-info.java b/plugin/core/src/main/java/org/elasticsearch/license/package-info.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/license/package-info.java
rename to plugin/core/src/main/java/org/elasticsearch/license/package-info.java
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/EmptyXPackFeatureSet.java b/plugin/core/src/main/java/org/elasticsearch/xpack/EmptyXPackFeatureSet.java
new file mode 100644
index 00000000000..20c5642cb43
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/EmptyXPackFeatureSet.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack;
+
+import org.elasticsearch.action.ActionListener;
+
+import java.util.Collections;
+import java.util.Map;
+
+public class EmptyXPackFeatureSet implements XPackFeatureSet {
+ @Override
+ public String name() {
+ return "Empty XPackFeatureSet";
+ }
+
+ @Override
+ public String description() {
+ return "Core will not function without this empty featureset compliments of the way the TransportXPackInfoAction Guice works";
+ }
+
+ @Override
+ public boolean available() {
+ return false;
+ }
+
+ @Override
+ public boolean enabled() {
+ return false;
+ }
+
+ @Override
+ public Map nativeCodeInfo() {
+ return Collections.emptyMap();
+ }
+
+ @Override
+ public void usage(ActionListener listener) {
+
+ }
+}
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/XPackClient.java b/plugin/core/src/main/java/org/elasticsearch/xpack/XPackClient.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/XPackClient.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/XPackClient.java
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackClientPlugin.java b/plugin/core/src/main/java/org/elasticsearch/xpack/XPackClientPlugin.java
new file mode 100644
index 00000000000..055ff176c02
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/XPackClientPlugin.java
@@ -0,0 +1,384 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack;
+
+import org.elasticsearch.action.GenericAction;
+import org.elasticsearch.cluster.ClusterState;
+import org.elasticsearch.cluster.NamedDiff;
+import org.elasticsearch.cluster.metadata.MetaData;
+import org.elasticsearch.common.ParseField;
+import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
+import org.elasticsearch.common.network.NetworkModule;
+import org.elasticsearch.common.network.NetworkService;
+import org.elasticsearch.common.settings.SecureString;
+import org.elasticsearch.common.settings.Setting;
+import org.elasticsearch.common.settings.Settings;
+import org.elasticsearch.common.util.BigArrays;
+import org.elasticsearch.common.util.PageCacheRecycler;
+import org.elasticsearch.common.util.concurrent.ThreadContext;
+import org.elasticsearch.common.xcontent.NamedXContentRegistry;
+import org.elasticsearch.indices.breaker.CircuitBreakerService;
+import org.elasticsearch.license.DeleteLicenseAction;
+import org.elasticsearch.license.GetLicenseAction;
+import org.elasticsearch.license.GetTrialStatusAction;
+import org.elasticsearch.license.LicenseService;
+import org.elasticsearch.license.LicensesMetaData;
+import org.elasticsearch.license.PostStartTrialAction;
+import org.elasticsearch.license.PutLicenseAction;
+import org.elasticsearch.plugins.ActionPlugin;
+import org.elasticsearch.plugins.NetworkPlugin;
+import org.elasticsearch.plugins.Plugin;
+import org.elasticsearch.tasks.Task;
+import org.elasticsearch.threadpool.ThreadPool;
+import org.elasticsearch.transport.Transport;
+import org.elasticsearch.xpack.action.XPackInfoAction;
+import org.elasticsearch.xpack.action.XPackUsageAction;
+import org.elasticsearch.xpack.deprecation.DeprecationInfoAction;
+import org.elasticsearch.xpack.graph.GraphFeatureSetUsage;
+import org.elasticsearch.xpack.graph.action.GraphExploreAction;
+import org.elasticsearch.xpack.ml.MachineLearningFeatureSetUsage;
+import org.elasticsearch.xpack.ml.MlMetadata;
+import org.elasticsearch.xpack.ml.action.CloseJobAction;
+import org.elasticsearch.xpack.ml.action.DeleteCalendarAction;
+import org.elasticsearch.xpack.ml.action.DeleteCalendarEventAction;
+import org.elasticsearch.xpack.ml.action.DeleteDatafeedAction;
+import org.elasticsearch.xpack.ml.action.DeleteExpiredDataAction;
+import org.elasticsearch.xpack.ml.action.DeleteFilterAction;
+import org.elasticsearch.xpack.ml.action.DeleteJobAction;
+import org.elasticsearch.xpack.ml.action.DeleteModelSnapshotAction;
+import org.elasticsearch.xpack.ml.action.FinalizeJobExecutionAction;
+import org.elasticsearch.xpack.ml.action.FlushJobAction;
+import org.elasticsearch.xpack.ml.action.ForecastJobAction;
+import org.elasticsearch.xpack.ml.action.GetBucketsAction;
+import org.elasticsearch.xpack.ml.action.GetCalendarEventsAction;
+import org.elasticsearch.xpack.ml.action.GetCalendarsAction;
+import org.elasticsearch.xpack.ml.action.GetCategoriesAction;
+import org.elasticsearch.xpack.ml.action.GetDatafeedsAction;
+import org.elasticsearch.xpack.ml.action.GetDatafeedsStatsAction;
+import org.elasticsearch.xpack.ml.action.GetFiltersAction;
+import org.elasticsearch.xpack.ml.action.GetInfluencersAction;
+import org.elasticsearch.xpack.ml.action.GetJobsAction;
+import org.elasticsearch.xpack.ml.action.GetJobsStatsAction;
+import org.elasticsearch.xpack.ml.action.GetModelSnapshotsAction;
+import org.elasticsearch.xpack.ml.action.GetOverallBucketsAction;
+import org.elasticsearch.xpack.ml.action.GetRecordsAction;
+import org.elasticsearch.xpack.ml.action.IsolateDatafeedAction;
+import org.elasticsearch.xpack.ml.action.KillProcessAction;
+import org.elasticsearch.xpack.ml.action.OpenJobAction;
+import org.elasticsearch.xpack.ml.action.PostCalendarEventsAction;
+import org.elasticsearch.xpack.ml.action.PostDataAction;
+import org.elasticsearch.xpack.ml.action.PreviewDatafeedAction;
+import org.elasticsearch.xpack.ml.action.PutCalendarAction;
+import org.elasticsearch.xpack.ml.action.PutDatafeedAction;
+import org.elasticsearch.xpack.ml.action.PutFilterAction;
+import org.elasticsearch.xpack.ml.action.PutJobAction;
+import org.elasticsearch.xpack.ml.action.RevertModelSnapshotAction;
+import org.elasticsearch.xpack.ml.action.StartDatafeedAction;
+import org.elasticsearch.xpack.ml.action.StopDatafeedAction;
+import org.elasticsearch.xpack.ml.action.UpdateCalendarJobAction;
+import org.elasticsearch.xpack.ml.action.UpdateDatafeedAction;
+import org.elasticsearch.xpack.ml.action.UpdateJobAction;
+import org.elasticsearch.xpack.ml.action.UpdateModelSnapshotAction;
+import org.elasticsearch.xpack.ml.action.UpdateProcessAction;
+import org.elasticsearch.xpack.ml.action.ValidateDetectorAction;
+import org.elasticsearch.xpack.ml.action.ValidateJobConfigAction;
+import org.elasticsearch.xpack.ml.datafeed.DatafeedState;
+import org.elasticsearch.xpack.ml.job.config.JobTaskStatus;
+import org.elasticsearch.xpack.monitoring.MonitoringFeatureSetUsage;
+import org.elasticsearch.xpack.persistent.CompletionPersistentTaskAction;
+import org.elasticsearch.xpack.persistent.PersistentTaskParams;
+import org.elasticsearch.xpack.persistent.PersistentTasksCustomMetaData;
+import org.elasticsearch.xpack.persistent.PersistentTasksNodeService;
+import org.elasticsearch.xpack.persistent.RemovePersistentTaskAction;
+import org.elasticsearch.xpack.persistent.StartPersistentTaskAction;
+import org.elasticsearch.xpack.persistent.UpdatePersistentTaskStatusAction;
+import org.elasticsearch.xpack.security.SecurityFeatureSetUsage;
+import org.elasticsearch.xpack.security.SecurityField;
+import org.elasticsearch.xpack.security.SecuritySettings;
+import org.elasticsearch.xpack.security.action.realm.ClearRealmCacheAction;
+import org.elasticsearch.xpack.security.action.role.ClearRolesCacheAction;
+import org.elasticsearch.xpack.security.action.role.DeleteRoleAction;
+import org.elasticsearch.xpack.security.action.role.GetRolesAction;
+import org.elasticsearch.xpack.security.action.role.PutRoleAction;
+import org.elasticsearch.xpack.security.action.rolemapping.DeleteRoleMappingAction;
+import org.elasticsearch.xpack.security.action.rolemapping.GetRoleMappingsAction;
+import org.elasticsearch.xpack.security.action.rolemapping.PutRoleMappingAction;
+import org.elasticsearch.xpack.security.action.token.CreateTokenAction;
+import org.elasticsearch.xpack.security.action.token.InvalidateTokenAction;
+import org.elasticsearch.xpack.security.action.token.RefreshTokenAction;
+import org.elasticsearch.xpack.security.action.user.AuthenticateAction;
+import org.elasticsearch.xpack.security.action.user.ChangePasswordAction;
+import org.elasticsearch.xpack.security.action.user.DeleteUserAction;
+import org.elasticsearch.xpack.security.action.user.GetUsersAction;
+import org.elasticsearch.xpack.security.action.user.HasPrivilegesAction;
+import org.elasticsearch.xpack.security.action.user.PutUserAction;
+import org.elasticsearch.xpack.security.action.user.SetEnabledAction;
+import org.elasticsearch.xpack.security.authc.TokenMetaData;
+import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken;
+import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.AllExpression;
+import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.AnyExpression;
+import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.ExceptExpression;
+import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.FieldExpression;
+import org.elasticsearch.xpack.security.authc.support.mapper.expressiondsl.RoleMapperExpression;
+import org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4Transport;
+import org.elasticsearch.xpack.ssl.SSLService;
+import org.elasticsearch.xpack.ssl.action.GetCertificateInfoAction;
+import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeAction;
+import org.elasticsearch.xpack.upgrade.actions.IndexUpgradeInfoAction;
+import org.elasticsearch.xpack.watcher.WatcherFeatureSetUsage;
+import org.elasticsearch.xpack.watcher.WatcherMetaData;
+import org.elasticsearch.xpack.watcher.transport.actions.ack.AckWatchAction;
+import org.elasticsearch.xpack.watcher.transport.actions.activate.ActivateWatchAction;
+import org.elasticsearch.xpack.watcher.transport.actions.delete.DeleteWatchAction;
+import org.elasticsearch.xpack.watcher.transport.actions.execute.ExecuteWatchAction;
+import org.elasticsearch.xpack.watcher.transport.actions.get.GetWatchAction;
+import org.elasticsearch.xpack.watcher.transport.actions.put.PutWatchAction;
+import org.elasticsearch.xpack.watcher.transport.actions.service.WatcherServiceAction;
+import org.elasticsearch.xpack.watcher.transport.actions.stats.WatcherStatsAction;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.function.Supplier;
+
+public class XPackClientPlugin extends Plugin implements ActionPlugin, NetworkPlugin {
+
+ private final Settings settings;
+
+ public XPackClientPlugin(final Settings settings) {
+ this.settings = settings;
+ }
+
+ @Override
+ public List> getSettings() {
+ ArrayList> settings = new ArrayList<>();
+ // the only licensing one
+ settings.add(Setting.groupSetting("license.", Setting.Property.NodeScope));
+
+ //TODO split these settings up
+ settings.addAll(XPackSettings.getAllSettings());
+
+ settings.add(LicenseService.SELF_GENERATED_LICENSE_TYPE);
+
+ // we add the `xpack.version` setting to all internal indices
+ settings.add(Setting.simpleString("index.xpack.version", Setting.Property.IndexScope));
+
+ return settings;
+ }
+
+ @Override
+ public Settings additionalSettings() {
+ return additionalSettings(settings, XPackSettings.SECURITY_ENABLED.get(settings), XPackPlugin.transportClientMode(settings));
+ }
+
+ static Settings additionalSettings(final Settings settings, final boolean enabled, final boolean transportClientMode) {
+ if (enabled && transportClientMode) {
+ final Settings.Builder builder = Settings.builder();
+ builder.put(SecuritySettings.addTransportSettings(settings));
+ builder.put(SecuritySettings.addUserSettings(settings));
+ return builder.build();
+ } else {
+ return Settings.EMPTY;
+ }
+ }
+
+ @Override
+ public List getClientActions() {
+ return Arrays.asList(
+ // deprecation
+ DeprecationInfoAction.INSTANCE,
+ // graph
+ GraphExploreAction.INSTANCE,
+ // ML
+ GetJobsAction.INSTANCE,
+ GetJobsStatsAction.INSTANCE,
+ PutJobAction.INSTANCE,
+ UpdateJobAction.INSTANCE,
+ DeleteJobAction.INSTANCE,
+ OpenJobAction.INSTANCE,
+ GetFiltersAction.INSTANCE,
+ PutFilterAction.INSTANCE,
+ DeleteFilterAction.INSTANCE,
+ KillProcessAction.INSTANCE,
+ GetBucketsAction.INSTANCE,
+ GetInfluencersAction.INSTANCE,
+ GetOverallBucketsAction.INSTANCE,
+ GetRecordsAction.INSTANCE,
+ PostDataAction.INSTANCE,
+ CloseJobAction.INSTANCE,
+ FinalizeJobExecutionAction.INSTANCE,
+ FlushJobAction.INSTANCE,
+ ValidateDetectorAction.INSTANCE,
+ ValidateJobConfigAction.INSTANCE,
+ GetCategoriesAction.INSTANCE,
+ GetModelSnapshotsAction.INSTANCE,
+ RevertModelSnapshotAction.INSTANCE,
+ UpdateModelSnapshotAction.INSTANCE,
+ GetDatafeedsAction.INSTANCE,
+ GetDatafeedsStatsAction.INSTANCE,
+ PutDatafeedAction.INSTANCE,
+ UpdateDatafeedAction.INSTANCE,
+ DeleteDatafeedAction.INSTANCE,
+ PreviewDatafeedAction.INSTANCE,
+ StartDatafeedAction.INSTANCE,
+ StopDatafeedAction.INSTANCE,
+ IsolateDatafeedAction.INSTANCE,
+ DeleteModelSnapshotAction.INSTANCE,
+ UpdateProcessAction.INSTANCE,
+ DeleteExpiredDataAction.INSTANCE,
+ ForecastJobAction.INSTANCE,
+ GetCalendarsAction.INSTANCE,
+ PutCalendarAction.INSTANCE,
+ DeleteCalendarAction.INSTANCE,
+ DeleteCalendarEventAction.INSTANCE,
+ UpdateCalendarJobAction.INSTANCE,
+ GetCalendarEventsAction.INSTANCE,
+ PostCalendarEventsAction.INSTANCE,
+ // licensing
+ StartPersistentTaskAction.INSTANCE,
+ UpdatePersistentTaskStatusAction.INSTANCE,
+ RemovePersistentTaskAction.INSTANCE,
+ CompletionPersistentTaskAction.INSTANCE,
+ // security
+ ClearRealmCacheAction.INSTANCE,
+ ClearRolesCacheAction.INSTANCE,
+ GetUsersAction.INSTANCE,
+ PutUserAction.INSTANCE,
+ DeleteUserAction.INSTANCE,
+ GetRolesAction.INSTANCE,
+ PutRoleAction.INSTANCE,
+ DeleteRoleAction.INSTANCE,
+ ChangePasswordAction.INSTANCE,
+ AuthenticateAction.INSTANCE,
+ SetEnabledAction.INSTANCE,
+ HasPrivilegesAction.INSTANCE,
+ GetRoleMappingsAction.INSTANCE,
+ PutRoleMappingAction.INSTANCE,
+ DeleteRoleMappingAction.INSTANCE,
+ CreateTokenAction.INSTANCE,
+ InvalidateTokenAction.INSTANCE,
+ GetCertificateInfoAction.INSTANCE,
+ RefreshTokenAction.INSTANCE,
+ // upgrade
+ IndexUpgradeInfoAction.INSTANCE,
+ IndexUpgradeAction.INSTANCE,
+ // watcher
+ PutWatchAction.INSTANCE,
+ DeleteWatchAction.INSTANCE,
+ GetWatchAction.INSTANCE,
+ WatcherStatsAction.INSTANCE,
+ AckWatchAction.INSTANCE,
+ ActivateWatchAction.INSTANCE,
+ WatcherServiceAction.INSTANCE,
+ ExecuteWatchAction.INSTANCE,
+ // license
+ PutLicenseAction.INSTANCE,
+ GetLicenseAction.INSTANCE,
+ DeleteLicenseAction.INSTANCE,
+ PostStartTrialAction.INSTANCE,
+ GetTrialStatusAction.INSTANCE,
+ // x-pack
+ XPackInfoAction.INSTANCE,
+ XPackUsageAction.INSTANCE
+ );
+ }
+
+ @Override
+ public List getNamedWriteables() {
+ return Arrays.asList(
+ // graph
+ new NamedWriteableRegistry.Entry(XPackFeatureSet.Usage.class, XPackField.GRAPH, GraphFeatureSetUsage::new),
+ // ML - Custom metadata
+ new NamedWriteableRegistry.Entry(MetaData.Custom.class, "ml", MlMetadata::new),
+ new NamedWriteableRegistry.Entry(NamedDiff.class, "ml", MlMetadata.MlMetadataDiff::new),
+ new NamedWriteableRegistry.Entry(MetaData.Custom.class, PersistentTasksCustomMetaData.TYPE,
+ PersistentTasksCustomMetaData::new),
+ new NamedWriteableRegistry.Entry(NamedDiff.class, PersistentTasksCustomMetaData.TYPE,
+ PersistentTasksCustomMetaData::readDiffFrom),
+ // ML - Persistent action requests
+ new NamedWriteableRegistry.Entry(PersistentTaskParams.class, StartDatafeedAction.TASK_NAME,
+ StartDatafeedAction.DatafeedParams::new),
+ new NamedWriteableRegistry.Entry(PersistentTaskParams.class, OpenJobAction.TASK_NAME,
+ OpenJobAction.JobParams::new),
+ // ML - Task statuses
+ new NamedWriteableRegistry.Entry(Task.Status.class, PersistentTasksNodeService.Status.NAME,
+ PersistentTasksNodeService.Status::new),
+ new NamedWriteableRegistry.Entry(Task.Status.class, JobTaskStatus.NAME, JobTaskStatus::new),
+ new NamedWriteableRegistry.Entry(Task.Status.class, DatafeedState.NAME, DatafeedState::fromStream),
+ new NamedWriteableRegistry.Entry(XPackFeatureSet.Usage.class, XPackField.MACHINE_LEARNING,
+ MachineLearningFeatureSetUsage::new),
+ // monitoring
+ new NamedWriteableRegistry.Entry(XPackFeatureSet.Usage.class, XPackField.MONITORING, MonitoringFeatureSetUsage::new),
+ // security
+ new NamedWriteableRegistry.Entry(ClusterState.Custom.class, TokenMetaData.TYPE, TokenMetaData::new),
+ new NamedWriteableRegistry.Entry(NamedDiff.class, TokenMetaData.TYPE, TokenMetaData::readDiffFrom),
+ new NamedWriteableRegistry.Entry(XPackFeatureSet.Usage.class, XPackField.SECURITY, SecurityFeatureSetUsage::new),
+ new NamedWriteableRegistry.Entry(RoleMapperExpression.class, AllExpression.NAME, AllExpression::new),
+ new NamedWriteableRegistry.Entry(RoleMapperExpression.class, AnyExpression.NAME, AnyExpression::new),
+ new NamedWriteableRegistry.Entry(RoleMapperExpression.class, FieldExpression.NAME, FieldExpression::new),
+ new NamedWriteableRegistry.Entry(RoleMapperExpression.class, ExceptExpression.NAME, ExceptExpression::new),
+ // watcher
+ new NamedWriteableRegistry.Entry(MetaData.Custom.class, WatcherMetaData.TYPE, WatcherMetaData::new),
+ new NamedWriteableRegistry.Entry(NamedDiff.class, WatcherMetaData.TYPE, WatcherMetaData::readDiffFrom),
+ new NamedWriteableRegistry.Entry(XPackFeatureSet.Usage.class, XPackField.WATCHER, WatcherFeatureSetUsage::new),
+ // licensing
+ new NamedWriteableRegistry.Entry(MetaData.Custom.class, LicensesMetaData.TYPE, LicensesMetaData::new),
+ new NamedWriteableRegistry.Entry(NamedDiff.class, LicensesMetaData.TYPE, LicensesMetaData::readDiffFrom)
+ );
+ }
+
+ @Override
+ public List getNamedXContent() {
+ return Arrays.asList(
+ // ML - Custom metadata
+ new NamedXContentRegistry.Entry(MetaData.Custom.class, new ParseField("ml"),
+ parser -> MlMetadata.METADATA_PARSER.parse(parser, null).build()),
+ new NamedXContentRegistry.Entry(MetaData.Custom.class, new ParseField(PersistentTasksCustomMetaData.TYPE),
+ PersistentTasksCustomMetaData::fromXContent),
+ // ML - Persistent action requests
+ new NamedXContentRegistry.Entry(PersistentTaskParams.class, new ParseField(StartDatafeedAction.TASK_NAME),
+ StartDatafeedAction.DatafeedParams::fromXContent),
+ new NamedXContentRegistry.Entry(PersistentTaskParams.class, new ParseField(OpenJobAction.TASK_NAME),
+ OpenJobAction.JobParams::fromXContent),
+ // ML - Task statuses
+ new NamedXContentRegistry.Entry(Task.Status.class, new ParseField(DatafeedState.NAME), DatafeedState::fromXContent),
+ new NamedXContentRegistry.Entry(Task.Status.class, new ParseField(JobTaskStatus.NAME), JobTaskStatus::fromXContent),
+ // watcher
+ new NamedXContentRegistry.Entry(MetaData.Custom.class, new ParseField(WatcherMetaData.TYPE),
+ WatcherMetaData::fromXContent),
+ // licensing
+ new NamedXContentRegistry.Entry(MetaData.Custom.class, new ParseField(LicensesMetaData.TYPE),
+ LicensesMetaData::fromXContent)
+ );
+ }
+
+ @Override
+ public Map> getTransports(
+ final Settings settings,
+ final ThreadPool threadPool,
+ final BigArrays bigArrays,
+ final PageCacheRecycler pageCacheRecycler,
+ final CircuitBreakerService circuitBreakerService,
+ final NamedWriteableRegistry namedWriteableRegistry,
+ final NetworkService networkService) {
+ // this should only be used in the transport layer, so do not add it if it is not in transport mode or we are disabled
+ if (XPackPlugin.transportClientMode(settings) == false || XPackSettings.SECURITY_ENABLED.get(settings) == false) {
+ return Collections.emptyMap();
+ }
+ final SSLService sslService;
+ try {
+ sslService = new SSLService(settings, null);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ return Collections.singletonMap(SecurityField.NAME4, () -> new SecurityNetty4Transport(settings, threadPool,
+ networkService, bigArrays, namedWriteableRegistry, circuitBreakerService, sslService));
+ }
+
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/XpackField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/XPackField.java
similarity index 92%
rename from plugin/core/src/main/java/org/elasticsearch/xpack/XpackField.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/XPackField.java
index 850898273fc..520b38380ec 100644
--- a/plugin/core/src/main/java/org/elasticsearch/xpack/XpackField.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/XPackField.java
@@ -5,7 +5,7 @@
*/
package org.elasticsearch.xpack;
-public final class XpackField {
+public final class XPackField {
// These should be moved back to XPackPlugin once its moved to common
public static final String NAME = "x-pack";
/** Name constant for the security feature. */
@@ -27,9 +27,9 @@ public final class XpackField {
// inside of YAML settings we still use xpack do not having handle issues with dashes
public static final String SETTINGS_NAME = "xpack";
- private XpackField() {}
+ private XPackField() {}
public static String featureSettingPrefix(String featureName) {
- return XpackField.SETTINGS_NAME + "." + featureName;
+ return XPackField.SETTINGS_NAME + "." + featureName;
}
}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/XPackPlugin.java b/plugin/core/src/main/java/org/elasticsearch/xpack/XPackPlugin.java
new file mode 100644
index 00000000000..354f4f76d4c
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/XPackPlugin.java
@@ -0,0 +1,238 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack;
+
+import org.apache.lucene.util.SetOnce;
+import org.bouncycastle.operator.OperatorCreationException;
+import org.elasticsearch.SpecialPermission;
+import org.elasticsearch.action.ActionRequest;
+import org.elasticsearch.action.ActionResponse;
+import org.elasticsearch.action.GenericAction;
+import org.elasticsearch.action.support.ActionFilter;
+import org.elasticsearch.client.Client;
+import org.elasticsearch.client.transport.TransportClient;
+import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
+import org.elasticsearch.cluster.node.DiscoveryNodes;
+import org.elasticsearch.cluster.service.ClusterService;
+import org.elasticsearch.common.inject.Binder;
+import org.elasticsearch.common.inject.Module;
+import org.elasticsearch.common.inject.multibindings.Multibinder;
+import org.elasticsearch.common.inject.util.Providers;
+import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
+import org.elasticsearch.common.settings.ClusterSettings;
+import org.elasticsearch.common.settings.IndexScopedSettings;
+import org.elasticsearch.common.settings.Settings;
+import org.elasticsearch.common.settings.SettingsFilter;
+import org.elasticsearch.common.xcontent.NamedXContentRegistry;
+import org.elasticsearch.env.Environment;
+import org.elasticsearch.env.NodeEnvironment;
+import org.elasticsearch.license.LicenseService;
+import org.elasticsearch.license.Licensing;
+import org.elasticsearch.license.XPackLicenseState;
+import org.elasticsearch.plugins.ExtensiblePlugin;
+import org.elasticsearch.plugins.ScriptPlugin;
+import org.elasticsearch.rest.RestController;
+import org.elasticsearch.rest.RestHandler;
+import org.elasticsearch.script.ScriptService;
+import org.elasticsearch.threadpool.ThreadPool;
+import org.elasticsearch.watcher.ResourceWatcherService;
+import org.elasticsearch.xpack.action.TransportXPackInfoAction;
+import org.elasticsearch.xpack.action.TransportXPackUsageAction;
+import org.elasticsearch.xpack.action.XPackInfoAction;
+import org.elasticsearch.xpack.action.XPackUsageAction;
+import org.elasticsearch.xpack.extensions.XPackExtension;
+import org.elasticsearch.xpack.extensions.XPackExtensionsService;
+import org.elasticsearch.xpack.rest.action.RestXPackInfoAction;
+import org.elasticsearch.xpack.rest.action.RestXPackUsageAction;
+import org.elasticsearch.xpack.security.authc.AuthenticationServiceField;
+import org.elasticsearch.xpack.security.authc.support.UsernamePasswordToken;
+import org.elasticsearch.xpack.ssl.SSLConfigurationReloader;
+import org.elasticsearch.xpack.ssl.SSLService;
+
+import javax.security.auth.DestroyFailedException;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.security.AccessController;
+import java.security.GeneralSecurityException;
+import java.security.PrivilegedAction;
+import java.time.Clock;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+
+public class XPackPlugin extends XPackClientPlugin implements ScriptPlugin, ExtensiblePlugin {
+
+ // TODO: clean up this library to not ask for write access to all system properties!
+ static {
+ // invoke this clinit in unbound with permissions to access all system properties
+ SecurityManager sm = System.getSecurityManager();
+ if (sm != null) {
+ sm.checkPermission(new SpecialPermission());
+ }
+ try {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ @Override
+ public Void run() {
+ try {
+ Class.forName("com.unboundid.util.Debug");
+ } catch (ClassNotFoundException e) {
+ throw new RuntimeException(e);
+ }
+ return null;
+ }
+ });
+ // TODO: fix gradle to add all security resources (plugin metadata) to test classpath
+ // of watcher plugin, which depends on it directly. This prevents these plugins
+ // from being initialized correctly by the test framework, and means we have to
+ // have this leniency.
+ } catch (ExceptionInInitializerError bogus) {
+ if (bogus.getCause() instanceof SecurityException == false) {
+ throw bogus; // some other bug
+ }
+ }
+ }
+
+ protected final Settings settings;
+ //private final Environment env;
+ protected boolean transportClientMode;
+ protected final Licensing licensing;
+ // These should not be directly accessed as they cannot be overriden in tests. Please use the getters so they can be overridden.
+ private static final SetOnce licenseState = new SetOnce<>();
+ private static final SetOnce sslService = new SetOnce<>();
+ private static final SetOnce licenseService = new SetOnce<>();
+
+ public XPackPlugin(
+ final Settings settings,
+ final Path configPath) throws IOException, DestroyFailedException, OperatorCreationException, GeneralSecurityException {
+ super(settings);
+ this.settings = settings;
+ this.transportClientMode = transportClientMode(settings);
+ Environment env = transportClientMode ? null : new Environment(settings, configPath);
+
+ setSslService(new SSLService(settings, env));
+ setLicenseState(new XPackLicenseState());
+
+ this.licensing = new Licensing(settings);
+ }
+
+ // For tests only
+ public Collection> getExtensions() {
+ return Collections.emptyList();
+ }
+
+ // overridable by tests
+ protected Clock getClock() {
+ return Clock.systemUTC();
+ }
+
+ protected SSLService getSslService() { return getSharedSslService(); }
+ protected LicenseService getLicenseService() { return getSharedLicenseService(); }
+ protected XPackLicenseState getLicenseState() { return getSharedLicenseState(); }
+ protected void setSslService(SSLService sslService) { XPackPlugin.sslService.set(sslService); }
+ protected void setLicenseService(LicenseService licenseService) { XPackPlugin.licenseService.set(licenseService); }
+ protected void setLicenseState(XPackLicenseState licenseState) { XPackPlugin.licenseState.set(licenseState); }
+ public static SSLService getSharedSslService() { return sslService.get(); }
+ public static LicenseService getSharedLicenseService() { return licenseService.get(); }
+ public static XPackLicenseState getSharedLicenseState() { return licenseState.get(); }
+
+ @Override
+ public Collection createGuiceModules() {
+ ArrayList modules = new ArrayList<>();
+ //modules.add(b -> b.bind(Clock.class).toInstance(getClock()));
+ // used to get core up and running, we do not bind the actual feature set here
+ modules.add(b -> XPackPlugin.createFeatureSetMultiBinder(b, EmptyXPackFeatureSet.class));
+
+ if (transportClientMode) {
+ modules.add(b -> b.bind(XPackLicenseState.class).toProvider(Providers.of(null)));
+ }
+ return modules;
+ }
+
+ @Override
+ public Collection
*
- * The allowable settings for each realm-type are determined by calls to {@link InternalRealms#getSettings()} and
+ * The allowable settings for each realm-type are determined by calls to {@link InternalRealmsSettings#getSettings()} and
* {@link XPackExtension#getRealmSettings()}
*/
public class RealmSettings {
@@ -119,10 +119,10 @@ public class RealmSettings {
/**
* @return A map from realm-type to a collection of Setting
objects.
- * @see InternalRealms#getSettings()
+ * @see InternalRealmsSettings#getSettings()
*/
private static Map>> getSettingsByRealm(List extensions) {
- final Map>> settingsByRealm = new HashMap<>(InternalRealms.getSettings());
+ final Map>> settingsByRealm = new HashMap<>(InternalRealmsSettings.getSettings());
if (extensions != null) {
extensions.forEach(ext -> {
final Map>> extSettings = ext.getRealmSettings();
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authc/TokenMetaData.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/TokenMetaData.java
similarity index 86%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authc/TokenMetaData.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/TokenMetaData.java
index b00a3f58e30..77e79d0ddab 100644
--- a/plugin/src/main/java/org/elasticsearch/xpack/security/authc/TokenMetaData.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/TokenMetaData.java
@@ -24,17 +24,26 @@ public final class TokenMetaData extends AbstractNamedDiffable keys;
- final byte[] currentKeyHash;
+ private final List keys;
- TokenMetaData(List keys, byte[] currentKeyHash) {
+ public List getKeys() {
+ return keys;
+ }
+
+ private final byte[] currentKeyHash;
+
+ public byte[] getCurrentKeyHash() {
+ return currentKeyHash;
+ }
+
+ public TokenMetaData(List keys, byte[] currentKeyHash) {
this.keys = keys;
this.currentKeyHash = currentKeyHash;
}
public TokenMetaData(StreamInput input) throws IOException {
currentKeyHash = input.readByteArray();
- keys = Collections.unmodifiableList(input.readList(TokenService.KeyAndTimestamp::new));
+ keys = Collections.unmodifiableList(input.readList(KeyAndTimestamp::new));
}
@Override
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmSettings.java
new file mode 100644
index 00000000000..7865053983d
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmSettings.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authc.esnative;
+
+import org.elasticsearch.common.settings.Setting;
+import org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealmSettings;
+
+import java.util.Set;
+
+public final class NativeRealmSettings {
+ public static final String TYPE = "native";
+
+ private NativeRealmSettings() {}
+
+ /**
+ * @return The {@link Setting setting configuration} for this realm type
+ */
+ public static Set> getSettings() {
+ return CachingUsernamePasswordRealmSettings.getCachingSettings();
+ }
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/file/FileRealmSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/file/FileRealmSettings.java
new file mode 100644
index 00000000000..9da479c018e
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/file/FileRealmSettings.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authc.file;
+
+import org.elasticsearch.common.settings.Setting;
+import org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealmSettings;
+
+import java.util.Set;
+
+public final class FileRealmSettings {
+ public static final String TYPE = "file";
+
+ private FileRealmSettings() {}
+
+ /**
+ * @return The {@link Setting setting configuration} for this realm type
+ */
+ public static Set> getSettings() {
+ return CachingUsernamePasswordRealmSettings.getCachingSettings();
+ }
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactorySettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactorySettings.java
new file mode 100644
index 00000000000..0c9f1f6ad27
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactorySettings.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authc.ldap;
+
+import org.elasticsearch.common.settings.Setting;
+import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public final class ActiveDirectorySessionFactorySettings {
+ static final String AD_DOMAIN_NAME_SETTING = "domain_name";
+ static final String AD_GROUP_SEARCH_BASEDN_SETTING = "group_search.base_dn";
+ static final String AD_GROUP_SEARCH_SCOPE_SETTING = "group_search.scope";
+ static final String AD_USER_SEARCH_BASEDN_SETTING = "user_search.base_dn";
+ static final String AD_USER_SEARCH_FILTER_SETTING = "user_search.filter";
+ static final String AD_UPN_USER_SEARCH_FILTER_SETTING = "user_search.upn_filter";
+ static final String AD_DOWN_LEVEL_USER_SEARCH_FILTER_SETTING = "user_search.down_level_filter";
+ static final String AD_USER_SEARCH_SCOPE_SETTING = "user_search.scope";
+ static final Setting POOL_ENABLED = Setting.boolSetting("user_search.pool.enabled",
+ settings -> Boolean.toString(PoolingSessionFactorySettings.BIND_DN.exists(settings)), Setting.Property.NodeScope);
+
+ private ActiveDirectorySessionFactorySettings() {}
+
+ public static Set> getSettings() {
+ Set> settings = new HashSet<>();
+ settings.addAll(SessionFactorySettings.getSettings());
+ settings.add(Setting.simpleString(AD_DOMAIN_NAME_SETTING, Setting.Property.NodeScope));
+ settings.add(Setting.simpleString(AD_GROUP_SEARCH_BASEDN_SETTING, Setting.Property.NodeScope));
+ settings.add(Setting.simpleString(AD_GROUP_SEARCH_SCOPE_SETTING, Setting.Property.NodeScope));
+ settings.add(Setting.simpleString(AD_USER_SEARCH_BASEDN_SETTING, Setting.Property.NodeScope));
+ settings.add(Setting.simpleString(AD_USER_SEARCH_FILTER_SETTING, Setting.Property.NodeScope));
+ settings.add(Setting.simpleString(AD_UPN_USER_SEARCH_FILTER_SETTING, Setting.Property.NodeScope));
+ settings.add(Setting.simpleString(AD_DOWN_LEVEL_USER_SEARCH_FILTER_SETTING, Setting.Property.NodeScope));
+ settings.add(Setting.simpleString(AD_USER_SEARCH_SCOPE_SETTING, Setting.Property.NodeScope));
+ settings.add(POOL_ENABLED);
+ settings.addAll(PoolingSessionFactorySettings.getSettings());
+ return settings;
+ }
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealmSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealmSettings.java
new file mode 100644
index 00000000000..cac8144b731
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealmSettings.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authc.ldap;
+
+import org.elasticsearch.common.settings.Setting;
+import org.elasticsearch.common.unit.TimeValue;
+import org.elasticsearch.xpack.security.authc.ldap.support.LdapMetaDataResolverSettings;
+import org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealmSettings;
+import org.elasticsearch.xpack.security.authc.support.mapper.CompositeRoleMapperSettings;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public final class LdapRealmSettings {
+ public static final String LDAP_TYPE = "ldap";
+ public static final String AD_TYPE = "active_directory";
+ static final Setting EXECUTION_TIMEOUT =
+ Setting.timeSetting("timeout.execution", TimeValue.timeValueSeconds(30L), Setting.Property.NodeScope);
+
+ private LdapRealmSettings() {}
+
+ /**
+ * @param type Either {@link #AD_TYPE} or {@link #LDAP_TYPE}
+ * @return The {@link Setting setting configuration} for this realm type
+ */
+ public static Set> getSettings(String type) {
+ Set> settings = new HashSet<>();
+ settings.addAll(CachingUsernamePasswordRealmSettings.getCachingSettings());
+ settings.addAll(CompositeRoleMapperSettings.getSettings());
+ settings.add(LdapRealmSettings.EXECUTION_TIMEOUT);
+ if (AD_TYPE.equals(type)) {
+ settings.addAll(ActiveDirectorySessionFactorySettings.getSettings());
+ } else {
+ assert LDAP_TYPE.equals(type) : "type [" + type + "] is unknown. expected one of [" + AD_TYPE + ", " + LDAP_TYPE + "]";
+ settings.addAll(LdapSessionFactorySettings.getSettings());
+ settings.addAll(LdapUserSearchSessionFactorySettings.getSettings());
+ }
+ settings.addAll(LdapMetaDataResolverSettings.getSettings());
+ return settings;
+ }
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactorySettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactorySettings.java
new file mode 100644
index 00000000000..c5a0a973c46
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactorySettings.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authc.ldap;
+
+import org.elasticsearch.common.settings.Setting;
+import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.function.Function;
+
+public final class LdapSessionFactorySettings {
+
+ public static final Setting> USER_DN_TEMPLATES_SETTING = Setting.listSetting("user_dn_templates",
+ Collections.emptyList(), Function.identity(), Setting.Property.NodeScope);
+
+ public static Set> getSettings() {
+ Set> settings = new HashSet<>();
+ settings.addAll(SessionFactorySettings.getSettings());
+ settings.add(USER_DN_TEMPLATES_SETTING);
+ return settings;
+ }
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactorySettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactorySettings.java
new file mode 100644
index 00000000000..1e93e1f0f33
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactorySettings.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authc.ldap;
+
+import org.elasticsearch.common.settings.Setting;
+import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope;
+import org.elasticsearch.xpack.security.authc.ldap.support.SessionFactorySettings;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.function.Function;
+
+public final class LdapUserSearchSessionFactorySettings {
+ static final Setting SEARCH_ATTRIBUTE = new Setting<>("user_search.attribute",
+ LdapUserSearchSessionFactorySettings.DEFAULT_USERNAME_ATTRIBUTE,
+ Function.identity(), Setting.Property.NodeScope, Setting.Property.Deprecated);
+ static final Setting SEARCH_BASE_DN = Setting.simpleString("user_search.base_dn", Setting.Property.NodeScope);
+ static final Setting SEARCH_FILTER = Setting.simpleString("user_search.filter", Setting.Property.NodeScope);
+ static final Setting SEARCH_SCOPE = new Setting<>("user_search.scope", (String) null,
+ s -> LdapSearchScope.resolve(s, LdapSearchScope.SUB_TREE), Setting.Property.NodeScope);
+ static final Setting POOL_ENABLED = Setting.boolSetting("user_search.pool.enabled", true, Setting.Property.NodeScope);
+ private static final String DEFAULT_USERNAME_ATTRIBUTE = "uid";
+
+ private LdapUserSearchSessionFactorySettings() {}
+
+ public static Set> getSettings() {
+ Set> settings = new HashSet<>();
+ settings.addAll(SessionFactorySettings.getSettings());
+ settings.addAll(PoolingSessionFactorySettings.getSettings());
+ settings.add(SEARCH_BASE_DN);
+ settings.add(SEARCH_SCOPE);
+ settings.add(SEARCH_ATTRIBUTE);
+ settings.add(POOL_ENABLED);
+ settings.add(SEARCH_FILTER);
+
+ settings.addAll(SearchGroupsResolverSettings.getSettings());
+ settings.addAll(UserAttributeGroupsResolverSettings.getSettings());
+
+ return settings;
+ }
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/PoolingSessionFactorySettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/PoolingSessionFactorySettings.java
new file mode 100644
index 00000000000..b1f2704bce5
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/PoolingSessionFactorySettings.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authc.ldap;
+
+import org.elasticsearch.common.settings.Setting;
+import org.elasticsearch.common.unit.TimeValue;
+import org.elasticsearch.common.util.set.Sets;
+
+import java.util.Optional;
+import java.util.Set;
+
+public final class PoolingSessionFactorySettings {
+ static final TimeValue DEFAULT_HEALTH_CHECK_INTERVAL = TimeValue.timeValueSeconds(60L);
+ static final Setting BIND_DN = Setting.simpleString("bind_dn", Setting.Property.NodeScope, Setting.Property.Filtered);
+ static final Setting BIND_PASSWORD = Setting.simpleString("bind_password", Setting.Property.NodeScope,
+ Setting.Property.Filtered);
+ static final int DEFAULT_CONNECTION_POOL_INITIAL_SIZE = 0;
+ static final Setting POOL_INITIAL_SIZE = Setting.intSetting("user_search.pool.initial_size",
+ DEFAULT_CONNECTION_POOL_INITIAL_SIZE, 0, Setting.Property.NodeScope);
+ static final int DEFAULT_CONNECTION_POOL_SIZE = 20;
+ static final Setting POOL_SIZE = Setting.intSetting("user_search.pool.size",
+ DEFAULT_CONNECTION_POOL_SIZE, 1, Setting.Property.NodeScope);
+ static final Setting HEALTH_CHECK_INTERVAL = Setting.timeSetting("user_search.pool.health_check.interval",
+ DEFAULT_HEALTH_CHECK_INTERVAL, Setting.Property.NodeScope);
+ static final Setting HEALTH_CHECK_ENABLED = Setting.boolSetting("user_search.pool.health_check.enabled",
+ true, Setting.Property.NodeScope);
+ static final Setting> HEALTH_CHECK_DN = new Setting<>("user_search.pool.health_check.dn", (String) null,
+ Optional::ofNullable, Setting.Property.NodeScope);
+
+ private PoolingSessionFactorySettings() {}
+
+ public static Set> getSettings() {
+ return Sets.newHashSet(POOL_INITIAL_SIZE, POOL_SIZE, HEALTH_CHECK_ENABLED, HEALTH_CHECK_INTERVAL, HEALTH_CHECK_DN, BIND_DN,
+ BIND_PASSWORD);
+ }
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverSettings.java
new file mode 100644
index 00000000000..2493743ccc1
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverSettings.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authc.ldap;
+
+import org.elasticsearch.common.settings.Setting;
+import org.elasticsearch.xpack.security.authc.ldap.support.LdapSearchScope;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.function.Function;
+
+public final class SearchGroupsResolverSettings {
+ static final Setting BASE_DN = Setting.simpleString("group_search.base_dn",
+ Setting.Property.NodeScope);
+ static final Setting SCOPE = new Setting<>("group_search.scope", (String) null,
+ s -> LdapSearchScope.resolve(s, LdapSearchScope.SUB_TREE), Setting.Property.NodeScope);
+ static final Setting USER_ATTRIBUTE = Setting.simpleString(
+ "group_search.user_attribute", Setting.Property.NodeScope);
+ private static final String GROUP_SEARCH_DEFAULT_FILTER = "(&" +
+ "(|(objectclass=groupOfNames)(objectclass=groupOfUniqueNames)" +
+ "(objectclass=group)(objectclass=posixGroup))" +
+ "(|(uniqueMember={0})(member={0})(memberUid={0})))";
+ static final Setting FILTER = new Setting<>("group_search.filter",
+ GROUP_SEARCH_DEFAULT_FILTER, Function.identity(), Setting.Property.NodeScope);
+
+ private SearchGroupsResolverSettings() {}
+
+ public static Set> getSettings() {
+ Set> settings = new HashSet<>();
+ settings.add(BASE_DN);
+ settings.add(FILTER);
+ settings.add(USER_ATTRIBUTE);
+ settings.add(SCOPE);
+ return settings;
+ }
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolverSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolverSettings.java
new file mode 100644
index 00000000000..0f08e7bd91d
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolverSettings.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authc.ldap;
+
+import org.elasticsearch.common.settings.Setting;
+
+import java.util.Collections;
+import java.util.Set;
+import java.util.function.Function;
+
+public final class UserAttributeGroupsResolverSettings {
+ static final Setting ATTRIBUTE = new Setting<>("user_group_attribute", "memberOf",
+ Function.identity(), Setting.Property.NodeScope);
+
+ private UserAttributeGroupsResolverSettings() {}
+
+ public static Set> getSettings() {
+ return Collections.singleton(ATTRIBUTE);
+ }
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancingSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancingSettings.java
new file mode 100644
index 00000000000..dcb9057597f
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancingSettings.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authc.ldap.support;
+
+import org.elasticsearch.common.settings.Setting;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public final class LdapLoadBalancingSettings {
+ public static final String LOAD_BALANCE_SETTINGS = "load_balance";
+ public static final String LOAD_BALANCE_TYPE_SETTING = "type";
+ public static final String CACHE_TTL_SETTING = "cache_ttl";
+
+ private LdapLoadBalancingSettings() {}
+
+ public static Set> getSettings() {
+ Set> settings = new HashSet<>();
+ settings.add(Setting.simpleString(LOAD_BALANCE_SETTINGS + "." + LOAD_BALANCE_TYPE_SETTING, Setting.Property.NodeScope));
+ settings.add(Setting.simpleString(LOAD_BALANCE_SETTINGS + "." + CACHE_TTL_SETTING, Setting.Property.NodeScope));
+ return settings;
+ }
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapMetaDataResolverSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapMetaDataResolverSettings.java
new file mode 100644
index 00000000000..f8c7965cf49
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapMetaDataResolverSettings.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authc.ldap.support;
+
+import org.elasticsearch.common.settings.Setting;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.function.Function;
+
+public final class LdapMetaDataResolverSettings {
+ public static final Setting> ADDITIONAL_META_DATA_SETTING = Setting.listSetting(
+ "metadata", Collections.emptyList(), Function.identity(), Setting.Property.NodeScope);
+
+ private LdapMetaDataResolverSettings() {}
+
+ public static List> getSettings() {
+ return Collections.singletonList(ADDITIONAL_META_DATA_SETTING);
+ }
+}
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSearchScope.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSearchScope.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSearchScope.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSearchScope.java
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactorySettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactorySettings.java
new file mode 100644
index 00000000000..0ff0526a995
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactorySettings.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authc.ldap.support;
+
+import org.elasticsearch.common.settings.Setting;
+import org.elasticsearch.common.unit.TimeValue;
+import org.elasticsearch.xpack.ssl.SSLConfigurationSettings;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.function.Function;
+
+public final class SessionFactorySettings {
+ public static final String URLS_SETTING = "url";
+ public static final String TIMEOUT_TCP_CONNECTION_SETTING = "timeout.tcp_connect";
+ public static final String TIMEOUT_TCP_READ_SETTING = "timeout.tcp_read";
+ public static final String TIMEOUT_LDAP_SETTING = "timeout.ldap_search";
+ public static final String HOSTNAME_VERIFICATION_SETTING = "hostname_verification";
+ public static final String FOLLOW_REFERRALS_SETTING = "follow_referrals";
+ public static final Setting IGNORE_REFERRAL_ERRORS_SETTING = Setting.boolSetting(
+ "ignore_referral_errors", true, Setting.Property.NodeScope);
+ public static final TimeValue TIMEOUT_DEFAULT = TimeValue.timeValueSeconds(5);
+
+ private SessionFactorySettings() {}
+
+ public static Set> getSettings() {
+ Set> settings = new HashSet<>();
+ settings.addAll(LdapLoadBalancingSettings.getSettings());
+ settings.add(Setting.listSetting(URLS_SETTING, Collections.emptyList(), Function.identity(),
+ Setting.Property.NodeScope));
+ settings.add(Setting.timeSetting(TIMEOUT_TCP_CONNECTION_SETTING, TIMEOUT_DEFAULT, Setting.Property.NodeScope));
+ settings.add(Setting.timeSetting(TIMEOUT_TCP_READ_SETTING, TIMEOUT_DEFAULT, Setting.Property.NodeScope));
+ settings.add(Setting.timeSetting(TIMEOUT_LDAP_SETTING, TIMEOUT_DEFAULT, Setting.Property.NodeScope));
+ settings.add(Setting.boolSetting(HOSTNAME_VERIFICATION_SETTING, true, Setting.Property.NodeScope, Setting.Property.Filtered));
+ settings.add(Setting.boolSetting(FOLLOW_REFERRALS_SETTING, true, Setting.Property.NodeScope));
+ settings.add(IGNORE_REFERRAL_ERRORS_SETTING);
+ settings.addAll(SSLConfigurationSettings.withPrefix("ssl.").getAllSettings());
+ return settings;
+ }
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmSettings.java
new file mode 100644
index 00000000000..bf90dd986c7
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmSettings.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authc.pki;
+
+import org.elasticsearch.common.settings.Setting;
+import org.elasticsearch.xpack.security.authc.support.mapper.CompositeRoleMapperSettings;
+import org.elasticsearch.xpack.ssl.SSLConfigurationSettings;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+public final class PkiRealmSettings {
+ public static final String TYPE = "pki";
+ static final String DEFAULT_USERNAME_PATTERN = "CN=(.*?)(?:,|$)";
+ static final Setting USERNAME_PATTERN_SETTING = new Setting<>("username_pattern", DEFAULT_USERNAME_PATTERN,
+ s -> Pattern.compile(s, Pattern.CASE_INSENSITIVE), Setting.Property.NodeScope);
+ static final SSLConfigurationSettings SSL_SETTINGS = SSLConfigurationSettings.withoutPrefix();
+
+ private PkiRealmSettings() {}
+
+ /**
+ * @return The {@link Setting setting configuration} for this realm type
+ */
+ public static Set> getSettings() {
+ Set> settings = new HashSet<>();
+ settings.add(USERNAME_PATTERN_SETTING);
+
+ settings.add(SSL_SETTINGS.truststorePath);
+ settings.add(SSL_SETTINGS.truststorePassword);
+ settings.add(SSL_SETTINGS.legacyTruststorePassword);
+ settings.add(SSL_SETTINGS.truststoreAlgorithm);
+ settings.add(SSL_SETTINGS.caPaths);
+
+ settings.addAll(CompositeRoleMapperSettings.getSettings());
+
+ return settings;
+ }
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealmSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealmSettings.java
new file mode 100644
index 00000000000..897d9245dd5
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealmSettings.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authc.support;
+
+import org.elasticsearch.common.settings.Setting;
+import org.elasticsearch.common.unit.TimeValue;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+public final class CachingUsernamePasswordRealmSettings {
+ public static final Setting CACHE_HASH_ALGO_SETTING = Setting.simpleString("cache.hash_algo", Setting.Property.NodeScope);
+ private static final TimeValue DEFAULT_TTL = TimeValue.timeValueMinutes(20);
+ public static final Setting CACHE_TTL_SETTING = Setting.timeSetting("cache.ttl", DEFAULT_TTL, Setting.Property.NodeScope);
+ private static final int DEFAULT_MAX_USERS = 100_000; //100k users
+ public static final Setting CACHE_MAX_USERS_SETTING = Setting.intSetting("cache.max_users", DEFAULT_MAX_USERS,
+ Setting.Property.NodeScope);
+
+ private CachingUsernamePasswordRealmSettings() {}
+
+ /**
+ * Returns the {@link Setting setting configuration} that is common for all caching realms
+ */
+ public static Set> getCachingSettings() {
+ return new HashSet<>(Arrays.asList(CACHE_HASH_ALGO_SETTING, CACHE_TTL_SETTING, CACHE_MAX_USERS_SETTING));
+ }
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapperSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapperSettings.java
new file mode 100644
index 00000000000..66cd84df170
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapperSettings.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authc.support;
+
+import org.elasticsearch.common.settings.Setting;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.function.Function;
+
+public final class DnRoleMapperSettings {
+
+ private static final String DEFAULT_FILE_NAME = "role_mapping.yml";
+ public static final Setting ROLE_MAPPING_FILE_SETTING = new Setting<>("files.role_mapping", DEFAULT_FILE_NAME,
+ Function.identity(), Setting.Property.NodeScope);
+ public static final Setting USE_UNMAPPED_GROUPS_AS_ROLES_SETTING =
+ Setting.boolSetting("unmapped_groups_as_roles", false, Setting.Property.NodeScope);
+
+ public static List> getSettings() {
+ return Arrays.asList(USE_UNMAPPED_GROUPS_AS_ROLES_SETTING, ROLE_MAPPING_FILE_SETTING);
+ }
+}
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordToken.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordToken.java
similarity index 98%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordToken.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordToken.java
index fddfec9758f..39c745ee420 100644
--- a/plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordToken.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordToken.java
@@ -18,9 +18,8 @@ import static org.elasticsearch.xpack.security.support.Exceptions.authentication
public class UsernamePasswordToken implements AuthenticationToken {
+ public static final String BASIC_AUTH_PREFIX = "Basic ";
public static final String BASIC_AUTH_HEADER = "Authorization";
- private static final String BASIC_AUTH_PREFIX = "Basic ";
-
private final String username;
private final SecureString password;
@@ -29,6 +28,24 @@ public class UsernamePasswordToken implements AuthenticationToken {
this.password = password;
}
+ public static String basicAuthHeaderValue(String username, SecureString passwd) {
+ CharBuffer chars = CharBuffer.allocate(username.length() + passwd.length() + 1);
+ byte[] charBytes = null;
+ try {
+ chars.put(username).put(':').put(passwd.getChars());
+ charBytes = CharArrays.toUtf8Bytes(chars.array());
+
+ //TODO we still have passwords in Strings in headers. Maybe we can look into using a CharSequence?
+ String basicToken = Base64.getEncoder().encodeToString(charBytes);
+ return "Basic " + basicToken;
+ } finally {
+ Arrays.fill(chars.array(), (char) 0);
+ if (charBytes != null) {
+ Arrays.fill(charBytes, (byte) 0);
+ }
+ }
+ }
+
@Override
public String principal() {
return username;
@@ -101,21 +118,4 @@ public class UsernamePasswordToken implements AuthenticationToken {
context.putHeader(BASIC_AUTH_HEADER, basicAuthHeaderValue(token.username, token.password));
}
- public static String basicAuthHeaderValue(String username, SecureString passwd) {
- CharBuffer chars = CharBuffer.allocate(username.length() + passwd.length() + 1);
- byte[] charBytes = null;
- try {
- chars.put(username).put(':').put(passwd.getChars());
- charBytes = CharArrays.toUtf8Bytes(chars.array());
-
- //TODO we still have passwords in Strings in headers. Maybe we can look into using a CharSequence?
- String basicToken = Base64.getEncoder().encodeToString(charBytes);
- return "Basic " + basicToken;
- } finally {
- Arrays.fill(chars.array(), (char) 0);
- if (charBytes != null) {
- Arrays.fill(charBytes, (byte) 0);
- }
- }
- }
}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/CompositeRoleMapperSettings.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/CompositeRoleMapperSettings.java
new file mode 100644
index 00000000000..25b3e03630a
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/CompositeRoleMapperSettings.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authc.support.mapper;
+
+import org.elasticsearch.common.settings.Setting;
+import org.elasticsearch.xpack.security.authc.support.DnRoleMapperSettings;
+
+import java.util.Collection;
+
+public final class CompositeRoleMapperSettings {
+ private CompositeRoleMapperSettings() {}
+
+ public static Collection extends Setting>> getSettings() {
+ return DnRoleMapperSettings.getSettings();
+ }
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/ExpressionRoleMapping.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/ExpressionRoleMapping.java
index 2ee3e2963f1..bc8b0a4544b 100644
--- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/ExpressionRoleMapping.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/ExpressionRoleMapping.java
@@ -166,7 +166,7 @@ public class ExpressionRoleMapping implements ToXContentObject, Writeable {
return toXContent(builder, params, false);
}
- XContentBuilder toXContent(XContentBuilder builder, Params params, boolean includeDocType) throws IOException {
+ public XContentBuilder toXContent(XContentBuilder builder, Params params, boolean includeDocType) throws IOException {
builder.startObject();
builder.field(Fields.ENABLED.getPreferredName(), enabled);
builder.startArray(Fields.ROLES.getPreferredName());
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/AllExpression.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/AllExpression.java
index eef037288db..66d925fdc54 100644
--- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/AllExpression.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/AllExpression.java
@@ -21,7 +21,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder;
*/
public final class AllExpression implements RoleMapperExpression {
- static final String NAME = "all";
+ public static final String NAME = "all";
private final List elements;
@@ -30,7 +30,7 @@ public final class AllExpression implements RoleMapperExpression {
this.elements = elements;
}
- AllExpression(StreamInput in) throws IOException {
+ public AllExpression(StreamInput in) throws IOException {
this(ExpressionParser.readExpressionList(in));
}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/AnyExpression.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/AnyExpression.java
index 2c35c090d1e..f64a9813474 100644
--- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/AnyExpression.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/AnyExpression.java
@@ -21,7 +21,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder;
*/
public final class AnyExpression implements RoleMapperExpression {
- static final String NAME = "any";
+ public static final String NAME = "any";
private final List elements;
@@ -30,7 +30,7 @@ public final class AnyExpression implements RoleMapperExpression {
this.elements = elements;
}
- AnyExpression(StreamInput in) throws IOException {
+ public AnyExpression(StreamInput in) throws IOException {
this(ExpressionParser.readExpressionList(in));
}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExceptExpression.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExceptExpression.java
index 7118a8a17c0..4c697816641 100644
--- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExceptExpression.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExceptExpression.java
@@ -20,7 +20,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder;
*/
public final class ExceptExpression implements RoleMapperExpression {
- static final String NAME = "except";
+ public static final String NAME = "except";
private final RoleMapperExpression expression;
@@ -29,7 +29,7 @@ public final class ExceptExpression implements RoleMapperExpression {
this.expression = expression;
}
- ExceptExpression(StreamInput in) throws IOException {
+ public ExceptExpression(StreamInput in) throws IOException {
this(ExpressionParser.readExpression(in));
}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExpressionParser.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExpressionParser.java
index 174846e7603..2395cf585da 100644
--- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExpressionParser.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/ExpressionParser.java
@@ -25,13 +25,6 @@ import org.elasticsearch.xpack.watcher.support.xcontent.XContentSource;
*/
public final class ExpressionParser {
- public static final NamedWriteableRegistry.Entry[] NAMED_WRITEABLES = {
- new NamedWriteableRegistry.Entry(RoleMapperExpression.class, AllExpression.NAME, AllExpression::new),
- new NamedWriteableRegistry.Entry(RoleMapperExpression.class, AnyExpression.NAME, AnyExpression::new),
- new NamedWriteableRegistry.Entry(RoleMapperExpression.class, FieldExpression.NAME, FieldExpression::new),
- new NamedWriteableRegistry.Entry(RoleMapperExpression.class, ExceptExpression.NAME, ExceptExpression::new)
- };
-
public static RoleMapperExpression readExpression(StreamInput in) throws IOException {
return in.readNamedWriteable(RoleMapperExpression.class);
}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/FieldExpression.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/FieldExpression.java
index 33873e11beb..ae72a6b2b99 100644
--- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/FieldExpression.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authc/support/mapper/expressiondsl/FieldExpression.java
@@ -28,7 +28,7 @@ import java.util.function.Predicate;
*/
public final class FieldExpression implements RoleMapperExpression {
- static final String NAME = "field";
+ public static final String NAME = "field";
private final String field;
private final List values;
@@ -44,7 +44,7 @@ public final class FieldExpression implements RoleMapperExpression {
this.values = values;
}
- FieldExpression(StreamInput in) throws IOException {
+ public FieldExpression(StreamInput in) throws IOException {
this(in.readString(), in.readList(FieldPredicate::readFrom));
}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceField.java
new file mode 100644
index 00000000000..c091c3ea79d
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceField.java
@@ -0,0 +1,12 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authz;
+
+public final class AuthorizationServiceField {
+ public static final String INDICES_PERMISSIONS_KEY = "_indices_permissions";
+
+ private AuthorizationServiceField() {}
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolverField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolverField.java
new file mode 100644
index 00000000000..da2a55b2d03
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolverField.java
@@ -0,0 +1,14 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authz;
+
+public final class IndicesAndAliasesResolverField {
+ //placeholder used in the security plugin to indicate that the request is authorized knowing that it will yield an empty response
+ public static final String NO_INDEX_PLACEHOLDER = "-*";
+
+ private IndicesAndAliasesResolverField() {}
+
+}
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReader.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReader.java
similarity index 98%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReader.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReader.java
index 5318164a03e..2a122e69e24 100644
--- a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReader.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReader.java
@@ -31,7 +31,7 @@ public final class DocumentSubsetReader extends FilterLeafReader {
return new DocumentSubsetDirectoryReader(in, bitsetFilterCache, roleQuery);
}
- static final class DocumentSubsetDirectoryReader extends FilterDirectoryReader {
+ public static final class DocumentSubsetDirectoryReader extends FilterDirectoryReader {
private final Query roleQuery;
private final BitsetFilterCache bitsetFilterCache;
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractor.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractor.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractor.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractor.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReader.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReader.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReader.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReader.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControl.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControl.java
similarity index 97%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControl.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControl.java
index aa7a4884f80..1b5e6833ea1 100644
--- a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControl.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControl.java
@@ -7,7 +7,7 @@ package org.elasticsearch.xpack.security.authz.accesscontrol;
import org.elasticsearch.common.Nullable;
import org.elasticsearch.common.bytes.BytesReference;
-import org.elasticsearch.xpack.security.authz.IndicesAndAliasesResolver;
+import org.elasticsearch.xpack.security.authz.IndicesAndAliasesResolverField;
import org.elasticsearch.xpack.security.authz.permission.FieldPermissions;
import java.util.Collections;
@@ -21,7 +21,7 @@ public class IndicesAccessControl {
public static final IndicesAccessControl ALLOW_ALL = new IndicesAccessControl(true, Collections.emptyMap());
public static final IndicesAccessControl ALLOW_NO_INDICES = new IndicesAccessControl(true,
- Collections.singletonMap(IndicesAndAliasesResolver.NO_INDEX_PLACEHOLDER,
+ Collections.singletonMap(IndicesAndAliasesResolverField.NO_INDEX_PLACEHOLDER,
new IndicesAccessControl.IndexAccessControl(true, new FieldPermissions(), null)));
private final boolean granted;
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java
similarity index 98%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java
index 695a8c93222..73083cdc9c0 100644
--- a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java
@@ -13,7 +13,7 @@ import org.elasticsearch.index.AbstractIndexComponent;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.cache.query.QueryCache;
import org.elasticsearch.indices.IndicesQueryCache;
-import org.elasticsearch.xpack.security.authz.AuthorizationService;
+import org.elasticsearch.xpack.security.authz.AuthorizationServiceField;
import java.util.HashSet;
import java.util.Objects;
@@ -50,7 +50,7 @@ public final class OptOutQueryCache extends AbstractIndexComponent implements Qu
@Override
public Weight doCache(Weight weight, QueryCachingPolicy policy) {
IndicesAccessControl indicesAccessControl = context.getTransient(
- AuthorizationService.INDICES_PERMISSIONS_KEY);
+ AuthorizationServiceField.INDICES_PERMISSIONS_KEY);
if (indicesAccessControl == null) {
logger.debug("opting out of the query cache. current request doesn't hold indices permissions");
return weight;
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessor.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessor.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessor.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessor.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/ClusterPermission.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/ClusterPermission.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/ClusterPermission.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/ClusterPermission.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissions.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissions.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissions.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissions.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCache.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCache.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCache.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCache.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsDefinition.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsDefinition.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsDefinition.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsDefinition.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/IndicesPermission.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/IndicesPermission.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/IndicesPermission.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/IndicesPermission.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/Role.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/Role.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/Role.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/Role.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/RunAsPermission.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/RunAsPermission.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/RunAsPermission.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/permission/RunAsPermission.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/ClusterPrivilege.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/ClusterPrivilege.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/ClusterPrivilege.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/ClusterPrivilege.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/HealthAndStatsPrivilege.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/HealthAndStatsPrivilege.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/HealthAndStatsPrivilege.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/HealthAndStatsPrivilege.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/IndexPrivilege.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/IndexPrivilege.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/IndexPrivilege.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/IndexPrivilege.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/Privilege.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/Privilege.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/Privilege.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/Privilege.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/SystemPrivilege.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/SystemPrivilege.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/SystemPrivilege.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/privilege/SystemPrivilege.java
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/ClientReservedRoles.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/ClientReservedRoles.java
deleted file mode 100644
index b31777d2e6a..00000000000
--- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/ClientReservedRoles.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License;
- * you may not use this file except in compliance with the Elastic License.
- */
-package org.elasticsearch.xpack.security.authz.store;
-
-import org.elasticsearch.xpack.security.SecurityExtension;
-import org.elasticsearch.xpack.security.authz.RoleDescriptor;
-import org.elasticsearch.xpack.security.support.MetadataUtils;
-import org.elasticsearch.xpack.security.user.UsernamesField;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.ServiceLoader;
-
-public class ClientReservedRoles {
-
- public static final RoleDescriptor SUPERUSER_ROLE_DESCRIPTOR = new RoleDescriptor("superuser",
- new String[] { "all" },
- new RoleDescriptor.IndicesPrivileges[] {
- RoleDescriptor.IndicesPrivileges.builder().indices("*").privileges("all").build()},
- new String[] { "*" },
- MetadataUtils.DEFAULT_RESERVED_METADATA);
- static final Map RESERVED_ROLES = initializeReservedRoles();
-
- static Map initializeReservedRoles() {
- Map roles = new HashMap<>();
-
- roles.put("superuser", SUPERUSER_ROLE_DESCRIPTOR);
-
- // Services are loaded through SPI, and are defined in their META-INF/services
- for(SecurityExtension ext : ServiceLoader.load(SecurityExtension.class, SecurityExtension.class.getClassLoader())) {
- roles.putAll(ext.getReservedRoles());
- }
-
- return Collections.unmodifiableMap(roles);
- }
-
- public static boolean isReserved(String role) {
- return RESERVED_ROLES.containsKey(role) || UsernamesField.SYSTEM_ROLE.equals(role) || UsernamesField.XPACK_ROLE.equals(role);
- }
-}
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java
similarity index 98%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java
index 9dd9b97b1fb..41145af6f1a 100644
--- a/plugin/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java
@@ -73,7 +73,7 @@ public class FileRolesStore extends AbstractComponent {
permissions = parseFile(file, logger, settings, licenseState);
}
- Set roleDescriptors(Set roleNames) {
+ public Set roleDescriptors(Set roleNames) {
Set descriptors = new HashSet<>();
roleNames.forEach((name) -> {
RoleDescriptor descriptor = permissions.get(name);
@@ -105,7 +105,7 @@ public class FileRolesStore extends AbstractComponent {
return usageStats;
}
- void addListener(Runnable runnable) {
+ public void addListener(Runnable runnable) {
Objects.requireNonNull(runnable);
synchronized (this) {
listeners.add(runnable);
@@ -143,7 +143,7 @@ public class FileRolesStore extends AbstractComponent {
for (String segment : roleSegments) {
RoleDescriptor descriptor = parseRoleDescriptor(segment, path, logger, resolvePermission, settings);
if (descriptor != null) {
- if (ClientReservedRoles.isReserved(descriptor.getName())) {
+ if (ReservedRolesStore.isReserved(descriptor.getName())) {
logger.warn("role [{}] is reserved. the relevant role definition in the mapping file will be ignored",
descriptor.getName());
} else if (flsDlsLicensed == false && descriptor.isUsingDocumentOrFieldLevelSecurity()) {
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStore.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStore.java
new file mode 100644
index 00000000000..7e324db7f68
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStore.java
@@ -0,0 +1,133 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.security.authz.store;
+
+import org.elasticsearch.common.collect.MapBuilder;
+import org.elasticsearch.xpack.monitoring.action.MonitoringBulkAction;
+import org.elasticsearch.xpack.security.authz.RoleDescriptor;
+import org.elasticsearch.xpack.security.authz.permission.Role;
+import org.elasticsearch.xpack.security.support.MetadataUtils;
+import org.elasticsearch.xpack.security.user.KibanaUser;
+import org.elasticsearch.xpack.security.user.UsernamesField;
+import org.elasticsearch.xpack.watcher.execution.TriggeredWatchStoreField;
+import org.elasticsearch.xpack.watcher.history.HistoryStoreField;
+import org.elasticsearch.xpack.watcher.watch.Watch;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+
+public class ReservedRolesStore {
+
+ public static final RoleDescriptor SUPERUSER_ROLE_DESCRIPTOR = new RoleDescriptor("superuser",
+ new String[] { "all" },
+ new RoleDescriptor.IndicesPrivileges[] {
+ RoleDescriptor.IndicesPrivileges.builder().indices("*").privileges("all").build()},
+ new String[] { "*" },
+ MetadataUtils.DEFAULT_RESERVED_METADATA);
+ public static final Role SUPERUSER_ROLE = Role.builder(SUPERUSER_ROLE_DESCRIPTOR, null).build();
+ private static final Map RESERVED_ROLES = initializeReservedRoles();
+
+ private static Map initializeReservedRoles() {
+ return MapBuilder.newMapBuilder()
+ .put("superuser", new RoleDescriptor("superuser", new String[] { "all" },
+ new RoleDescriptor.IndicesPrivileges[] {
+ RoleDescriptor.IndicesPrivileges.builder().indices("*").privileges("all").build()},
+ new String[] { "*" },
+ MetadataUtils.DEFAULT_RESERVED_METADATA))
+ .put("transport_client", new RoleDescriptor("transport_client", new String[] { "transport_client" }, null, null,
+ MetadataUtils.DEFAULT_RESERVED_METADATA))
+ .put("kibana_user", new RoleDescriptor("kibana_user", null, new RoleDescriptor.IndicesPrivileges[] {
+ RoleDescriptor.IndicesPrivileges.builder().indices(".kibana*").privileges("manage", "read", "index", "delete")
+ .build() }, null, MetadataUtils.DEFAULT_RESERVED_METADATA))
+ .put("monitoring_user", new RoleDescriptor("monitoring_user", null, new RoleDescriptor.IndicesPrivileges[] {
+ RoleDescriptor.IndicesPrivileges.builder()
+ .indices(".monitoring-*").privileges("read", "read_cross_cluster").build()
+ },
+ null, MetadataUtils.DEFAULT_RESERVED_METADATA))
+ .put("remote_monitoring_agent", new RoleDescriptor("remote_monitoring_agent",
+ new String[] {
+ "manage_index_templates", "manage_ingest_pipelines", "monitor",
+ "cluster:monitor/xpack/watcher/watch/get",
+ "cluster:admin/xpack/watcher/watch/put",
+ "cluster:admin/xpack/watcher/watch/delete",
+ },
+ new RoleDescriptor.IndicesPrivileges[] {
+ RoleDescriptor.IndicesPrivileges.builder().indices(".monitoring-*").privileges("all").build() },
+ null, MetadataUtils.DEFAULT_RESERVED_METADATA))
+ .put("ingest_admin", new RoleDescriptor("ingest_admin", new String[] { "manage_index_templates", "manage_pipeline" },
+ null, null, MetadataUtils.DEFAULT_RESERVED_METADATA))
+ // reporting_user doesn't have any privileges in Elasticsearch, and Kibana authorizes privileges based on this role
+ .put("reporting_user", new RoleDescriptor("reporting_user", null, null,
+ null, MetadataUtils.DEFAULT_RESERVED_METADATA))
+ .put("kibana_dashboard_only_user", new RoleDescriptor(
+ "kibana_dashboard_only_user",
+ null,
+ new RoleDescriptor.IndicesPrivileges[] {
+ RoleDescriptor.IndicesPrivileges.builder()
+ .indices(".kibana*").privileges("read", "view_index_metadata").build()
+ },
+ null,
+ MetadataUtils.DEFAULT_RESERVED_METADATA))
+ .put(KibanaUser.ROLE_NAME, new RoleDescriptor(KibanaUser.ROLE_NAME,
+ new String[] { "monitor", "manage_index_templates", MonitoringBulkAction.NAME },
+ new RoleDescriptor.IndicesPrivileges[] {
+ RoleDescriptor.IndicesPrivileges.builder().indices(".kibana*", ".reporting-*").privileges("all").build(),
+ RoleDescriptor.IndicesPrivileges.builder()
+ .indices(".monitoring-*").privileges("read", "read_cross_cluster").build()
+ },
+ null, MetadataUtils.DEFAULT_RESERVED_METADATA))
+ .put("logstash_system", new RoleDescriptor("logstash_system", new String[] { "monitor", MonitoringBulkAction.NAME},
+ null, null, MetadataUtils.DEFAULT_RESERVED_METADATA))
+ .put("machine_learning_user", new RoleDescriptor("machine_learning_user", new String[] { "monitor_ml" },
+ new RoleDescriptor.IndicesPrivileges[] { RoleDescriptor.IndicesPrivileges.builder().indices(".ml-anomalies*",
+ ".ml-notifications").privileges("view_index_metadata", "read").build() },
+ null, MetadataUtils.DEFAULT_RESERVED_METADATA))
+ .put("machine_learning_admin", new RoleDescriptor("machine_learning_admin", new String[] { "manage_ml" },
+ new RoleDescriptor.IndicesPrivileges[] {
+ RoleDescriptor.IndicesPrivileges.builder().indices(".ml-*").privileges("view_index_metadata", "read")
+ .build() }, null, MetadataUtils.DEFAULT_RESERVED_METADATA))
+ .put("watcher_admin", new RoleDescriptor("watcher_admin", new String[] { "manage_watcher" },
+ new RoleDescriptor.IndicesPrivileges[] {
+ RoleDescriptor.IndicesPrivileges.builder().indices(Watch.INDEX, TriggeredWatchStoreField.INDEX_NAME,
+ HistoryStoreField.INDEX_PREFIX + "*").privileges("read").build() },
+ null, MetadataUtils.DEFAULT_RESERVED_METADATA))
+ .put("watcher_user", new RoleDescriptor("watcher_user", new String[] { "monitor_watcher" },
+ new RoleDescriptor.IndicesPrivileges[] {
+ RoleDescriptor.IndicesPrivileges.builder().indices(Watch.INDEX)
+ .privileges("read")
+ .build(),
+ RoleDescriptor.IndicesPrivileges.builder().indices(HistoryStoreField.INDEX_PREFIX + "*")
+ .privileges("read")
+ .build() }, null, MetadataUtils.DEFAULT_RESERVED_METADATA))
+ .put("logstash_admin", new RoleDescriptor("logstash_admin", null, new RoleDescriptor.IndicesPrivileges[] {
+ RoleDescriptor.IndicesPrivileges.builder().indices(".logstash*")
+ .privileges("create", "delete", "index", "manage", "read").build() },
+ null, MetadataUtils.DEFAULT_RESERVED_METADATA))
+ .immutableMap();
+ }
+
+ public static boolean isReserved(String role) {
+ return RESERVED_ROLES.containsKey(role) || UsernamesField.SYSTEM_ROLE.equals(role) || UsernamesField.XPACK_ROLE.equals(role);
+ }
+
+ public Map usageStats() {
+ return Collections.emptyMap();
+ }
+
+ public RoleDescriptor roleDescriptor(String role) {
+ return RESERVED_ROLES.get(role);
+ }
+
+ public Collection roleDescriptors() {
+ return RESERVED_ROLES.values();
+ }
+
+ public static Set names() {
+ return RESERVED_ROLES.keySet();
+ }
+}
\ No newline at end of file
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/client/SecurityClient.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/client/SecurityClient.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/client/SecurityClient.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/client/SecurityClient.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/rest/RestRequestFilter.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/rest/RestRequestFilter.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/rest/RestRequestFilter.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/rest/RestRequestFilter.java
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Exceptions.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Exceptions.java
index 5995cda0386..8499e3bae21 100644
--- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Exceptions.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Exceptions.java
@@ -7,7 +7,7 @@ package org.elasticsearch.xpack.security.support;
import org.elasticsearch.ElasticsearchSecurityException;
import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.xpack.XpackField;
+import org.elasticsearch.xpack.XPackField;
public class Exceptions {
@@ -16,13 +16,13 @@ public class Exceptions {
public static ElasticsearchSecurityException authenticationError(String msg, Throwable cause, Object... args) {
ElasticsearchSecurityException e = new ElasticsearchSecurityException(msg, RestStatus.UNAUTHORIZED, cause, args);
- e.addHeader("WWW-Authenticate", "Basic realm=\"" + XpackField.SECURITY + "\" charset=\"UTF-8\"");
+ e.addHeader("WWW-Authenticate", "Basic realm=\"" + XPackField.SECURITY + "\" charset=\"UTF-8\"");
return e;
}
public static ElasticsearchSecurityException authenticationError(String msg, Object... args) {
ElasticsearchSecurityException e = new ElasticsearchSecurityException(msg, RestStatus.UNAUTHORIZED, args);
- e.addHeader("WWW-Authenticate", "Basic realm=\"" + XpackField.SECURITY + "\" charset=\"UTF-8\"");
+ e.addHeader("WWW-Authenticate", "Basic realm=\"" + XPackField.SECURITY + "\" charset=\"UTF-8\"");
return e;
}
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/support/NoOpLogger.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/NoOpLogger.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/support/NoOpLogger.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/support/NoOpLogger.java
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Validation.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Validation.java
index e5ce013aed8..7566ff0d6b8 100644
--- a/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Validation.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/support/Validation.java
@@ -8,7 +8,7 @@ package org.elasticsearch.xpack.security.support;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.set.Sets;
import org.elasticsearch.xpack.security.authc.esnative.ClientReservedRealm;
-import org.elasticsearch.xpack.security.authz.store.ClientReservedRoles;
+import org.elasticsearch.xpack.security.authz.store.ReservedRolesStore;
import java.util.Locale;
import java.util.Set;
@@ -99,7 +99,7 @@ public final class Validation {
if (!isValidUserOrRoleName(roleName)) {
return new Error(String.format(Locale.ROOT, INVALID_NAME_MESSAGE, "Role"));
}
- if (allowReserved == false && ClientReservedRoles.isReserved(roleName)) {
+ if (allowReserved == false && ReservedRolesStore.isReserved(roleName)) {
return new Error("Role [" + roleName + "] is reserved and may not be used.");
}
return null;
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/transport/SSLExceptionHelper.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/transport/SSLExceptionHelper.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/transport/SSLExceptionHelper.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/transport/SSLExceptionHelper.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4Transport.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4Transport.java
similarity index 93%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4Transport.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4Transport.java
index 50893e52aab..fd420fc8fb9 100644
--- a/plugin/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4Transport.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4Transport.java
@@ -22,6 +22,7 @@ import org.elasticsearch.transport.TcpChannel;
import org.elasticsearch.transport.TcpTransport;
import org.elasticsearch.transport.netty4.Netty4Transport;
import org.elasticsearch.xpack.XPackSettings;
+import org.elasticsearch.xpack.security.transport.SSLExceptionHelper;
import org.elasticsearch.xpack.ssl.SSLConfiguration;
import org.elasticsearch.xpack.ssl.SSLService;
@@ -34,9 +35,6 @@ import java.util.HashMap;
import java.util.Map;
import static org.elasticsearch.xpack.security.SecurityField.setting;
-import static org.elasticsearch.xpack.security.transport.SSLExceptionHelper.isCloseDuringHandshakeException;
-import static org.elasticsearch.xpack.security.transport.SSLExceptionHelper.isNotSslRecordException;
-import static org.elasticsearch.xpack.security.transport.SSLExceptionHelper.isReceivedCertificateUnknownException;
/**
* Implementation of a transport that extends the {@link Netty4Transport} to add SSL and IP Filtering
@@ -114,7 +112,7 @@ public class SecurityNetty4Transport extends Netty4Transport {
if (!lifecycle.started()) {
// just close and ignore - we are already stopped and just need to make sure we release all resources
TcpChannel.closeChannel(channel, false);
- } else if (isNotSslRecordException(e)) {
+ } else if (SSLExceptionHelper.isNotSslRecordException(e)) {
if (logger.isTraceEnabled()) {
logger.trace(
new ParameterizedMessage("received plaintext traffic on an encrypted channel, closing connection {}", channel), e);
@@ -122,14 +120,14 @@ public class SecurityNetty4Transport extends Netty4Transport {
logger.warn("received plaintext traffic on an encrypted channel, closing connection {}", channel);
}
TcpChannel.closeChannel(channel, false);
- } else if (isCloseDuringHandshakeException(e)) {
+ } else if (SSLExceptionHelper.isCloseDuringHandshakeException(e)) {
if (logger.isTraceEnabled()) {
logger.trace(new ParameterizedMessage("connection {} closed during ssl handshake", channel), e);
} else {
logger.warn("connection {} closed during handshake", channel);
}
TcpChannel.closeChannel(channel, false);
- } else if (isReceivedCertificateUnknownException(e)) {
+ } else if (SSLExceptionHelper.isReceivedCertificateUnknownException(e)) {
if (logger.isTraceEnabled()) {
logger.trace(new ParameterizedMessage("client did not trust server's certificate, closing connection {}", channel), e);
} else {
@@ -141,10 +139,10 @@ public class SecurityNetty4Transport extends Netty4Transport {
}
}
- class SslChannelInitializer extends ServerChannelInitializer {
+ public class SslChannelInitializer extends ServerChannelInitializer {
private final SSLConfiguration configuration;
- SslChannelInitializer(String name, SSLConfiguration configuration) {
+ public SslChannelInitializer(String name, SSLConfiguration configuration) {
super(name);
this.configuration = configuration;
}
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/user/BuiltinUserInfo.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/BuiltinUserInfo.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/user/BuiltinUserInfo.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/user/BuiltinUserInfo.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/user/ElasticUser.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/ElasticUser.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/user/ElasticUser.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/user/ElasticUser.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/user/InternalUserSerializationHelper.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/InternalUserSerializationHelper.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/user/InternalUserSerializationHelper.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/user/InternalUserSerializationHelper.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/user/KibanaUser.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/KibanaUser.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/user/KibanaUser.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/user/KibanaUser.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/user/LogstashSystemUser.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/LogstashSystemUser.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/user/LogstashSystemUser.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/user/LogstashSystemUser.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/user/SystemUser.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/SystemUser.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/user/SystemUser.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/user/SystemUser.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/user/XPackSecurityUser.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/XPackSecurityUser.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/user/XPackSecurityUser.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/user/XPackSecurityUser.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/user/XPackUser.java b/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/XPackUser.java
similarity index 93%
rename from plugin/src/main/java/org/elasticsearch/xpack/security/user/XPackUser.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/security/user/XPackUser.java
index a085f6d8cbb..d5001c564d5 100644
--- a/plugin/src/main/java/org/elasticsearch/xpack/security/user/XPackUser.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/security/user/XPackUser.java
@@ -5,7 +5,7 @@
*/
package org.elasticsearch.xpack.security.user;
-import org.elasticsearch.xpack.security.audit.index.IndexAuditTrail;
+import org.elasticsearch.xpack.security.audit.index.IndexAuditTrailField;
import org.elasticsearch.xpack.security.authz.RoleDescriptor;
import org.elasticsearch.xpack.security.authz.permission.Role;
import org.elasticsearch.xpack.security.support.MetadataUtils;
@@ -20,7 +20,8 @@ public class XPackUser extends User {
public static final Role ROLE = Role.builder(new RoleDescriptor(ROLE_NAME, new String[] { "all" },
new RoleDescriptor.IndicesPrivileges[] {
RoleDescriptor.IndicesPrivileges.builder().indices("/@&~(\\.security.*)/").privileges("all").build(),
- RoleDescriptor.IndicesPrivileges.builder().indices(IndexAuditTrail.INDEX_NAME_PREFIX + "-*").privileges("read").build()
+ RoleDescriptor.IndicesPrivileges.builder().indices(IndexAuditTrailField.INDEX_NAME_PREFIX + "-*")
+ .privileges("read").build()
},
new String[] { "*" },
MetadataUtils.DEFAULT_RESERVED_METADATA), null).build();
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/CertUtils.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertUtils.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/CertUtils.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertUtils.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/CertificateGenerateTool.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertificateGenerateTool.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/CertificateGenerateTool.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertificateGenerateTool.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/CertificateTool.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertificateTool.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/CertificateTool.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertificateTool.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/CertificateTrustRestrictions.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertificateTrustRestrictions.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/CertificateTrustRestrictions.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/CertificateTrustRestrictions.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/DefaultJDKTrustConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/DefaultJDKTrustConfig.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/DefaultJDKTrustConfig.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/DefaultJDKTrustConfig.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/KeyConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/KeyConfig.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/KeyConfig.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/KeyConfig.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/PEMKeyConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/PEMKeyConfig.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/PEMKeyConfig.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/PEMKeyConfig.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/PEMTrustConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/PEMTrustConfig.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/PEMTrustConfig.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/PEMTrustConfig.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/RestrictedTrustConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/RestrictedTrustConfig.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/RestrictedTrustConfig.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/RestrictedTrustConfig.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/RestrictedTrustManager.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/RestrictedTrustManager.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/RestrictedTrustManager.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/RestrictedTrustManager.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLConfiguration.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLConfiguration.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLConfiguration.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLConfiguration.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloader.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloader.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloader.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloader.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLService.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLService.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLService.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/SSLService.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/StoreKeyConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/StoreKeyConfig.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/StoreKeyConfig.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/StoreKeyConfig.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/StoreTrustConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/StoreTrustConfig.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/StoreTrustConfig.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/StoreTrustConfig.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/TLSLicenseBootstrapCheck.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/TLSLicenseBootstrapCheck.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/TLSLicenseBootstrapCheck.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/TLSLicenseBootstrapCheck.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/TrustAllConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/TrustAllConfig.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/TrustAllConfig.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/TrustAllConfig.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/TrustConfig.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/TrustConfig.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/TrustConfig.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/TrustConfig.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/action/TransportGetCertificateInfoAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/action/TransportGetCertificateInfoAction.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/action/TransportGetCertificateInfoAction.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/action/TransportGetCertificateInfoAction.java
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/rest/RestGetCertificateInfoAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/ssl/rest/RestGetCertificateInfoAction.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/ssl/rest/RestGetCertificateInfoAction.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/ssl/rest/RestGetCertificateInfoAction.java
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeCheckVersion.java b/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeCheckVersion.java
new file mode 100644
index 00000000000..50c35df1c36
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/IndexUpgradeCheckVersion.java
@@ -0,0 +1,13 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.upgrade;
+
+public final class IndexUpgradeCheckVersion {
+ public static final int UPRADE_VERSION = 6;
+
+ private IndexUpgradeCheckVersion() {}
+
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/UpgradeField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/UpgradeField.java
new file mode 100644
index 00000000000..c558360dd27
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/UpgradeField.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.upgrade;
+
+import org.elasticsearch.cluster.metadata.IndexMetaData;
+
+public final class UpgradeField {
+ // this is the required index.format setting for 6.0 services (watcher and security) to start up
+ // this index setting is set by the upgrade API or automatically when a 6.0 index template is created
+ private static final int EXPECTED_INDEX_FORMAT_VERSION = 6;
+
+ private UpgradeField() {}
+
+ /**
+ * Checks the format of an internal index and returns true if the index is up to date or false if upgrade is required
+ */
+ public static boolean checkInternalIndexFormat(IndexMetaData indexMetaData) {
+ return indexMetaData.getSettings().getAsInt(IndexMetaData.INDEX_FORMAT_SETTING.getKey(), 0) == EXPECTED_INDEX_FORMAT_VERSION;
+ }
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoAction.java b/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoAction.java
index 9a77165d35a..2076ebca294 100644
--- a/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoAction.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/upgrade/actions/IndexUpgradeInfoAction.java
@@ -49,7 +49,7 @@ public class IndexUpgradeInfoAction extends Action actions;
- protected Response() {
+ public Response() {
}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/WatcherFeatureSetUsage.java b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/WatcherFeatureSetUsage.java
new file mode 100644
index 00000000000..27cdb827d23
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/WatcherFeatureSetUsage.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.watcher;
+
+import org.elasticsearch.common.io.stream.StreamInput;
+import org.elasticsearch.common.io.stream.StreamOutput;
+import org.elasticsearch.common.xcontent.XContentBuilder;
+import org.elasticsearch.xpack.XPackFeatureSet;
+import org.elasticsearch.xpack.XPackField;
+
+import java.io.IOException;
+import java.util.Map;
+
+public class WatcherFeatureSetUsage extends XPackFeatureSet.Usage {
+
+ private final Map stats;
+
+ public WatcherFeatureSetUsage(StreamInput in) throws IOException {
+ super(in);
+ stats = in.readMap();
+ }
+
+ public WatcherFeatureSetUsage(boolean available, boolean enabled, Map stats) {
+ super(XPackField.WATCHER, available, enabled);
+ this.stats = stats;
+ }
+
+ public Map stats() {
+ return stats;
+ }
+
+ @Override
+ protected void innerXContent(XContentBuilder builder, Params params) throws IOException {
+ super.innerXContent(builder, params);
+ if (enabled) {
+ for (Map.Entry entry : stats.entrySet()) {
+ builder.field(entry.getKey(), entry.getValue());
+ }
+ }
+ }
+
+ @Override
+ public void writeTo(StreamOutput out) throws IOException {
+ super.writeTo(out);
+ out.writeMap(stats);
+ }
+}
diff --git a/plugin/src/main/java/org/elasticsearch/xpack/watcher/client/WatcherClient.java b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/client/WatcherClient.java
similarity index 100%
rename from plugin/src/main/java/org/elasticsearch/xpack/watcher/client/WatcherClient.java
rename to plugin/core/src/main/java/org/elasticsearch/xpack/watcher/client/WatcherClient.java
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreField.java
new file mode 100644
index 00000000000..15d812d0665
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreField.java
@@ -0,0 +1,12 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.watcher.execution;
+
+public final class TriggeredWatchStoreField {
+
+ public static final String INDEX_NAME = ".triggered_watches";
+ public static final String DOC_TYPE = "doc";
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionContext.java b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionContext.java
index 0fb2bcd7385..b72e4fcf250 100644
--- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionContext.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionContext.java
@@ -202,13 +202,13 @@ public abstract class WatchExecutionContext {
return Collections.unmodifiableMap(actionsResults);
}
- WatchRecord abortBeforeExecution(ExecutionState state, String message) {
+ public WatchRecord abortBeforeExecution(ExecutionState state, String message) {
assert !phase.sealed();
phase = ExecutionPhase.ABORTED;
return new WatchRecord.MessageWatchRecord(id, triggerEvent, state, message, getNodeId());
}
- WatchRecord abortFailedExecution(String message) {
+ public WatchRecord abortFailedExecution(String message) {
assert !phase.sealed();
phase = ExecutionPhase.ABORTED;
long executionTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - relativeStartTime);
@@ -217,7 +217,7 @@ public abstract class WatchExecutionContext {
return new WatchRecord.MessageWatchRecord(this, result, message);
}
- WatchRecord abortFailedExecution(Exception e) {
+ public WatchRecord abortFailedExecution(Exception e) {
assert !phase.sealed();
phase = ExecutionPhase.ABORTED;
long executionTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - relativeStartTime);
@@ -235,7 +235,7 @@ public abstract class WatchExecutionContext {
return new WatchRecord.MessageWatchRecord(this, result);
}
- WatchExecutionSnapshot createSnapshot(Thread executionThread) {
+ public WatchExecutionSnapshot createSnapshot(Thread executionThread) {
return new WatchExecutionSnapshot(this, executionThread.getStackTrace());
}
}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/history/HistoryStoreField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/history/HistoryStoreField.java
new file mode 100644
index 00000000000..6b59981c041
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/history/HistoryStoreField.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.watcher.history;
+
+import org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistryField;
+import org.joda.time.DateTime;
+import org.joda.time.format.DateTimeFormat;
+import org.joda.time.format.DateTimeFormatter;
+
+public final class HistoryStoreField {
+
+ public static final String INDEX_PREFIX = ".watcher-history-";
+ public static final String INDEX_PREFIX_WITH_TEMPLATE = INDEX_PREFIX + WatcherIndexTemplateRegistryField.INDEX_TEMPLATE_VERSION + "-";
+ static final DateTimeFormatter indexTimeFormat = DateTimeFormat.forPattern("YYYY.MM.dd");
+
+ /**
+ * Calculates the correct history index name for a given time
+ */
+ public static String getHistoryIndexNameForTime(DateTime time) {
+ return INDEX_PREFIX_WITH_TEMPLATE + indexTimeFormat.print(time);
+ }
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInput.java b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInput.java
index 4aa8e012d5a..e7a14a53874 100644
--- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInput.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInput.java
@@ -49,7 +49,7 @@ public class NoneInput implements Input {
public static class Result extends Input.Result {
- static final Result INSTANCE = new Result();
+ public static final Result INSTANCE = new Result();
private Result() {
super(TYPE, Payload.EMPTY);
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryField.java b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryField.java
new file mode 100644
index 00000000000..7329a717aa9
--- /dev/null
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryField.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack.watcher.support;
+
+public final class WatcherIndexTemplateRegistryField {
+ // history (please add a comment why you increased the version here)
+ // version 1: initial
+ // version 2: added mappings for jira action
+ // version 3: include watch status in history
+ // version 6: upgrade to ES 6, removal of _status field
+ // version 7: add full exception stack traces for better debugging
+ // Note: if you change this, also inform the kibana team around the watcher-ui
+ public static final String INDEX_TEMPLATE_VERSION = "7";
+ public static final String HISTORY_TEMPLATE_NAME = ".watch-history-" + INDEX_TEMPLATE_VERSION;
+ public static final String TRIGGERED_TEMPLATE_NAME = ".triggered_watches";
+ public static final String WATCHES_TEMPLATE_NAME = ".watches";
+ public static final String[] TEMPLATE_NAMES = new String[] {
+ HISTORY_TEMPLATE_NAME, TRIGGERED_TEMPLATE_NAME, WATCHES_TEMPLATE_NAME
+ };
+
+ private WatcherIndexTemplateRegistryField() {}
+}
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchResponse.java
index 61b1fa23438..80f100509b4 100644
--- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchResponse.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchResponse.java
@@ -22,7 +22,7 @@ public class GetWatchResponse extends ActionResponse {
private boolean found = false;
private XContentSource source;
- GetWatchResponse() {
+ public GetWatchResponse() {
}
/**
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchResponse.java b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchResponse.java
index 4ae3c1ac821..16da3b4ed26 100644
--- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchResponse.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchResponse.java
@@ -20,7 +20,7 @@ public class PutWatchResponse extends ActionResponse {
private long version;
private boolean created;
- PutWatchResponse() {
+ public PutWatchResponse() {
}
public PutWatchResponse(String id, long version, boolean created) {
diff --git a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequest.java b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequest.java
index 6b30b413042..e20acdc8939 100644
--- a/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequest.java
+++ b/plugin/core/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequest.java
@@ -16,7 +16,7 @@ import java.util.Locale;
public class WatcherServiceRequest extends MasterNodeRequest {
- enum Command { START, STOP }
+ public enum Command { START, STOP }
private Command command;
@@ -39,7 +39,7 @@ public class WatcherServiceRequest extends MasterNodeRequest snapshots;
private List queuedWatches;
- Node() {
+ public Node() {
}
- Node(DiscoveryNode node) {
+ public Node(DiscoveryNode node) {
super(node);
}
@@ -108,7 +108,7 @@ public class WatcherStatsResponse extends BaseNodesResponse snapshots) {
+ public void setSnapshots(List snapshots) {
this.snapshots = snapshots;
}
diff --git a/plugin/src/main/plugin-metadata/plugin-security.policy b/plugin/core/src/main/plugin-metadata/plugin-security.policy
similarity index 100%
rename from plugin/src/main/plugin-metadata/plugin-security.policy
rename to plugin/core/src/main/plugin-metadata/plugin-security.policy
diff --git a/plugin/src/main/resources/logstash-index-template.json b/plugin/core/src/main/resources/logstash-index-template.json
similarity index 100%
rename from plugin/src/main/resources/logstash-index-template.json
rename to plugin/core/src/main/resources/logstash-index-template.json
diff --git a/plugin/src/main/resources/monitoring-alerts.json b/plugin/core/src/main/resources/monitoring-alerts.json
similarity index 100%
rename from plugin/src/main/resources/monitoring-alerts.json
rename to plugin/core/src/main/resources/monitoring-alerts.json
diff --git a/plugin/src/main/resources/monitoring-beats.json b/plugin/core/src/main/resources/monitoring-beats.json
similarity index 100%
rename from plugin/src/main/resources/monitoring-beats.json
rename to plugin/core/src/main/resources/monitoring-beats.json
diff --git a/plugin/src/main/resources/monitoring-es.json b/plugin/core/src/main/resources/monitoring-es.json
similarity index 100%
rename from plugin/src/main/resources/monitoring-es.json
rename to plugin/core/src/main/resources/monitoring-es.json
diff --git a/plugin/src/main/resources/monitoring-kibana.json b/plugin/core/src/main/resources/monitoring-kibana.json
similarity index 100%
rename from plugin/src/main/resources/monitoring-kibana.json
rename to plugin/core/src/main/resources/monitoring-kibana.json
diff --git a/plugin/src/main/resources/monitoring-logstash.json b/plugin/core/src/main/resources/monitoring-logstash.json
similarity index 100%
rename from plugin/src/main/resources/monitoring-logstash.json
rename to plugin/core/src/main/resources/monitoring-logstash.json
diff --git a/plugin/src/main/resources/security-index-template.json b/plugin/core/src/main/resources/security-index-template.json
similarity index 100%
rename from plugin/src/main/resources/security-index-template.json
rename to plugin/core/src/main/resources/security-index-template.json
diff --git a/plugin/src/main/resources/security_audit_log.json b/plugin/core/src/main/resources/security_audit_log.json
similarity index 100%
rename from plugin/src/main/resources/security_audit_log.json
rename to plugin/core/src/main/resources/security_audit_log.json
diff --git a/plugin/src/main/resources/triggered-watches.json b/plugin/core/src/main/resources/triggered-watches.json
similarity index 100%
rename from plugin/src/main/resources/triggered-watches.json
rename to plugin/core/src/main/resources/triggered-watches.json
diff --git a/plugin/src/main/resources/watch-history.json b/plugin/core/src/main/resources/watch-history.json
similarity index 100%
rename from plugin/src/main/resources/watch-history.json
rename to plugin/core/src/main/resources/watch-history.json
diff --git a/plugin/src/main/resources/watches.json b/plugin/core/src/main/resources/watches.json
similarity index 100%
rename from plugin/src/main/resources/watches.json
rename to plugin/core/src/main/resources/watches.json
diff --git a/plugin/src/main/resources/org/elasticsearch/xpack/security/crypto/migrate.help b/plugin/core/src/main/resources/xpack/security/crypto/migrate.help
similarity index 100%
rename from plugin/src/main/resources/org/elasticsearch/xpack/security/crypto/migrate.help
rename to plugin/core/src/main/resources/xpack/security/crypto/migrate.help
diff --git a/plugin/src/main/resources/org/elasticsearch/xpack/security/crypto/tool/syskey-generate.help b/plugin/core/src/main/resources/xpack/security/crypto/tool/syskey-generate.help
similarity index 100%
rename from plugin/src/main/resources/org/elasticsearch/xpack/security/crypto/tool/syskey-generate.help
rename to plugin/core/src/main/resources/xpack/security/crypto/tool/syskey-generate.help
diff --git a/plugin/src/test/java/org/elasticsearch/action/MockIndicesRequest.java b/plugin/core/src/test/java/org/elasticsearch/action/MockIndicesRequest.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/action/MockIndicesRequest.java
rename to plugin/core/src/test/java/org/elasticsearch/action/MockIndicesRequest.java
diff --git a/plugin/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsResponseTestUtils.java b/plugin/core/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsResponseTestUtils.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsResponseTestUtils.java
rename to plugin/core/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsResponseTestUtils.java
diff --git a/plugin/src/test/java/org/elasticsearch/http/netty4/Netty4HttpMockUtil.java b/plugin/core/src/test/java/org/elasticsearch/http/netty4/Netty4HttpMockUtil.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/http/netty4/Netty4HttpMockUtil.java
rename to plugin/core/src/test/java/org/elasticsearch/http/netty4/Netty4HttpMockUtil.java
diff --git a/plugin/src/test/java/org/elasticsearch/license/AbstractLicenseServiceTestCase.java b/plugin/core/src/test/java/org/elasticsearch/license/AbstractLicenseServiceTestCase.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/license/AbstractLicenseServiceTestCase.java
rename to plugin/core/src/test/java/org/elasticsearch/license/AbstractLicenseServiceTestCase.java
diff --git a/plugin/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java b/plugin/core/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java
similarity index 85%
rename from plugin/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java
rename to plugin/core/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java
index 3c2d8768bc0..efea851e73c 100644
--- a/plugin/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java
+++ b/plugin/core/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java
@@ -5,11 +5,6 @@
*/
package org.elasticsearch.license;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.concurrent.CountDownLatch;
-
import org.elasticsearch.analysis.common.CommonAnalysisPlugin;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.ClusterStateUpdateTask;
@@ -19,32 +14,29 @@ import org.elasticsearch.common.Nullable;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
-import org.elasticsearch.xpack.XPackPlugin;
+import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin;
+import org.elasticsearch.xpack.XPackClientPlugin;
import org.elasticsearch.xpack.XPackSettings;
-import org.elasticsearch.xpack.ml.MachineLearning;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.concurrent.CountDownLatch;
public abstract class AbstractLicensesIntegrationTestCase extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
- return Settings.builder()
- .put(XPackSettings.SECURITY_ENABLED.getKey(), false)
- .put(XPackSettings.MONITORING_ENABLED.getKey(), false)
- .put(XPackSettings.WATCHER_ENABLED.getKey(), false)
- .put(XPackSettings.GRAPH_ENABLED.getKey(), false)
- .put(XPackSettings.MACHINE_LEARNING_ENABLED.getKey(), false)
- .put(MachineLearning.AUTODETECT_PROCESS.getKey(), false)
- .build();
+ return Settings.builder().put(XPackSettings.SECURITY_ENABLED.getKey(), false).build();
}
@Override
protected Collection> nodePlugins() {
- return Arrays.asList(XPackPlugin.class, CommonAnalysisPlugin.class);
+ return Arrays.asList(LocalStateCompositeXPackPlugin.class, CommonAnalysisPlugin.class);
}
@Override
protected Collection> transportClientPlugins() {
- return nodePlugins();
+ return Arrays.asList(XPackClientPlugin.class, CommonAnalysisPlugin.class);
}
@Override
diff --git a/plugin/src/test/java/org/elasticsearch/license/ExpirationCallbackTests.java b/plugin/core/src/test/java/org/elasticsearch/license/ExpirationCallbackTests.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/license/ExpirationCallbackTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/ExpirationCallbackTests.java
diff --git a/plugin/src/test/java/org/elasticsearch/license/LicenseClusterChangeTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicenseClusterChangeTests.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/license/LicenseClusterChangeTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/LicenseClusterChangeTests.java
diff --git a/plugin/src/test/java/org/elasticsearch/license/LicenseOperationModeTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicenseOperationModeTests.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/license/LicenseOperationModeTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/LicenseOperationModeTests.java
diff --git a/plugin/src/test/java/org/elasticsearch/license/LicenseOperationModeUpdateTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicenseOperationModeUpdateTests.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/license/LicenseOperationModeUpdateTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/LicenseOperationModeUpdateTests.java
diff --git a/plugin/src/test/java/org/elasticsearch/license/LicenseRegistrationTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicenseRegistrationTests.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/license/LicenseRegistrationTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/LicenseRegistrationTests.java
diff --git a/plugin/src/test/java/org/elasticsearch/license/LicenseScheduleTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicenseScheduleTests.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/license/LicenseScheduleTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/LicenseScheduleTests.java
diff --git a/plugin/src/test/java/org/elasticsearch/license/LicenseSerializationTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicenseSerializationTests.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/license/LicenseSerializationTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/LicenseSerializationTests.java
diff --git a/plugin/src/test/java/org/elasticsearch/license/LicenseServiceClusterNotRecoveredTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicenseServiceClusterNotRecoveredTests.java
similarity index 92%
rename from plugin/src/test/java/org/elasticsearch/license/LicenseServiceClusterNotRecoveredTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/LicenseServiceClusterNotRecoveredTests.java
index b16244419fc..dc19e7ab5a6 100644
--- a/plugin/src/test/java/org/elasticsearch/license/LicenseServiceClusterNotRecoveredTests.java
+++ b/plugin/core/src/test/java/org/elasticsearch/license/LicenseServiceClusterNotRecoveredTests.java
@@ -11,7 +11,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.transport.Netty4Plugin;
-import org.elasticsearch.xpack.XPackPlugin;
+import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin;
import java.util.Arrays;
import java.util.Collection;
@@ -37,7 +37,7 @@ public class LicenseServiceClusterNotRecoveredTests extends AbstractLicensesInte
@Override
protected Collection> nodePlugins() {
- return Arrays.asList(XPackPlugin.class, CommonAnalysisPlugin.class, Netty4Plugin.class);
+ return Arrays.asList(LocalStateCompositeXPackPlugin.class, CommonAnalysisPlugin.class, Netty4Plugin.class);
}
@Override
diff --git a/plugin/src/test/java/org/elasticsearch/license/LicenseServiceClusterTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicenseServiceClusterTests.java
similarity index 97%
rename from plugin/src/test/java/org/elasticsearch/license/LicenseServiceClusterTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/LicenseServiceClusterTests.java
index 44ed4f0d8e2..acd4df85262 100644
--- a/plugin/src/test/java/org/elasticsearch/license/LicenseServiceClusterTests.java
+++ b/plugin/core/src/test/java/org/elasticsearch/license/LicenseServiceClusterTests.java
@@ -13,6 +13,7 @@ import org.elasticsearch.env.Environment;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.transport.Netty4Plugin;
+import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin;
import org.elasticsearch.xpack.XPackPlugin;
import java.nio.charset.StandardCharsets;
@@ -43,7 +44,7 @@ public class LicenseServiceClusterTests extends AbstractLicensesIntegrationTestC
@Override
protected Collection> nodePlugins() {
- return Arrays.asList(XPackPlugin.class, CommonAnalysisPlugin.class, Netty4Plugin.class);
+ return Arrays.asList(LocalStateCompositeXPackPlugin.class, CommonAnalysisPlugin.class, Netty4Plugin.class);
}
@Override
diff --git a/plugin/src/test/java/org/elasticsearch/license/LicenseUtilsTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicenseUtilsTests.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/license/LicenseUtilsTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/LicenseUtilsTests.java
diff --git a/plugin/src/test/java/org/elasticsearch/license/LicensesAcknowledgementTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicensesAcknowledgementTests.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/license/LicensesAcknowledgementTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/LicensesAcknowledgementTests.java
diff --git a/plugin/src/test/java/org/elasticsearch/license/LicensesManagerServiceTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicensesManagerServiceTests.java
similarity index 96%
rename from plugin/src/test/java/org/elasticsearch/license/LicensesManagerServiceTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/LicensesManagerServiceTests.java
index 3d0c7f94de4..53043e2d636 100644
--- a/plugin/src/test/java/org/elasticsearch/license/LicensesManagerServiceTests.java
+++ b/plugin/core/src/test/java/org/elasticsearch/license/LicensesManagerServiceTests.java
@@ -11,9 +11,9 @@ import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.plugins.Plugin;
-import org.elasticsearch.xpack.XPackPlugin;
+import org.elasticsearch.test.ESSingleNodeTestCase;
+import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin;
import org.elasticsearch.xpack.XPackSettings;
-import org.elasticsearch.xpack.XPackSingleNodeTestCase;
import org.junit.Before;
import java.util.Collection;
@@ -24,11 +24,11 @@ import java.util.concurrent.atomic.AtomicBoolean;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
-public class LicensesManagerServiceTests extends XPackSingleNodeTestCase {
+public class LicensesManagerServiceTests extends ESSingleNodeTestCase {
@Override
protected Collection> getPlugins() {
- return Collections.singletonList(XPackPlugin.class);
+ return Collections.singletonList(LocalStateCompositeXPackPlugin.class);
}
@Override
diff --git a/plugin/src/test/java/org/elasticsearch/license/LicensesMetaDataSerializationTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicensesMetaDataSerializationTests.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/license/LicensesMetaDataSerializationTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/LicensesMetaDataSerializationTests.java
diff --git a/plugin/src/test/java/org/elasticsearch/license/LicensesTransportTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicensesTransportTests.java
similarity index 96%
rename from plugin/src/test/java/org/elasticsearch/license/LicensesTransportTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/LicensesTransportTests.java
index 9a986218387..f5ba41f6abd 100644
--- a/plugin/src/test/java/org/elasticsearch/license/LicensesTransportTests.java
+++ b/plugin/core/src/test/java/org/elasticsearch/license/LicensesTransportTests.java
@@ -12,9 +12,9 @@ import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.node.Node;
import org.elasticsearch.plugins.Plugin;
-import org.elasticsearch.xpack.XPackPlugin;
+import org.elasticsearch.test.ESSingleNodeTestCase;
+import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin;
import org.elasticsearch.xpack.XPackSettings;
-import org.elasticsearch.xpack.XPackSingleNodeTestCase;
import java.nio.charset.StandardCharsets;
import java.util.Collection;
@@ -27,7 +27,7 @@ import static org.elasticsearch.license.TestUtils.generateSignedLicense;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.not;
-public class LicensesTransportTests extends XPackSingleNodeTestCase {
+public class LicensesTransportTests extends ESSingleNodeTestCase {
@Override
protected boolean resetNodeAfterTest() {
@@ -36,7 +36,7 @@ public class LicensesTransportTests extends XPackSingleNodeTestCase {
@Override
protected Collection> getPlugins() {
- return Collections.singletonList(XPackPlugin.class);
+ return Collections.singletonList(LocalStateCompositeXPackPlugin.class);
}
@Override
@@ -44,8 +44,8 @@ public class LicensesTransportTests extends XPackSingleNodeTestCase {
Settings.Builder newSettings = Settings.builder();
newSettings.put(super.nodeSettings());
newSettings.put(XPackSettings.SECURITY_ENABLED.getKey(), false);
- newSettings.put(XPackSettings.MONITORING_ENABLED.getKey(), false);
- newSettings.put(XPackSettings.WATCHER_ENABLED.getKey(), false);
+// newSettings.put(XPackSettings.MONITORING_ENABLED.getKey(), false);
+// newSettings.put(XPackSettings.WATCHER_ENABLED.getKey(), false);
newSettings.put(Node.NODE_DATA_SETTING.getKey(), true);
return newSettings.build();
}
diff --git a/plugin/src/test/java/org/elasticsearch/license/OperationModeFileWatcherTests.java b/plugin/core/src/test/java/org/elasticsearch/license/OperationModeFileWatcherTests.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/license/OperationModeFileWatcherTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/OperationModeFileWatcherTests.java
diff --git a/plugin/src/test/java/org/elasticsearch/license/PutLicenseResponseTests.java b/plugin/core/src/test/java/org/elasticsearch/license/PutLicenseResponseTests.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/license/PutLicenseResponseTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/PutLicenseResponseTests.java
diff --git a/plugin/src/test/java/org/elasticsearch/license/SelfGeneratedLicenseTests.java b/plugin/core/src/test/java/org/elasticsearch/license/SelfGeneratedLicenseTests.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/license/SelfGeneratedLicenseTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/SelfGeneratedLicenseTests.java
diff --git a/plugin/src/test/java/org/elasticsearch/license/TestUtils.java b/plugin/core/src/test/java/org/elasticsearch/license/TestUtils.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/license/TestUtils.java
rename to plugin/core/src/test/java/org/elasticsearch/license/TestUtils.java
diff --git a/plugin/src/test/java/org/elasticsearch/license/UpgradeToTrialTests.java b/plugin/core/src/test/java/org/elasticsearch/license/UpgradeToTrialTests.java
similarity index 92%
rename from plugin/src/test/java/org/elasticsearch/license/UpgradeToTrialTests.java
rename to plugin/core/src/test/java/org/elasticsearch/license/UpgradeToTrialTests.java
index 7326e4d7e25..6268a9170be 100644
--- a/plugin/src/test/java/org/elasticsearch/license/UpgradeToTrialTests.java
+++ b/plugin/core/src/test/java/org/elasticsearch/license/UpgradeToTrialTests.java
@@ -14,7 +14,8 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.transport.Netty4Plugin;
-import org.elasticsearch.xpack.XPackPlugin;
+import org.elasticsearch.xpack.LocalStateCompositeXPackPlugin;
+import org.elasticsearch.xpack.XPackClientPlugin;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
@@ -37,12 +38,12 @@ public class UpgradeToTrialTests extends AbstractLicensesIntegrationTestCase {
@Override
protected Collection> nodePlugins() {
- return Arrays.asList(XPackPlugin.class, Netty4Plugin.class);
+ return Arrays.asList(LocalStateCompositeXPackPlugin.class, Netty4Plugin.class);
}
@Override
protected Collection> transportClientPlugins() {
- return nodePlugins();
+ return Arrays.asList(XPackClientPlugin.class, Netty4Plugin.class);
}
public void testUpgradeToTrial() throws Exception {
diff --git a/plugin/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java b/plugin/core/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java
similarity index 95%
rename from plugin/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java
rename to plugin/core/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java
index 98a80890f12..4f9b125a9fd 100644
--- a/plugin/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java
+++ b/plugin/core/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java
@@ -6,7 +6,6 @@
package org.elasticsearch.script;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.xpack.watcher.common.text.TextTemplateEngine;
import java.util.Collection;
import java.util.Collections;
@@ -15,7 +14,7 @@ import java.util.function.Function;
/**
* A mock script engine that registers itself under the 'mustache' name so that
- * {@link TextTemplateEngine}
+ * TextTemplateEngine (watcher)
* uses it and adds validation that watcher tests don't rely on mustache templating/
*/
public class MockMustacheScriptEngine extends MockScriptEngine {
diff --git a/plugin/core/src/test/java/org/elasticsearch/test/SecuritySettingsSourceField.java b/plugin/core/src/test/java/org/elasticsearch/test/SecuritySettingsSourceField.java
new file mode 100644
index 00000000000..12082b77043
--- /dev/null
+++ b/plugin/core/src/test/java/org/elasticsearch/test/SecuritySettingsSourceField.java
@@ -0,0 +1,15 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.test;
+
+import org.elasticsearch.common.settings.SecureString;
+
+public final class SecuritySettingsSourceField {
+ public static final SecureString TEST_PASSWORD_SECURE_STRING = new SecureString("x-pack-test-password".toCharArray());
+ public static final String TEST_PASSWORD = "x-pack-test-password";
+
+ private SecuritySettingsSourceField() {}
+}
diff --git a/plugin/src/test/java/org/elasticsearch/test/TestMatchers.java b/plugin/core/src/test/java/org/elasticsearch/test/TestMatchers.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/test/TestMatchers.java
rename to plugin/core/src/test/java/org/elasticsearch/test/TestMatchers.java
diff --git a/plugin/src/test/java/org/elasticsearch/test/http/Headers.java b/plugin/core/src/test/java/org/elasticsearch/test/http/Headers.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/test/http/Headers.java
rename to plugin/core/src/test/java/org/elasticsearch/test/http/Headers.java
diff --git a/plugin/src/test/java/org/elasticsearch/test/http/MockRequest.java b/plugin/core/src/test/java/org/elasticsearch/test/http/MockRequest.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/test/http/MockRequest.java
rename to plugin/core/src/test/java/org/elasticsearch/test/http/MockRequest.java
diff --git a/plugin/src/test/java/org/elasticsearch/test/http/MockResponse.java b/plugin/core/src/test/java/org/elasticsearch/test/http/MockResponse.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/test/http/MockResponse.java
rename to plugin/core/src/test/java/org/elasticsearch/test/http/MockResponse.java
diff --git a/plugin/src/test/java/org/elasticsearch/test/http/MockWebServer.java b/plugin/core/src/test/java/org/elasticsearch/test/http/MockWebServer.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/test/http/MockWebServer.java
rename to plugin/core/src/test/java/org/elasticsearch/test/http/MockWebServer.java
diff --git a/plugin/src/test/java/org/elasticsearch/xpack/ClientHelperTests.java b/plugin/core/src/test/java/org/elasticsearch/xpack/ClientHelperTests.java
similarity index 100%
rename from plugin/src/test/java/org/elasticsearch/xpack/ClientHelperTests.java
rename to plugin/core/src/test/java/org/elasticsearch/xpack/ClientHelperTests.java
diff --git a/plugin/core/src/test/java/org/elasticsearch/xpack/LocalStateCompositeXPackPlugin.java b/plugin/core/src/test/java/org/elasticsearch/xpack/LocalStateCompositeXPackPlugin.java
new file mode 100644
index 00000000000..eaec05a8a22
--- /dev/null
+++ b/plugin/core/src/test/java/org/elasticsearch/xpack/LocalStateCompositeXPackPlugin.java
@@ -0,0 +1,385 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+package org.elasticsearch.xpack;
+
+import org.elasticsearch.action.ActionRequest;
+import org.elasticsearch.action.ActionResponse;
+import org.elasticsearch.action.support.ActionFilter;
+import org.elasticsearch.bootstrap.BootstrapCheck;
+import org.elasticsearch.client.Client;
+import org.elasticsearch.cluster.ClusterState;
+import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
+import org.elasticsearch.cluster.metadata.IndexTemplateMetaData;
+import org.elasticsearch.cluster.node.DiscoveryNode;
+import org.elasticsearch.cluster.node.DiscoveryNodes;
+import org.elasticsearch.cluster.service.ClusterService;
+import org.elasticsearch.common.inject.Module;
+import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
+import org.elasticsearch.common.network.NetworkService;
+import org.elasticsearch.common.settings.ClusterSettings;
+import org.elasticsearch.common.settings.IndexScopedSettings;
+import org.elasticsearch.common.settings.Setting;
+import org.elasticsearch.common.settings.Settings;
+import org.elasticsearch.common.settings.SettingsFilter;
+import org.elasticsearch.common.util.BigArrays;
+import org.elasticsearch.common.util.PageCacheRecycler;
+import org.elasticsearch.common.util.concurrent.ThreadContext;
+import org.elasticsearch.common.xcontent.NamedXContentRegistry;
+import org.elasticsearch.env.Environment;
+import org.elasticsearch.env.NodeEnvironment;
+import org.elasticsearch.http.HttpServerTransport;
+import org.elasticsearch.index.IndexModule;
+import org.elasticsearch.index.analysis.TokenizerFactory;
+import org.elasticsearch.indices.analysis.AnalysisModule;
+import org.elasticsearch.indices.breaker.CircuitBreakerService;
+import org.elasticsearch.ingest.Processor;
+import org.elasticsearch.license.LicenseService;
+import org.elasticsearch.license.XPackLicenseState;
+import org.elasticsearch.plugins.ActionPlugin;
+import org.elasticsearch.plugins.AnalysisPlugin;
+import org.elasticsearch.plugins.ClusterPlugin;
+import org.elasticsearch.plugins.DiscoveryPlugin;
+import org.elasticsearch.plugins.IngestPlugin;
+import org.elasticsearch.plugins.MapperPlugin;
+import org.elasticsearch.plugins.NetworkPlugin;
+import org.elasticsearch.plugins.Plugin;
+import org.elasticsearch.plugins.ScriptPlugin;
+import org.elasticsearch.rest.RestController;
+import org.elasticsearch.rest.RestHandler;
+import org.elasticsearch.script.ScriptContext;
+import org.elasticsearch.script.ScriptService;
+import org.elasticsearch.threadpool.ExecutorBuilder;
+import org.elasticsearch.threadpool.ThreadPool;
+import org.elasticsearch.transport.Transport;
+import org.elasticsearch.transport.TransportInterceptor;
+import org.elasticsearch.watcher.ResourceWatcherService;
+import org.elasticsearch.xpack.ssl.SSLService;
+
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.function.BiConsumer;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.function.Supplier;
+import java.util.function.UnaryOperator;
+import java.util.stream.Collectors;
+
+public class LocalStateCompositeXPackPlugin extends XPackPlugin implements ScriptPlugin, ActionPlugin, IngestPlugin, NetworkPlugin,
+ ClusterPlugin, DiscoveryPlugin, MapperPlugin, AnalysisPlugin {
+
+ private XPackLicenseState licenseState;
+ private SSLService sslService;
+ private LicenseService licenseService;
+ protected List plugins = new ArrayList<>();
+
+ public LocalStateCompositeXPackPlugin(final Settings settings, final Path configPath) throws Exception {
+ super(settings, configPath);
+ }
+
+ //Get around all the setOnce nonsense in the plugin
+ @Override
+ protected SSLService getSslService() {
+ return sslService;
+ }
+
+ @Override
+ protected void setSslService(SSLService sslService) {
+ this.sslService = sslService;
+ }
+
+ @Override
+ protected LicenseService getLicenseService() {
+ return licenseService;
+ }
+
+ @Override
+ protected void setLicenseService(LicenseService licenseService) {
+ this.licenseService = licenseService;
+ }
+
+ @Override
+ protected XPackLicenseState getLicenseState() {
+ return licenseState;
+ }
+
+ @Override
+ protected void setLicenseState(XPackLicenseState licenseState) {
+ this.licenseState = licenseState;
+ }
+
+ @Override
+ public Collection createGuiceModules() {
+ ArrayList modules = new ArrayList<>();
+ modules.addAll(super.createGuiceModules());
+ filterPlugins(Plugin.class).stream().forEach(p ->
+ modules.addAll(p.createGuiceModules())
+ );
+ return modules;
+ }
+
+ @Override
+ public Collection createComponents(Client client, ClusterService clusterService, ThreadPool threadPool,
+ ResourceWatcherService resourceWatcherService, ScriptService scriptService,
+ NamedXContentRegistry xContentRegistry, Environment environment,
+ NodeEnvironment nodeEnvironment, NamedWriteableRegistry namedWriteableRegistry) {
+ List components = new ArrayList<>();
+ components.addAll(super.createComponents(client, clusterService, threadPool, resourceWatcherService, scriptService,
+ xContentRegistry, environment, nodeEnvironment, namedWriteableRegistry));
+
+ filterPlugins(Plugin.class).stream().forEach(p ->
+ components.addAll(p.createComponents(client, clusterService, threadPool, resourceWatcherService, scriptService,
+ xContentRegistry, environment, nodeEnvironment, namedWriteableRegistry))
+ );
+ return components;
+ }
+
+ @Override
+ public Collection getRestHeaders() {
+ List headers = new ArrayList<>();
+ headers.addAll(super.getRestHeaders());
+ filterPlugins(ActionPlugin.class).stream().forEach(p -> headers.addAll(p.getRestHeaders()));
+ return headers;
+ }
+
+ @Override
+ public List> getSettings() {
+ ArrayList> settings = new ArrayList<>();
+ settings.addAll(super.getSettings());
+
+ filterPlugins(Plugin.class).stream().forEach(p ->
+ settings.addAll(p.getSettings())
+ );
+ return settings;
+ }
+
+ @Override
+ public List getSettingsFilter() {
+ List filters = new ArrayList<>();
+ filters.addAll(super.getSettingsFilter());
+ filterPlugins(Plugin.class).stream().forEach(p ->
+ filters.addAll(p.getSettingsFilter())
+ );
+ return filters;
+ }
+
+ @Override
+ public List> getActions() {
+ List> actions = new ArrayList<>();
+ actions.addAll(super.getActions());
+ filterPlugins(ActionPlugin.class).stream().forEach(p ->
+ actions.addAll(p.getActions())
+ );
+ return actions;
+ }
+
+ @Override
+ public List getActionFilters() {
+ List filters = new ArrayList<>();
+ filters.addAll(super.getActionFilters());
+ filterPlugins(ActionPlugin.class).stream().forEach(p ->
+ filters.addAll(p.getActionFilters())
+ );
+ return filters;
+ }
+
+ @Override
+ public List getRestHandlers(Settings settings, RestController restController, ClusterSettings clusterSettings,
+ IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter,
+ IndexNameExpressionResolver indexNameExpressionResolver,
+ Supplier nodesInCluster) {
+ List handlers = new ArrayList<>();
+ handlers.addAll(super.getRestHandlers(settings, restController, clusterSettings, indexScopedSettings, settingsFilter,
+ indexNameExpressionResolver, nodesInCluster));
+ filterPlugins(ActionPlugin.class).stream().forEach(p ->
+ handlers.addAll(p.getRestHandlers(settings, restController, clusterSettings, indexScopedSettings,
+ settingsFilter, indexNameExpressionResolver, nodesInCluster))
+ );
+ return handlers;
+ }
+
+ @Override
+ public List getNamedWriteables() {
+ List entries = new ArrayList<>();
+ entries.addAll(super.getNamedWriteables());
+ for (Plugin p : plugins) {
+ entries.addAll(p.getNamedWriteables());
+ }
+ return entries;
+ }
+
+ @Override
+ public List getNamedXContent() {
+ List entries = new ArrayList<>();
+ entries.addAll(super.getNamedXContent());
+ for (Plugin p : plugins) {
+ entries.addAll(p.getNamedXContent());
+ }
+ return entries;
+ }
+
+ // End of the XPackPlugin overrides
+
+ @Override
+ public Settings additionalSettings() {
+ Settings.Builder builder = Settings.builder();
+ builder.put(super.additionalSettings());
+ filterPlugins(Plugin.class).stream().forEach(p ->
+ builder.put(p.additionalSettings())
+ );
+ return builder.build();
+ }
+
+
+ @Override
+ public List getContexts() {
+ List contexts = new ArrayList<>();
+ contexts.addAll(super.getContexts());
+ filterPlugins(ScriptPlugin.class).stream().forEach(p -> contexts.addAll(p.getContexts()));
+ return contexts;
+ }
+
+ @Override
+ public Map getProcessors(Processor.Parameters parameters) {
+ Map processors = new HashMap<>();
+ filterPlugins(IngestPlugin.class).stream().forEach(p -> processors.putAll(p.getProcessors(parameters)));
+ return processors;
+ }
+
+ @Override
+ public List getTransportInterceptors(NamedWriteableRegistry namedWriteableRegistry, ThreadContext threadContext) {
+ List interceptors = new ArrayList<>();
+ filterPlugins(NetworkPlugin.class).stream().forEach(p -> interceptors.addAll(p.getTransportInterceptors(namedWriteableRegistry,
+ threadContext)));
+ return interceptors;
+ }
+
+ @Override
+ public Map> getTransports(Settings settings, ThreadPool threadPool, BigArrays bigArrays,
+ PageCacheRecycler pageCacheRecycler,
+ CircuitBreakerService circuitBreakerService,
+ NamedWriteableRegistry namedWriteableRegistry,
+ NetworkService networkService) {
+ Map> transports = new HashMap<>();
+ transports.putAll(super.getTransports(settings, threadPool, bigArrays, pageCacheRecycler,
+ circuitBreakerService, namedWriteableRegistry, networkService));
+ filterPlugins(NetworkPlugin.class).stream().forEach(p -> transports.putAll(p.getTransports(settings, threadPool, bigArrays,
+ pageCacheRecycler, circuitBreakerService, namedWriteableRegistry, networkService)));
+ return transports;
+
+
+ }
+
+ @Override
+ public Map> getHttpTransports(Settings settings, ThreadPool threadPool, BigArrays bigArrays,
+ CircuitBreakerService circuitBreakerService,
+ NamedWriteableRegistry namedWriteableRegistry,
+ NamedXContentRegistry xContentRegistry,
+ NetworkService networkService,
+ HttpServerTransport.Dispatcher dispatcher) {
+ Map> transports = new HashMap<>();
+ filterPlugins(NetworkPlugin.class).stream().forEach(p -> transports.putAll(p.getHttpTransports(settings, threadPool, bigArrays,
+ circuitBreakerService, namedWriteableRegistry, xContentRegistry, networkService, dispatcher)));
+ return transports;
+ }
+
+ @Override
+ public List getBootstrapChecks() {
+ List checks = new ArrayList<>();
+ filterPlugins(Plugin.class).stream().forEach(p -> checks.addAll(p.getBootstrapChecks()));
+ return Collections.unmodifiableList(checks);
+ }
+
+ @Override
+ public UnaryOperator getRestHandlerWrapper(ThreadContext threadContext) {
+
+ // There can be only one.
+ List> items = filterPlugins(ActionPlugin.class).stream().map(p ->
+ p.getRestHandlerWrapper(threadContext)).filter(Objects::nonNull).collect(Collectors.toList());
+
+ if (items.size() > 1) {
+ throw new UnsupportedOperationException("Only the security ActionPlugin should override this");
+ } else if (items.size() == 1) {
+ return items.get(0);
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public List> getExecutorBuilders(final Settings settings) {
+ List> builders = new ArrayList<>();
+ filterPlugins(Plugin.class).stream().forEach(p -> builders.addAll(p.getExecutorBuilders(settings)));
+ return builders;
+ }
+ @Override
+ public UnaryOperator