Skip to content

Conversation

donoghuc
Copy link
Member

Release notes

[rn:skip]

What does this PR do?

This PR implements the outcomes based on the comparison with ES container for FIPS config https://github.com/elastic/ingest-dev/issues/5320

  1. Remove unused java.policy config due to not using security manager
  2. Update conversion of default trust store (install from java-cacerts package and stop doing unused keystore)
  3. Superficial changes around entropy source, consisten numbering and capitalization

donoghuc added 5 commits July 17, 2025 09:51
LS is not configured with -Djava.security.manager enabled. Configuring it
does nothing.
The -BC config was introduced to try to prevent loading non fips BC jars shipped
with jruby. This config is harmless (though may not actually fully prevent BC
providers from being loaded). This commit simply makes the priority number more
consistent.
This commit updates the conversion of JKS to BCFKS for default trust store to
match ES. Specifically:

1. Install the java-cacerts package (instead of using defaults shipped with
java)
2. Only convert the default trust store (key store is non necessary)
@github-actions
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@mergify
Copy link
Contributor

mergify bot commented Jul 17, 2025

This pull request does not have a backport label. Could you fix it @donoghuc? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit.
  • If no backport is necessary, please add the backport-skip label

@donoghuc donoghuc added the backport-8.19 Automated backport to the 8.19 branch label Jul 17, 2025
make \
# CODEREVIEW: I think make, gcc and glibc-dev are all in build-base package if we want that
gcc \
java-cacerts \
Copy link
Member Author

Choose a reason for hiding this comment

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

Reviewer note:

When building actual artifacts (not relying on first installing jdk) https://github.com/elastic/logstash/pull/17839/files#diff-9ecee4391e8c9d8f8f79230e3bf688cfe285f2452a70c070b8eb10868ab98cf9R121 we set up an explicit symlink.

In this dockerfile for setting up testing env we dont need to because it is created when java-cacerts is installed:

bash-5.3# apk add --no-cache java-cacerts
fetch https://virtualapk.cgr.dev/6b3f08c31afeab18043305daebd64cf18e682273/sha256:e4c9ae0b40e5ed1cbc9385cc4fef0d20293ce84f1b3e38a4f205fcd0834b8a2e/chainguard/aarch64/APKINDEX.tar.gz
fetch https://virtualapk.cgr.dev/6b3f08c31afeab18043305daebd64cf18e682273/sha256:e4c9ae0b40e5ed1cbc9385cc4fef0d20293ce84f1b3e38a4f205fcd0834b8a2e/extra-packages/aarch64/APKINDEX.tar.gz
OK: 885 MiB in 91 packages
bash-5.3# ls -la $JAVA_HOME/lib/security/cacerts
lrwxrwxrwx    1 root     root            27 Jul 17 18:49 /usr/lib/jvm/java-21-openjdk/lib/security/cacerts -> /etc/ssl/certs/java/cacerts

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 17, 2025

@elastic-sonarqube
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@yaauie yaauie self-requested a review July 31, 2025 14:52
Copy link
Member

@yaauie yaauie left a comment

Choose a reason for hiding this comment

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

I went through these commit-by-commit. Each does what it says on the tin, and together they encompass the agreed-upon work.

👍🏼

@donoghuc donoghuc merged commit 591437c into elastic:main Jul 31, 2025
12 checks passed
mergify bot pushed a commit that referenced this pull request Jul 31, 2025
* Remove unused java.policy file

LS is not configured with -Djava.security.manager enabled. Configuring it
does nothing.

* Harmonize entropy source with ES

See https://github.com/elastic/ingest-dev/issues/5320 for details.

* Make capitalization consistent

* Change numbering for provider config

The -BC config was introduced to try to prevent loading non fips BC jars shipped
with jruby. This config is harmless (though may not actually fully prevent BC
providers from being loaded). This commit simply makes the priority number more
consistent.

* Standardize default trust store conversion with ES

This commit updates the conversion of JKS to BCFKS for default trust store to
match ES. Specifically:

1. Install the java-cacerts package (instead of using defaults shipped with
java)
2. Only convert the default trust store (key store is non necessary)

* Actually install java-cacerts

* Avoid error linking when dir exists

* When java is already installed apk-add java-cacerts already does the symlink

(cherry picked from commit 591437c)

# Conflicts:
#	docker/templates/Dockerfile.erb
donoghuc added a commit that referenced this pull request Jul 31, 2025
…17878)

* Standardization of FIPS Java config with ES (#17839)

* Remove unused java.policy file

LS is not configured with -Djava.security.manager enabled. Configuring it
does nothing.

* Harmonize entropy source with ES

See https://github.com/elastic/ingest-dev/issues/5320 for details.

* Make capitalization consistent

* Change numbering for provider config

The -BC config was introduced to try to prevent loading non fips BC jars shipped
with jruby. This config is harmless (though may not actually fully prevent BC
providers from being loaded). This commit simply makes the priority number more
consistent.

* Standardize default trust store conversion with ES

This commit updates the conversion of JKS to BCFKS for default trust store to
match ES. Specifically:

1. Install the java-cacerts package (instead of using defaults shipped with
java)
2. Only convert the default trust store (key store is non necessary)

* Actually install java-cacerts

* Avoid error linking when dir exists

* When java is already installed apk-add java-cacerts already does the symlink

(cherry picked from commit 591437c)

# Conflicts:
#	docker/templates/Dockerfile.erb

* Fix merge conflict

---------

Co-authored-by: Cas Donoghue <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.19 Automated backport to the 8.19 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants