Skip to content

Add FIPS build tooling #17907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 2, 2025
Merged

Conversation

beanuwave
Copy link
Contributor

@beanuwave beanuwave commented Apr 11, 2025

Description

Provides the additional build tooling to test & build OS in FIPS JVM with -Pcrypto.standard=FIPS-140-3or the (deprecated) -Ptests.fips.enabled=true parameter. Code changes required to run successfully in FIPS mode are not included in this commit, they will be addressed in separate upcoming PRs.

Note:
The codecov report may appear inaccurate. Tests for the new Randomness logic exist but are only executed when the build is run with the new FIPS parameters enabled.

Related Issues

RFC

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Contributor

❌ Gradle check result for 0bd8f13: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@beanuwave beanuwave force-pushed the fips_build_tooling branch from 0bd8f13 to e128e8a Compare April 28, 2025 14:48
Copy link
Contributor

❌ Gradle check result for e128e8a: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@beanuwave beanuwave force-pushed the fips_build_tooling branch 2 times, most recently from cabd094 to 3aae4ce Compare April 28, 2025 16:03
Copy link
Contributor

❌ Gradle check result for 3aae4ce: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@beanuwave beanuwave force-pushed the fips_build_tooling branch from 3aae4ce to abfb83a Compare April 28, 2025 17:48
Copy link
Contributor

❌ Gradle check result for abfb83a: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

✅ Gradle check result for 11cf500: SUCCESS

Copy link

codecov bot commented Apr 29, 2025

Codecov Report

Attention: Patch coverage is 55.55556% with 28 lines in your changes missing coverage. Please review.

Project coverage is 72.70%. Comparing base (d52cefa) to head (278f287).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...rc/main/java/org/opensearch/common/Randomness.java 34.78% 14 Missing and 1 partial ⚠️
.../main/java/org/opensearch/bootstrap/Bootstrap.java 0.00% 4 Missing ⚠️
...rg/opensearch/gradle/OpenSearchTestBasePlugin.java 0.00% 3 Missing ⚠️
...opensearch/gradle/testclusters/OpenSearchNode.java 0.00% 2 Missing ⚠️
.../main/java/org/opensearch/common/ssl/PemUtils.java 80.00% 0 Missing and 2 partials ⚠️
.../opensearch/gradle/info/GlobalBuildInfoPlugin.java 66.66% 1 Missing ⚠️
.../opensearch/bootstrap/SecurityProviderManager.java 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17907      +/-   ##
============================================
- Coverage     72.74%   72.70%   -0.04%     
+ Complexity    67767    67722      -45     
============================================
  Files          5497     5499       +2     
  Lines        311815   311864      +49     
  Branches      45261    45271      +10     
============================================
- Hits         226822   226733      -89     
- Misses        66504    66618     +114     
- Partials      18489    18513      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@beanuwave beanuwave force-pushed the fips_build_tooling branch from 11cf500 to 81729ad Compare May 6, 2025 11:58
Copy link
Contributor

github-actions bot commented May 6, 2025

❌ Gradle check result for 81729ad: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@beanuwave beanuwave force-pushed the fips_build_tooling branch from 81729ad to c3cd834 Compare May 6, 2025 13:11
Copy link
Contributor

github-actions bot commented May 6, 2025

❌ Gradle check result for c3cd834: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@beanuwave beanuwave force-pushed the fips_build_tooling branch from c3cd834 to df45869 Compare May 6, 2025 13:37
Copy link
Contributor

github-actions bot commented May 6, 2025

✅ Gradle check result for df45869: SUCCESS

@beanuwave beanuwave marked this pull request as ready for review May 7, 2025 16:16
@beanuwave beanuwave requested a review from a team as a code owner May 7, 2025 16:16
@beanuwave
Copy link
Contributor Author

To include FIPS test coverage in the build, an additional test suite is required. Thankfully, @cwperks has already provided a skeleton for it - which we’ll extend and integrate shortly.

@prakashsatpathy
Copy link

Hi @beanuwave ,
As mentioned in the PR description, there are still code change required to run in FIPS enable mode.
I believe the code changes required are in this PR, #14912.
Can you please correct me on this?
For FIPS mode, we need to convert the keystore and truststore to BCFKS. And all other changes are there.
And is there any plan to progress the 14912 PR?

@beanuwave
Copy link
Contributor Author

Hi @beanuwave , As mentioned in the PR description, there are still code change required to run in FIPS enable mode. I believe the code changes required are in this PR, #14912. Can you please correct me on this? For FIPS mode, we need to convert the keystore and truststore to BCFKS. And all other changes are there. And is there any plan to progress the 14912 PR?

