2018-10-23 12:06:46 +03:00
|
|
|
import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis
|
2019-11-01 11:33:11 -07:00
|
|
|
import org.elasticsearch.gradle.info.BuildParams
|
2018-08-29 17:43:40 +03:00
|
|
|
|
2018-07-21 00:03:58 +03:00
|
|
|
apply plugin: 'elasticsearch.build'
|
|
|
|
|
|
|
|
archivesBaseName = 'elasticsearch-security-cli'
|
|
|
|
|
|
|
|
dependencies {
|
2019-11-14 11:01:23 +00: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-07 23:20:17 -07: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 11:01:23 +00:00
|
|
|
testCompile project(":test:framework")
|
|
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
2018-07-21 00:03:58 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencyLicenses {
|
2019-11-14 11:01:23 +00:00
|
|
|
mapping from: /bc.*/, to: 'bouncycastle'
|
2018-07-24 11:53:04 -04:00
|
|
|
}
|
2018-08-13 21:27:06 +03:00
|
|
|
|
2020-01-14 21:24:21 +11:00
|
|
|
forbiddenPatterns {
|
|
|
|
exclude '**/*.p12'
|
|
|
|
exclude '**/*.jks'
|
|
|
|
}
|
|
|
|
|
2020-02-18 14:11:34 +02:00
|
|
|
thirdPartyAudit {
|
|
|
|
ignoreMissingClasses(
|
|
|
|
// Used in org.bouncycastle.pqc.crypto.qtesla.QTeslaKeyEncodingTests
|
|
|
|
'junit.framework.Assert',
|
|
|
|
'junit.framework.TestCase'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2020-01-27 11:14:52 +02:00
|
|
|
if (BuildParams.inFipsJvm) {
|
|
|
|
test.enabled = false
|
2020-02-10 07:38:59 +02:00
|
|
|
jarHell.enabled = false
|
2020-01-27 11:14:52 +02: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 13:23:55 -07:00
|
|
|
tasks.withType(CheckForbiddenApis).configureEach {
|
2020-01-27 11:14:52 +02:00
|
|
|
bundledSignatures -= "jdk-non-portable"
|
2019-11-14 11:01:23 +00:00
|
|
|
}
|
|
|
|
}
|