2018-10-23 05:06:46 -04:00
|
|
|
import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis
|
2019-11-01 14:33:11 -04:00
|
|
|
import org.elasticsearch.gradle.info.BuildParams
|
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 {
|
2019-11-14 06:01:23 -05:00
|
|
|
compileOnly project(":server")
|
|
|
|
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
|
|
|
compile "org.bouncycastle:bcpkix-jdk15on:${versions.bouncycastle}"
|
|
|
|
compile "org.bouncycastle:bcprov-jdk15on:${versions.bouncycastle}"
|
|
|
|
testImplementation 'com.google.jimfs:jimfs:1.1'
|
|
|
|
testCompile project(":test:framework")
|
|
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
2018-07-20 17:03:58 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencyLicenses {
|
2019-11-14 06:01:23 -05:00
|
|
|
mapping from: /bc.*/, to: 'bouncycastle'
|
2018-07-24 11:53:04 -04:00
|
|
|
}
|
2018-08-13 14:27:06 -04:00
|
|
|
|
2020-01-14 05:24:21 -05:00
|
|
|
forbiddenPatterns {
|
|
|
|
exclude '**/*.p12'
|
|
|
|
exclude '**/*.jks'
|
|
|
|
}
|
|
|
|
|
2020-01-27 04:14:52 -05:00
|
|
|
if (BuildParams.inFipsJvm) {
|
|
|
|
test.enabled = false
|
|
|
|
testingConventions.enabled = false
|
|
|
|
// 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.
|
|
|
|
tasks.withType(CheckForbiddenApis) {
|
|
|
|
bundledSignatures -= "jdk-non-portable"
|
2019-11-14 06:01:23 -05:00
|
|
|
}
|
2020-01-27 04:14:52 -05:00
|
|
|
// FIPS JVM includes many 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
|
|
|
|
|
2019-11-14 06:01:23 -05:00
|
|
|
}
|