2018-10-23 05:06:46 -04:00
|
|
|
import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis
|
2018-08-29 10:43:40 -04:00
|
|
|
|
2018-07-20 17:03:58 -04:00
|
|
|
apply plugin: 'elasticsearch.build'
|
|
|
|
|
|
|
|
archivesBaseName = 'elasticsearch-security-cli'
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compileOnly "org.elasticsearch:elasticsearch:${version}"
|
2018-08-21 20:03:28 -04:00
|
|
|
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
|
|
|
|
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
2018-07-20 17:03:58 -04:00
|
|
|
compile 'org.bouncycastle:bcpkix-jdk15on:1.59'
|
2018-08-29 10:43:40 -04:00
|
|
|
compile 'org.bouncycastle:bcprov-jdk15on:1.59'
|
2018-07-20 17:03:58 -04:00
|
|
|
testImplementation 'com.google.jimfs:jimfs:1.1'
|
|
|
|
testCompile "junit:junit:${versions.junit}"
|
|
|
|
testCompile "org.hamcrest:hamcrest-all:${versions.hamcrest}"
|
|
|
|
testCompile 'org.elasticsearch:securemock:1.2'
|
|
|
|
testCompile "org.elasticsearch.test:framework:${version}"
|
|
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencyLicenses {
|
|
|
|
mapping from: /bc.*/, to: 'bouncycastle'
|
2018-07-24 11:53:04 -04:00
|
|
|
}
|
2018-08-13 14:27:06 -04:00
|
|
|
|
2018-08-29 10:43:40 -04:00
|
|
|
if (project.inFipsJvm) {
|
2018-08-13 14:27:06 -04:00
|
|
|
test.enabled = false
|
2018-08-29 10:43:40 -04:00
|
|
|
// Forbiden APIs non-portable checks fail because bouncy castle classes being used from the FIPS JDK since those are
|
|
|
|
// not part of the Java specification - all of this is as designed, so we have to relax this check for FIPS.
|
2018-10-23 05:06:46 -04:00
|
|
|
tasks.withType(CheckForbiddenApis) {
|
2018-08-29 10:43:40 -04:00
|
|
|
bundledSignatures -= "jdk-non-portable"
|
|
|
|
}
|
|
|
|
// FIPS JVM includes manny classes from bouncycastle which count as jar hell for the third party audit,
|
|
|
|
// rather than provide a long list of exclusions, disable the check on FIPS.
|
|
|
|
thirdPartyAudit.enabled = false
|
2018-08-21 20:03:28 -04:00
|
|
|
}
|