Skip to content

Commit 3587226

Browse files
authored
Enable minimal security for ES testing fixtures (#1738)
This PR updates the ES fixture in ES-Hadoop to enable security and use basic authentication within all the integration tests.
1 parent fddb11c commit 3587226

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

buildSrc/src/main/groovy/org/elasticsearch/hadoop/gradle/fixture/ElasticsearchFixturePlugin.groovy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ class ElasticsearchFixturePlugin implements Plugin<Project> {
100100
integTestCluster.setting("http.host", "localhost")
101101
// TODO: Remove this when this is the default in 7
102102
integTestCluster.systemProperty('es.http.cname_in_publish_address', 'true')
103+
// Minimal Security
104+
integTestCluster.setting('xpack.security.enabled', 'true')
105+
integTestCluster.keystore('bootstrap.password', 'password')
106+
integTestCluster.user(username: 'elastic-admin', password: 'elastic-password', role: 'superuser')
103107
}
104108

105109
// Also write a script to a file for use in tests

test/shared/src/main/resources/test.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ es.batch.size.bytes=1kb
1111
#es.nodes.client.only=true
1212
#es.nodes.wan.only=true
1313

14+
# Minimal Security
15+
es.net.http.auth.user=elastic-admin
16+
es.net.http.auth.pass=elastic-password
17+
1418
# put pressure on the bulk API
1519
es.batch.size.entries=3
1620
es.batch.write.retry.wait=1s

0 commit comments

Comments
 (0)