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}"
|
2020-04-08 02:20:17 -04:00
|
|
|
testImplementation('com.google.jimfs:jimfs:1.1') {
|
|
|
|
// this is provided by the runtime classpath, from the security project
|
|
|
|
exclude group: 'com.google.guava', module: 'guava'
|
|
|
|
}
|
|
|
|
testRuntimeOnly 'com.google.guava:guava:19.0'
|
2019-11-14 06:01:23 -05:00
|
|
|
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-02-18 07:11:34 -05:00
|
|
|
thirdPartyAudit {
|
|
|
|
ignoreMissingClasses(
|
|
|
|
// Used in org.bouncycastle.pqc.crypto.qtesla.QTeslaKeyEncodingTests
|
|
|
|
'junit.framework.Assert',
|
|
|
|
'junit.framework.TestCase'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2020-01-27 04:14:52 -05:00
|
|
|
if (BuildParams.inFipsJvm) {
|
|
|
|
test.enabled = false
|
2020-02-10 00:38:59 -05:00
|
|
|
jarHell.enabled = false
|
2020-01-27 04:14:52 -05:00
|
|
|
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.
|
2020-04-15 16:23:55 -04:00
|
|
|
tasks.withType(CheckForbiddenApis).configureEach {
|
2020-01-27 04:14:52 -05:00
|
|
|
bundledSignatures -= "jdk-non-portable"
|
2019-11-14 06:01:23 -05:00
|
|
|
}
|
|
|
|
}
|