Facilitate FIPS-compliant store resolution#6059
Merged
cwperks merged 9 commits intoopensearch-project:mainfrom Apr 13, 2026
Merged
Facilitate FIPS-compliant store resolution#6059cwperks merged 9 commits intoopensearch-project:mainfrom
cwperks merged 9 commits intoopensearch-project:mainfrom
Conversation
47a78ed to
fb4339e
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6059 +/- ##
==========================================
+ Coverage 74.02% 74.65% +0.62%
==========================================
Files 441 447 +6
Lines 27461 28419 +958
Branches 4116 4331 +215
==========================================
+ Hits 20329 21216 +887
+ Misses 5196 5195 -1
- Partials 1936 2008 +72
🚀 New features to boost your workflow:
|
Signed-off-by: Iwan Igonin <iigonin@sternad.de> Co-authored-by: Benny Goerzig <benny.goerzig@sap.com> Co-authored-by: Karsten Schnitter <k.schnitter@sap.com> Co-authored-by: Kai Sternad <k.sternad@sternad.de>
Signed-off-by: Iwan Igonin <iigonin@sternad.de> Co-authored-by: Benny Goerzig <benny.goerzig@sap.com> Co-authored-by: Karsten Schnitter <k.schnitter@sap.com> Co-authored-by: Kai Sternad <k.sternad@sternad.de>
…er.getResource` for resource resolution and updated keystore file extensions to avoid double endings. Signed-off-by: Iwan Igonin <iigonin@sternad.de> Co-authored-by: Benny Goerzig <benny.goerzig@sap.com> Co-authored-by: Karsten Schnitter <k.schnitter@sap.com> Co-authored-by: Kai Sternad <k.sternad@sternad.de>
fb4339e to
d2c929f
Compare
…liant BCFKS stores. Signed-off-by: Iwan Igonin <iigonin@sternad.de> Co-authored-by: Benny Goerzig <benny.goerzig@sap.com> Co-authored-by: Karsten Schnitter <k.schnitter@sap.com> Co-authored-by: Kai Sternad <k.sternad@sternad.de>
d2c929f to
b625e85
Compare
582a8a7 to
1cf3309
Compare
Signed-off-by: Iwan Igonin <iigonin@sternad.de> Co-authored-by: Benny Goerzig <benny.goerzig@sap.com> Co-authored-by: Karsten Schnitter <k.schnitter@sap.com> Co-authored-by: Kai Sternad <k.sternad@sternad.de>
reta
reviewed
Apr 10, 2026
reta
reviewed
Apr 10, 2026
reta
reviewed
Apr 10, 2026
Collaborator
|
Thanks @beanuwave , the change makes sense to me, a few minor comments |
…e + path Signed-off-by: Iwan Igonin <iigonin@sternad.de> Co-authored-by: Benny Goerzig <benny.goerzig@sap.com> Co-authored-by: Karsten Schnitter <k.schnitter@sap.com> Co-authored-by: Kai Sternad <k.sternad@sternad.de>
…e `ClassLoader.getResource` logic + remove unused code Signed-off-by: Iwan Igonin <iigonin@sternad.de> Co-authored-by: Benny Goerzig <benny.goerzig@sap.com> Co-authored-by: Karsten Schnitter <k.schnitter@sap.com> Co-authored-by: Kai Sternad <k.sternad@sternad.de>
Signed-off-by: Iwan Igonin <iigonin@sternad.de> Co-authored-by: Benny Goerzig <benny.goerzig@sap.com> Co-authored-by: Karsten Schnitter <k.schnitter@sap.com> Co-authored-by: Kai Sternad <k.sternad@sternad.de>
reta
approved these changes
Apr 13, 2026
cwperks
reviewed
Apr 13, 2026
cwperks
reviewed
Apr 13, 2026
Member
cwperks
left a comment
There was a problem hiding this comment.
@beanuwave the changes LGTM, but can we add a README somewhere with instructions on how some of the trust stores were created? I believe we have a README outlining how some of the various test certs were generated.
cwperks
approved these changes
Apr 13, 2026
Member
cwperks
left a comment
There was a problem hiding this comment.
@beanuwave The change looks good to me and thanks for the thoroughness.
A couple comments and lmk what you think:
- I'd love to have it documented somewhere in the repo how the key stores are generated through a README or other markdown file. Since we're checking expiring certs into the repo, someone in the future will need to replace them and know how they were generated.
- I think we should use this opportunity to add a new CI check in the security repo to run the security plugin's
integrationTestagainst a cluster running in FIPS enforced mode since the security repo has a lot of coverage on different actions used on a cluster.
5 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Adds BCFKS keystore files alongside all existing JKS/PKCS12 test keystores in
src/test/resources/(excluding saml/ and on-behalf-token/), and updates test infrastructure to resolve the correct format at runtime.RestHelper.javaandAbstractSecurityUnitTest.javauseresolveStorePathfor all keystore/truststore loading.inferStoreType(resolvedPath)derives the KeyStore type from the resolved path extension, keeping type and format always consistent.inferStoreType(resolvedPath)is a clone from core-projects test-framework https://github.com/opensearch-project/OpenSearch/blob/5b95e609b5ee1bcf5a5452a152a861bbe8971f31/test/framework/src/main/java/org/opensearch/test/KeyStoreUtils.java#L37-L48Tests that explicitly exercise JDK store formats as part of their logic (
SslSettingsManagerReloadListenerTest.java,JdkSslCertificatesLoaderTest.java) are out of scope and will be handled separately in #5866Other changes:
KeyStore.getDefaultType()across keystore creationsites
KeyStoreUtils) now inherit the source store's type, preventing BCFKS key material from being re-encrypted into PKCS12PemKeyReader.detectStoreTypesniffs file bytes to distinguish JKS/PKCS12/BCFKSparseOtherNameinCertificateandDefaultSecurityKeyStoreto handle both JDK X.509 & BC X.509 encoding classes.Certificate.subjectAlternativeNames()andDefaultSecurityKeyStore.getSubjectAlternativeNames()into a sharedSanParserutility class.Check List
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.