-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Use BC libraries to parse PEM files, increase key length, allow gener… #17393
Use BC libraries to parse PEM files, increase key length, allow gener… #17393
Conversation
❌ Gradle check result for 62d1786: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
62d1786
to
99b1e83
Compare
❌ Gradle check result for 99b1e83: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
99b1e83
to
ac4fa36
Compare
❌ Gradle check result for ac4fa36: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
ac4fa36
to
7a837ea
Compare
❌ Gradle check result for 7a837ea: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
7a837ea
to
bd18542
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17393 +/- ##
============================================
- Coverage 72.47% 72.36% -0.11%
+ Complexity 65693 65636 -57
============================================
Files 5304 5304
Lines 304981 304744 -237
Branches 44238 44190 -48
============================================
- Hits 221033 220531 -502
- Misses 65808 66192 +384
+ Partials 18140 18021 -119 ☔ View full report in Codecov by Sentry. |
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.
Thank you for splitting up the PR @beanuwave. I think this is much easier to review at half the number of files of the first PR. @reta when you have some time could you also take a look?
libs/ssl-config/src/main/java/org/opensearch/common/ssl/SslConfigurationLoader.java
Show resolved
Hide resolved
Indeed, thank you @beanuwave , I is much easier to reason about the change and it looks good to me. Overall, I would like to highlight only once concern here, we are bringing Bouncycastle to core (but to generalize - the whole ecosystem including clients, plugins, extensions, ....) as hard, non optional dependency (as for this change, through PS: We've already discussed the same concern on the original pull request #14912 |
@reta @cwperks I also don't know the right answer here, but my intuition is that it is probably okay to introduce this dependency. Going through your list of things in the ecosystem: Clients - I think this mainly means the Java high level REST client. I think we need to continue the work to move to opensearch-java where it has no dependency on the server. Plugins - they are already tightly coupled to the server (the run in the same JVM). Bringing this new transitive dependency doesn't seem too problematic to me. Extensions - the long-term goal of extensions should decouple it from the server implementation (including dependencies), but we're a long way from that being real so I don't see this as a show stopper either. My overall thought is that OpenSearch is not a general purpose library like Netty or Lucene, so we don't need to be quite so conservative with dependencies. If there are concrete examples of how a bouncycastle dependency will cause problems I'd be happy to change my mind though. |
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.
Thank you @beanuwave , @cwperks @andrross please take a look when you have time, thanks folks!
bd18542
to
163ac40
Compare
❌ Gradle check result for 163ac40: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
163ac40
to
9d181bd
Compare
❕ Gradle check result for 9d181bd: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
…al use of known cryptographic binary extensions, remove unused BC dependencies Signed-off-by: Igonin <[email protected]>
9d181bd
to
eb8f19d
Compare
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.
This change LGTM! Thank you for the persistence @beanuwave!
❌ Gradle check result for eb8f19d: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Igonin <[email protected]>
eb8f19d
to
d4a2bba
Compare
@beanuwave This is merged now. #14912 can be rebased. |
opensearch-project#17393) * Use BC libraries to parse PEM files, increase key length, allow general use of known cryptographic binary extensions, remove unused BC dependencies Signed-off-by: Igonin <[email protected]> * remove duplicated test permission Signed-off-by: Igonin <[email protected]> --------- Signed-off-by: Igonin <[email protected]> Co-authored-by: Igonin <[email protected]>
NOTE: Basically a split up from the original PR
Description
This PR should provide a smoother transition to FIPS 140 standard by eliminating deprecated code, increase security standards and use more standardized approach to parse key files.
Reasons for refactoring PemUtils, which is used by the Reindex API in cases of migrating data from a remote cluster that is TLS protected:
Lack of support for evolving standards like PKCS#8.
Password-Based Key Derivation Functions such as PBKDF-OPENSSL are not supported in FIPS mode in favor of the PBKDF2 standard.
Java type safety.
It is generally a good idea to let ASN1 annotation parsing be done by external security libraries.
Related Issues
opensearch-project/security#3420
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.