Skip to content

FIPS 140-3 support with BC FIPS 2.0.x libraries#139319

Merged
ebarlas merged 20 commits intoelastic:mainfrom
ebarlas:bc-fips-140-3-no-hw-accel
Dec 19, 2025
Merged

FIPS 140-3 support with BC FIPS 2.0.x libraries#139319
ebarlas merged 20 commits intoelastic:mainfrom
ebarlas:bc-fips-140-3-no-hw-accel

Conversation

@ebarlas
Copy link
Copy Markdown
Contributor

@ebarlas ebarlas commented Dec 10, 2025

This PR has comprehensive changes for the addition of FIPS 140-3 compliance alongside existing FIPS 140-2 compliance.

Summary

Compliance Testing

  • Updated build-tools-internal/src/main/groovy/elasticsearch.fips.gradle to include FIPS 140-3 testing mode
  • Retained tests.fips.enabled Gradle build param for activating FIPS testing
  • Added tests.fips.mode Gradle build param with default value 140-2
  • With tests.fips.mode=140-3, BC 2.0.x JARs are configured

Docker Image

  • Parameterized Bouncy Castle JAR file in distribution/docker/src/docker/dockerfiles/cloud_ess_fips/Dockerfile for FIPS 140-3
  • Added docker.fips.version Gradle build property to distribution/docker/build.gradle
  • With docker.fips.version=140-3, BC 2.0.x JARs are included in the Docker image

Buildkite

  • Added CI build variants for parts 1 to 6, activated with GitHub PR label test-fips-140-3

ES Launch Verification

  • Added support for <name>:<version> format for xpack.security.fips_mode.required_providers setting
  • If the value contains a colon, it is interpreted as name-version format (e.g. bcfips:2*)
  • The version is interpreted as a simple wildcard pattern (e.g. 2*)
  • If a name-version value is provided, the provider name and the provider version are both verified

Test Exclusions

  • plugin-cli tests are excluded in FIPS mode since BC FIPS versions are no longer aligned

@ebarlas ebarlas force-pushed the bc-fips-140-3-no-hw-accel branch from 82479bb to e41d870 Compare December 10, 2025 19:51
@ebarlas ebarlas changed the title Initial FIPS 140-3 support with BC FIPS 2.0.x libraries FIPS 140-3 support with BC FIPS 2.0.x libraries Dec 15, 2025
@ebarlas ebarlas marked this pull request as ready for review December 15, 2025 16:58
@ebarlas ebarlas requested review from a team as code owners December 15, 2025 16:58
@ebarlas ebarlas added :Security/Security Security issues without another label Team:Security Meta label for security team labels Dec 15, 2025
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-security (Team:Security)

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @ebarlas, I've created a changelog YAML for you.

@mark-vieira mark-vieira added the :Delivery/Build Build or test infrastructure label Dec 15, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Delivery Meta label for Delivery team label Dec 15, 2025
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

Copy link
Copy Markdown
Contributor

@jfreden jfreden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks great! I just have a comment on testing.

Copy link
Copy Markdown
Contributor

@jfreden jfreden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ebarlas ebarlas merged commit 244ac29 into elastic:main Dec 19, 2025
47 checks passed
szybia added a commit to szybia/elasticsearch that referenced this pull request Dec 19, 2025
* upstream/main: (25 commits)
  Add spec for project routing CRUD REST API endpoints (elastic#139634)
  Implement AllSupportedFIeldsTestCase for TDigest (elastic#139744)
  Mute elastic#139802 (elastic#139803)
  fix(logsdb): batch bulk indexing to prevent OOM in challenge tests (elastic#139770)
  Documentation for semantic_text auto pre-filtering (elastic#139749)
  Always do bulk scoring for rescoring when possible (elastic#139777)
  Optimize script sorts that do not require query scores (elastic#139748)
  Bump versions after 9.1.9 release
  Update branches.json for 9.1.9 release
  Bump versions after 9.2.3 release
  Prune changelogs after 8.19.9 release
  Bump versions after 8.19.9 release
  Update branches.json for 8.19.9 release
  Finalize docs for v9.2.3 release (elastic#139795)
  ESQL: Added timezone support to date_format and date_parse (elastic#138517)
  Update branches.json for 9.2.3 release
  Finalize docs for v9.1.9 release (elastic#139796)
  Switch inline stats to GA in docs (elastic#139753)
  Validate license in CPS (elastic#139105)
  FIPS 140-3 support with BC FIPS 2.0.x (elastic#139319)
  ...
@@ -0,0 +1,12 @@
config:
allow-labels:
- test-fips-140-3
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should just be test-fips. And we should run against both fips versions when applied.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to add coverage to our periodic pipelines as in

and
- label: "{{matrix.ES_RUNTIME_JAVA}} / {{matrix.GRADLE_TASK}} / java-fips-matrix"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a separate follow-up PR for that: #139909

ebarlas added a commit to ebarlas/elasticsearch that referenced this pull request Jan 14, 2026
Comprehensive changes for the addition of FIPS 140-3 compliance
with Bouncy Castle 2.0.x:

- Testing with BC FIPS 2.0.x activated with Gradle build property
- FIPS Docker image activated with Gradle build property
- ES launch verification of BC FIPS provider
- Buildkite jobs activated with test-fips-140-3 label
ebarlas added a commit that referenced this pull request Jan 20, 2026
1. Update plugin-cli tool to isolate BC (#138949)
- Introduce bc sub-project library to encapsulate BC dependencies
and shading. Update plugin-cli to use this new library.

2. FIPS 140-3 support with BC FIPS 2.0.x (#139319)
- Comprehensive changes for the addition of FIPS 140-3 compliance
with Bouncy Castle 2.0.x
- Testing with BC FIPS 2.0.x activated with Gradle build property
- FIPS Docker image activated with Gradle build property
- ES launch verification of BC FIPS provider
- Buildkite jobs activated with test-fips-140-3 label

3. Periodic FIPS 140-3 buildkite pipelines (#139909)
- Add periodic FIPS 140-3 buildkite pipelines
- Use test-fips allow-label for CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Delivery/Build Build or test infrastructure >enhancement :Security/Security Security issues without another label Team:Delivery Meta label for Delivery team Team:Security Meta label for security team test-fips-140-3 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants