Skip to content
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2df9885
Add build-tooling to run in the FIPS environment
iigonin Aug 5, 2025
5df7ee7
replace java.util with lfs4j logger; use AccessController to read cac…
iigonin Aug 6, 2025
b08999b
replace fallback mechanism with cluster-setting to determine the stra…
iigonin Aug 14, 2025
69d46e3
cleanup changelog.md
iigonin Aug 14, 2025
8cf332c
add default enum value; extend MultiProviderTrustStoreHandler test-class
iigonin Aug 15, 2025
738091b
Merge branch 'main' into HEAD
iigonin Aug 15, 2025
630e804
fix :server:forbiddenApisTest
iigonin Aug 15, 2025
60728d6
configure docker and testClusters builds to use generated truststore
iigonin Aug 19, 2025
a9a1551
Merge branch 'main' into fips_build_tooling2
iigonin Aug 19, 2025
814af0a
Merge branch 'main' into HEAD
iigonin Aug 22, 2025
0bbdf6e
add more unit tests
iigonin Aug 22, 2025
6014c2c
replace MultiProviderTrustStoreHandler with demo script
iigonin Sep 22, 2025
9f3c9c2
Merge branch 'main' into fips_build_tooling2
iigonin Oct 9, 2025
fb177e3
fix CHANGELOG; update CLI's build.gradle; write additional docu
iigonin Oct 10, 2025
32189ea
add more tests
iigonin Oct 12, 2025
b87e926
remove '--enable-native-access=ALL-UNNAMED'
iigonin Oct 12, 2025
d4bac69
Merge branch 'main' into fips_build_tooling2
iigonin Oct 13, 2025
a7fc277
apply BouncyCastleThreadFilter
iigonin Oct 14, 2025
e282c03
Merge branch 'main' into fips_build_tooling2
iigonin Oct 14, 2025
31aaff3
replace BuildParams.inFipsJvm with getter
iigonin Oct 14, 2025
a5b935f
make use of 'testFipsRuntimeOnly' inside StandaloneRestTestPlugin; ov…
iigonin Oct 15, 2025
4368d76
use BCFIPS_RNG; make java.util.Scanner test-friendly; write additiona…
iigonin Oct 16, 2025
88c630c
get SecureRandom from server-module
iigonin Oct 20, 2025
f826d03
Merge branch 'main' into fips_build_tooling2
iigonin Oct 20, 2025
7cfeb72
add '--password option' to CLI
iigonin Oct 21, 2025
ea101e1
increase tests coverage for FipsTrustStoreValidator
iigonin Oct 22, 2025
2adc90f
Merge branch 'main' into fips_build_tooling2
iigonin Oct 22, 2025
6f8eb2f
fix teardown on SecurityProviderManagerTests
iigonin Oct 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Expand fetch phase profiling to support inner hits and top hits aggregation phases ([##18936](https://github.com/opensearch-project/OpenSearch/pull/18936))
- Add temporal routing processors for time-based document routing ([#18920](https://github.com/opensearch-project/OpenSearch/issues/18920))
- The dynamic mapping parameter supports false_allow_templates ([#19065](https://github.com/opensearch-project/OpenSearch/pull/19065))
- Add build-tooling to run in the FIPS environment ([#18921](https://github.com/opensearch-project/OpenSearch/pull/18921))
- Add a toBuilder method in EngineConfig to support easy modification of configs([#19054](https://github.com/opensearch-project/OpenSearch/pull/19054))
- Add StoreFactory plugin interface for custom Store implementations([#19091](https://github.com/opensearch-project/OpenSearch/pull/19091))
- Add a dynamic setting to change skip_cache_factor and min_frequency for querycache ([#18351](https://github.com/opensearch-project/OpenSearch/issues/18351))
Expand Down
7 changes: 6 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,11 @@ gradle.projectsEvaluated {
jvmArgs += ["-javaagent:" + project(':libs:agent-sm:agent').jar.archiveFile.get()]
}
if (BuildParams.inFipsJvm) {
task.jvmArgs += ["-Dorg.bouncycastle.fips.approved_only=true"]
def fipsSecurityFile = project.rootProject.file('distribution/src/config/fips_java.security')
task.jvmArgs += [
"-Dorg.bouncycastle.fips.approved_only=true",
"-Djava.security.properties=${fipsSecurityFile}"
]
}
}
}
Expand Down Expand Up @@ -695,6 +699,7 @@ allprojects {
testClusters.configureEach {
if (BuildParams.inFipsJvm) {
keystorePassword 'notarealpasswordphrase'
setting 'cluster.fips.truststore.source', 'GENERATED'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
package org.opensearch.gradle.test

import groovy.transform.CompileStatic
import org.gradle.api.artifacts.VersionCatalog
import org.gradle.api.artifacts.VersionCatalogsExtension
import org.opensearch.gradle.OpenSearchJavaPlugin
import org.opensearch.gradle.ExportOpenSearchBuildResourcesTask
import org.opensearch.gradle.RepositoriesSetupPlugin
Expand Down Expand Up @@ -92,6 +94,10 @@ class StandaloneRestTestPlugin implements Plugin<Project> {
// create a compileOnly configuration as others might expect it
project.configurations.create("compileOnly")
project.dependencies.add('testImplementation', project.project(':test:framework'))
if (BuildParams.inFipsJvm) {
VersionCatalog libs = project.extensions.getByType(VersionCatalogsExtension).named("libs")
project.dependencies.add('testImplementation', libs.findBundle("bouncycastle").get())
}

EclipseModel eclipse = project.extensions.getByType(EclipseModel)
eclipse.classpath.sourceSets = [testSourceSet]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,18 @@ static void setupDependencies(Project project, SourceSet sourceSet) {
);
}

if (BuildParams.isInFipsJvm()) {
project.getDependencies()
.add(
sourceSet.getImplementationConfigurationName(),
"org.bouncycastle:bc-fips:" + VersionProperties.getVersions().get("bouncycastle_jce")
);
project.getDependencies()
.add(
sourceSet.getImplementationConfigurationName(),
"org.bouncycastle:bctls-fips:" + VersionProperties.getVersions().get("bouncycastle_tls")
);
}
}

}
1 change: 1 addition & 0 deletions qa/fips-compliance/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ afterEvaluate {
// configure cluster to start in FIPS JVM
javaRestTest {
keystorePassword 'notarealpasswordphrase'
setting 'cluster.fips.truststore.source', 'GENERATED'
configurations.bcFips.resolve().each { jarFile ->
extraJarFile jarFile
}
Expand Down
5 changes: 3 additions & 2 deletions qa/remote-clusters/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ tasks.named("preProcessFixture").configure {

dockerCompose {
tcpPortsToIgnoreWhenWaiting = [9600, 9601]
useComposeFiles = ['docker-compose.yml']
def composeFiles = ['docker-compose.yml']
if (BuildParams.inFipsJvm) {
environment.put("KEYSTORE_PASSWORD", "notarealpasswordphrase")
composeFiles.add('docker-compose.fips.yml')
}
useComposeFiles = composeFiles
}

def createAndSetWritable(Object... locations) {
Expand Down
9 changes: 9 additions & 0 deletions qa/remote-clusters/docker-compose.fips.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
opensearch-1:
environment:
KEYSTORE_PASSWORD: notarealpasswordphrase
cluster.fips.truststore.source: GENERATED
opensearch-2:
environment:
KEYSTORE_PASSWORD: notarealpasswordphrase
cluster.fips.truststore.source: GENERATED
2 changes: 0 additions & 2 deletions qa/remote-clusters/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ services:
- cluster.routing.allocation.disk.watermark.high=1b
- cluster.routing.allocation.disk.watermark.flood_stage=1b
- node.store.allow_mmap=false
- "KEYSTORE_PASSWORD=${KEYSTORE_PASSWORD}"
volumes:
- ./build/repo:/tmp/opensearch-repo
- ./build/logs/1:/usr/share/opensearch/logs
Expand Down Expand Up @@ -51,7 +50,6 @@ services:
- cluster.routing.allocation.disk.watermark.high=1b
- cluster.routing.allocation.disk.watermark.flood_stage=1b
- node.store.allow_mmap=false
- "KEYSTORE_PASSWORD=${KEYSTORE_PASSWORD}"
volumes:
- ./build/repo:/tmp/opensearch-repo
- ./build/logs/2:/usr/share/opensearch/logs
Expand Down
5 changes: 3 additions & 2 deletions qa/wildfly/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ preProcessFixture {
}

dockerCompose {
useComposeFiles = ['docker-compose.yml']
def composeFiles = ['docker-compose.yml']
if (BuildParams.inFipsJvm) {
environment.put("KEYSTORE_PASSWORD", "notarealpasswordphrase")
composeFiles.add('docker-compose.fips.yml')
}
useComposeFiles = composeFiles
}

tasks.register("integTest", TestTask) {
Expand Down
5 changes: 5 additions & 0 deletions qa/wildfly/docker-compose.fips.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
services:
opensearch:
environment:
KEYSTORE_PASSWORD: notarealpasswordphrase
cluster.fips.truststore.source: GENERATED
1 change: 0 additions & 1 deletion qa/wildfly/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ services:
opensearch:
image: opensearch:test
environment:
KEYSTORE_PASSWORD: ${KEYSTORE_PASSWORD}
discovery.type: single-node
ulimits:
memlock:
Expand Down
2 changes: 2 additions & 0 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ dependencies {
exclude group: 'org.opensearch', module: 'server'
}
testFipsRuntimeOnly "org.bouncycastle:bc-fips:${versions.bouncycastle_jce}"
testFipsRuntimeOnly "org.bouncycastle:bctls-fips:${versions.bouncycastle_tls}"
testFipsRuntimeOnly "org.bouncycastle:bcutil-fips:${versions.bouncycastle_util}"
}

tasks.withType(JavaCompile).configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ private void setup(boolean addShutdownHook, Environment environment) throws Boot
if ("FIPS-140-3".equals(cryptoStandard) || "true".equalsIgnoreCase(System.getProperty("org.bouncycastle.fips.approved_only"))) {
LogManager.getLogger(Bootstrap.class).info("running in FIPS-140-3 mode");
SecurityProviderManager.removeNonCompliantFipsProviders();
MultiProviderTrustStoreHandler.configureTrustStore(settings, environment.tmpDir(), Path.of(System.getProperty("java.home")));
}

// initialize probes before the security manager is installed
Expand Down
Loading
Loading