2015-11-24 20:10:46 -05:00
|
|
|
apply plugin: 'elasticsearch.esplugin'
|
|
|
|
|
|
|
|
esplugin {
|
|
|
|
description 'a very basic implementation of a custom realm to validate it works'
|
|
|
|
classname 'org.elasticsearch.example.ExampleRealmPlugin'
|
|
|
|
isolated false
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2015-11-25 18:28:45 -05:00
|
|
|
provided project(path: ':x-plugins:elasticsearch:x-pack', configuration: 'runtime')
|
2015-11-24 20:10:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
compileJava.options.compilerArgs << "-Xlint:-rawtypes"
|
|
|
|
//compileTestJava.options.compilerArgs << "-Xlint:-rawtypes"
|
|
|
|
|
|
|
|
integTest {
|
|
|
|
cluster {
|
2015-11-25 18:28:45 -05:00
|
|
|
plugin 'x-pack', project(':x-plugins:elasticsearch:x-pack')
|
2015-11-24 20:10:46 -05:00
|
|
|
// TODO: these should be settings?
|
2016-03-15 20:01:01 -04:00
|
|
|
setting 'shield.authc.realms.custom.order', '0'
|
|
|
|
setting 'shield.authc.realms.custom.type', 'custom'
|
|
|
|
setting 'shield.authc.realms.esusers.order', '1'
|
|
|
|
setting 'shield.authc.realms.esusers.type', 'esusers'
|
2015-11-24 20:10:46 -05:00
|
|
|
|
|
|
|
setupCommand 'setupDummyUser',
|
2016-02-05 05:13:30 -05:00
|
|
|
'bin/xpack/esusers', 'useradd', 'test_user', '-p', 'changeme', '-r', 'admin'
|
2015-11-24 20:10:46 -05:00
|
|
|
waitCondition = { node, ant ->
|
|
|
|
File tmpFile = new File(node.cwd, 'wait.success')
|
2015-12-11 21:23:01 -05:00
|
|
|
ant.get(src: "http://${node.httpUri()}",
|
2015-11-24 20:10:46 -05:00
|
|
|
dest: tmpFile.toString(),
|
|
|
|
username: 'test_user',
|
|
|
|
password: 'changeme',
|
|
|
|
ignoreerrors: true,
|
|
|
|
retries: 10)
|
|
|
|
return tmpFile.exists()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|