Add BCFKS keystore generation utilities#6087
Add BCFKS keystore generation utilities#6087beanuwave wants to merge 2 commits intoopensearch-project:mainfrom
Conversation
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>
|
@beanuwave is it not possible to use java's keytool for this? i.e. |
@cwperks For example, consider a legacy JKS keystore using RSA-1024 and PBE-SHA1-3DES. Migrating it using command-line tools alone would require re-keying and re-issuing the certificate. Since RSA-1024 is outright rejected by FIPS and the weak PBE scheme prevents FIPS-mode tooling from unwrapping the private key - then repackaging into PKCS12 with FIPS-safe ciphers, and finally importing into BCFKS format that requires CA access: Given that we have 64 key/trust stores, which are only partially documented (only 3 out of 13 test directories include a README), I decided to take a different approach and handle the re-import in java. This also allows validating key strength upfront and failing fast with a clear error if material is encountered that FIPS would later reject at runtime. EDIT: This is also more future-proof: any change to the conversion logic - such as enforcing a minimum key strength - requires a single code change rather than hunting down and updating every README across the repository. |
|
@beanuwave can we also capture in a github issue that this script should have a sibling batch script? Other comment is that I think we can be assured that bc-fips jar is around in the OpenSearch installation now since its provided by the core under |
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>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6087 +/- ##
==========================================
+ Coverage 74.47% 74.83% +0.35%
==========================================
Files 446 447 +1
Lines 28423 28470 +47
Branches 4331 4327 -4
==========================================
+ Hits 21168 21305 +137
+ Misses 5245 5173 -72
+ Partials 2010 1992 -18 🚀 New features to boost your workflow:
|
Description
This PR includes documentation and utilities on how BCFKS keystores and truststore where created for #6059
The script log should look like this
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.