OpenSearch/elasticsearch/qa/shield-example-realm/build.gradle

40 lines
1.2 KiB
Groovy
Raw Normal View History

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 {
provided project(path: ':x-plugins:elasticsearch:x-pack', configuration: 'runtime')
}
compileJava.options.compilerArgs << "-Xlint:-rawtypes"
//compileTestJava.options.compilerArgs << "-Xlint:-rawtypes"
integTest {
cluster {
plugin 'x-pack', project(':x-plugins:elasticsearch:x-pack')
// TODO: these should be settings?
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'
setupCommand 'setupDummyUser',
'bin/xpack/esusers', 'useradd', 'test_user', '-p', 'changeme', '-r', 'admin'
waitCondition = { node, ant ->
File tmpFile = new File(node.cwd, 'wait.success')
ant.get(src: "http://${node.httpUri()}",
dest: tmpFile.toString(),
username: 'test_user',
password: 'changeme',
ignoreerrors: true,
retries: 10)
return tmpFile.exists()
}
}
}