Hi @prakashsatpathy you are absolutely right - the changes from this PR need to be merged into #14912 . Although it's stale and won't be reviewed anymore, we’re keeping it open as a backreference and to serve as a code diff for upcoming PRs.

Copy link
Contributor

❌ Gradle check result for 634cc83: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@beanuwave beanuwave force-pushed the fips_build_tooling branch from 634cc83 to 1b16b34 Compare May 27, 2025 07:19
Copy link
Contributor

✅ Gradle check result for 1b16b34: SUCCESS

@beanuwave
Copy link
Contributor Author

Thank you @beanuwave , a few minor cleanups and we should be good to go!

@reta Sounds good! I've addressed two of your comments in the latest change — please take a look.

@beanuwave beanuwave force-pushed the fips_build_tooling branch from 1b16b34 to 3a74481 Compare May 28, 2025 08:00
Copy link
Contributor

✅ Gradle check result for 3a74481: SUCCESS

iigonin and others added 11 commits June 2, 2025 10:47
Signed-off-by: Igonin <[email protected]>
Co-authored-by: Benny Goerzig <[email protected]>
Co-authored-by: Karsten Schnitter <[email protected]>
Co-authored-by: Kai Sternad <[email protected]>

# Conflicts:
#	CHANGELOG.md

# Conflicts:
#	CHANGELOG.md
…ls/cli/plugin/InstallPluginCommandTests.java

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Iwan Igonin <[email protected]>
…Manager.java

Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Iwan Igonin <[email protected]>
…SSWORD when running docker tests.

Signed-off-by: Igonin <[email protected]>
Co-authored-by: Benny Goerzig <[email protected]>
Co-authored-by: Karsten Schnitter <[email protected]>
Co-authored-by: Kai Sternad <[email protected]>
Signed-off-by: Igonin <[email protected]>
Co-authored-by: Benny Goerzig <[email protected]>
Co-authored-by: Karsten Schnitter <[email protected]>
Co-authored-by: Kai Sternad <[email protected]>
Signed-off-by: Igonin <[email protected]>
Co-authored-by: Benny Goerzig <[email protected]>
Co-authored-by: Karsten Schnitter <[email protected]>
Co-authored-by: Kai Sternad <[email protected]>
Signed-off-by: Igonin <[email protected]>
Co-authored-by: Benny Goerzig <[email protected]>
Co-authored-by: Karsten Schnitter <[email protected]>
Co-authored-by: Kai Sternad <[email protected]>
Signed-off-by: Igonin <[email protected]>
Co-authored-by: Benny Goerzig <[email protected]>
Co-authored-by: Karsten Schnitter <[email protected]>
Co-authored-by: Kai Sternad <[email protected]>
Signed-off-by: Igonin <[email protected]>
Co-authored-by: Benny Goerzig <[email protected]>
Co-authored-by: Karsten Schnitter <[email protected]>
Co-authored-by: Kai Sternad <[email protected]>
Signed-off-by: Igonin <[email protected]>
Co-authored-by: Benny Goerzig <[email protected]>
Co-authored-by: Karsten Schnitter <[email protected]>
Co-authored-by: Kai Sternad <[email protected]>
Signed-off-by: Igonin <[email protected]>
Co-authored-by: Benny Goerzig <[email protected]>
Co-authored-by: Karsten Schnitter <[email protected]>
Co-authored-by: Kai Sternad <[email protected]>

# Conflicts:
#	server/src/main/java/org/opensearch/common/Randomness.java
@beanuwave beanuwave force-pushed the fips_build_tooling branch from 3a74481 to 36da087 Compare June 2, 2025 08:48
Copy link
Contributor

github-actions bot commented Jun 2, 2025

❌ Gradle check result for 36da087: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@beanuwave beanuwave force-pushed the fips_build_tooling branch from 36da087 to 9452133 Compare June 2, 2025 09:43
Copy link
Contributor

github-actions bot commented Jun 2, 2025

❌ Gradle check result for 9452133: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

…er#removeNonCompliantFipsProviders

Signed-off-by: Igonin <[email protected]>
Co-authored-by: Benny Goerzig <[email protected]>
Co-authored-by: Karsten Schnitter <[email protected]>
Co-authored-by: Kai Sternad <[email protected]>
@beanuwave beanuwave force-pushed the fips_build_tooling branch from 9452133 to 278f287 Compare June 2, 2025 10:32
Copy link
Contributor

github-actions bot commented Jun 2, 2025

✅ Gradle check result for 278f287: SUCCESS

@reta reta merged commit 32cd2e6 into opensearch-project:main Jun 2, 2025
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants