mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-07 21:48:39 +00:00
Currently forbidden apis accounts for 800+ tasks in the build. These tasks are aggressively created by the plugin. In forbidden apis 3.0, we will get task avoidance (https://github.com/policeman-tools/forbidden-apis/pull/162), but we need to ourselves use the same task avoidance mechanisms to not trigger these task creations. This commit does that for our foribdden apis usages, in preparation for upgrading to 3.0 when it is released.
49 lines
1.5 KiB
Groovy
49 lines
1.5 KiB
Groovy
import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis
|
|
import org.elasticsearch.gradle.info.BuildParams
|
|
|
|
apply plugin: 'elasticsearch.build'
|
|
|
|
archivesBaseName = 'elasticsearch-security-cli'
|
|
|
|
dependencies {
|
|
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') {
|
|
// 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'
|
|
testCompile project(":test:framework")
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
}
|
|
|
|
dependencyLicenses {
|
|
mapping from: /bc.*/, to: 'bouncycastle'
|
|
}
|
|
|
|
forbiddenPatterns {
|
|
exclude '**/*.p12'
|
|
exclude '**/*.jks'
|
|
}
|
|
|
|
thirdPartyAudit {
|
|
ignoreMissingClasses(
|
|
// Used in org.bouncycastle.pqc.crypto.qtesla.QTeslaKeyEncodingTests
|
|
'junit.framework.Assert',
|
|
'junit.framework.TestCase'
|
|
)
|
|
}
|
|
|
|
if (BuildParams.inFipsJvm) {
|
|
test.enabled = false
|
|
jarHell.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).configureEach {
|
|
bundledSignatures -= "jdk-non-portable"
|
|
}
|
|
}
|