2019-11-01 14:33:11 -04:00
|
|
|
import org.elasticsearch.gradle.info.BuildParams
|
|
|
|
|
2019-06-20 02:21:29 -04:00
|
|
|
apply plugin: 'elasticsearch.testclusters'
|
2017-01-04 14:27:53 -05:00
|
|
|
apply plugin: 'elasticsearch.standalone-rest-test'
|
2016-03-08 17:15:40 -05:00
|
|
|
apply plugin: 'elasticsearch.rest-test'
|
|
|
|
|
|
|
|
dependencies {
|
2018-08-21 20:03:28 -04:00
|
|
|
testCompile project(path: xpackModule('core'), configuration: 'default')
|
2018-01-27 00:48:30 -05:00
|
|
|
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
|
|
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
2016-08-11 13:28:36 -04:00
|
|
|
testCompile project(path: ':modules:reindex')
|
2016-03-08 17:15:40 -05:00
|
|
|
}
|
|
|
|
|
2019-01-31 04:59:50 -05:00
|
|
|
forbiddenPatterns {
|
2019-11-14 06:01:23 -05:00
|
|
|
exclude '**/*.key'
|
|
|
|
exclude '**/*.pem'
|
|
|
|
exclude '**/*.p12'
|
|
|
|
exclude '**/*.jks'
|
2019-01-31 04:59:50 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
File caFile = project.file('src/test/resources/ssl/ca.p12')
|
|
|
|
|
2019-06-20 02:21:29 -04:00
|
|
|
testClusters.integTest {
|
2019-07-15 20:53:05 -04:00
|
|
|
testDistribution = 'DEFAULT'
|
2017-02-22 03:56:52 -05:00
|
|
|
// Whitelist reindexing from the local node so we can test it.
|
2019-06-20 02:21:29 -04:00
|
|
|
extraConfigFile 'http.key', file('src/test/resources/ssl/http.key')
|
|
|
|
extraConfigFile 'http.crt', file('src/test/resources/ssl/http.crt')
|
2019-01-31 04:59:50 -05:00
|
|
|
extraConfigFile 'ca.p12', caFile
|
2017-02-22 03:56:52 -05:00
|
|
|
setting 'reindex.remote.whitelist', '127.0.0.1:*'
|
2018-03-21 23:09:44 -04:00
|
|
|
setting 'xpack.security.enabled', 'true'
|
2017-03-02 12:01:05 -05:00
|
|
|
setting 'xpack.ml.enabled', 'false'
|
2018-02-12 14:57:04 -05:00
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
2019-01-31 04:59:50 -05:00
|
|
|
setting 'xpack.security.http.ssl.enabled', 'true'
|
|
|
|
setting 'xpack.security.http.ssl.certificate', 'http.crt'
|
|
|
|
setting 'xpack.security.http.ssl.key', 'http.key'
|
|
|
|
setting 'xpack.security.http.ssl.key_passphrase', 'http-password'
|
|
|
|
setting 'reindex.ssl.truststore.path', 'ca.p12'
|
|
|
|
setting 'reindex.ssl.truststore.password', 'password'
|
2019-05-20 09:45:36 -04:00
|
|
|
|
|
|
|
// Workaround for JDK-8212885
|
2020-03-23 18:30:10 -04:00
|
|
|
if (BuildParams.runtimeJavaVersion.isJava12Compatible() == false) {
|
|
|
|
setting 'reindex.ssl.supported_protocols', 'TLSv1.2'
|
2019-05-20 09:45:36 -04:00
|
|
|
}
|
|
|
|
|
2019-06-20 02:21:29 -04:00
|
|
|
extraConfigFile 'roles.yml', file('roles.yml')
|
|
|
|
user username: "test_admin", password: 'x-pack-test-password', role: "superuser"
|
|
|
|
user username: "powerful_user", password: 'x-pack-test-password', role: "superuser"
|
|
|
|
user username: "minimal_user", password: 'x-pack-test-password', role: "minimal"
|
|
|
|
user username: "minimal_with_task_user", password: 'x-pack-test-password', role: "minimal_with_task"
|
|
|
|
user username: "readonly_user", password: 'x-pack-test-password', role: "readonly"
|
|
|
|
user username: "dest_only_user", password: 'x-pack-test-password', role: "dest_only"
|
|
|
|
user username: "can_not_see_hidden_docs_user", password: 'x-pack-test-password', role: "can_not_see_hidden_docs"
|
|
|
|
user username: "can_not_see_hidden_fields_user", password: 'x-pack-test-password', role: "can_not_see_hidden_fields"
|
2016-03-08 17:15:40 -05:00
|
|
|
}
|