-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add fips config to jvm.options for observabilitySRE #17958
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
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -115,6 +115,15 @@ RUN mkdir -p /usr/share/logstash/config/security | |||||||||||||||
RUN cp /usr/share/logstash/x-pack/distributions/internal/observabilitySRE/config/security/java.security /usr/share/logstash/config/security/ && \ | ||||||||||||||||
chown --recursive logstash:root /usr/share/logstash/config/security/ | ||||||||||||||||
|
||||||||||||||||
# Copy additional JVM options and append to existing jvm.options | ||||||||||||||||
RUN cp /usr/share/logstash/x-pack/distributions/internal/observabilitySRE/config/fips-jvm.options /tmp/fips-jvm.options && \ | ||||||||||||||||
chown logstash:root /tmp/fips-jvm.options | ||||||||||||||||
# echos are for ensuring that the file ends with a newline | ||||||||||||||||
RUN echo "" >> /usr/share/logstash/config/jvm.options && \ | ||||||||||||||||
echo "" >> /usr/share/logstash/config/jvm.options && \ | ||||||||||||||||
cat /tmp/fips-jvm.options >> /usr/share/logstash/config/jvm.options && \ | ||||||||||||||||
|
RUN echo "" >> /usr/share/logstash/config/jvm.options && \ | |
echo "" >> /usr/share/logstash/config/jvm.options && \ | |
cat /tmp/fips-jvm.options >> /usr/share/logstash/config/jvm.options && \ | |
RUN ( \ | |
echo ""; echo ""; \ | |
cat /tmp/fips-jvm.options \ | |
) >> /usr/share/logstash/config/jvm.options && \ |
9 changes: 9 additions & 0 deletions
9
x-pack/distributions/internal/observabilitySRE/config/fips-jvm.options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# FIPS config to be appended to /usr/share/logstash/config/jvm.options | ||
-Djava.security.properties=/usr/share/logstash/config/security/java.security | ||
-Djavax.net.ssl.trustStore=/usr/share/logstash/config/security/cacerts.bcfks | ||
-Djavax.net.ssl.trustStoreType=BCFKS | ||
-Djavax.net.ssl.trustStoreProvider=BCFIPS | ||
-Djavax.net.ssl.trustStorePassword=changeit | ||
-Dssl.KeyManagerFactory.algorithm=PKIX | ||
-Dssl.TrustManagerFactory.algorithm=PKIX | ||
-Dorg.bouncycastle.fips.approved_only=true |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 is there a reason we still set
LS_JAVA_OPTS
, if we are injecting the same settings into the config file? This means that by default the LS jvm will be invoked with doubled-up settings that are currently identical but from two different sources.We already have the safety of LS plugin that prevents instantiation if these settings are not properly applied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, yeah i did not think that through. I think file only is probably best. I'll update. Good catch.