Skip to content
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

Make bouncycastle dependency abstracted #1500

Open
cjcjameson opened this issue Nov 1, 2021 · 8 comments
Open

Make bouncycastle dependency abstracted #1500

cjcjameson opened this issue Nov 1, 2021 · 8 comments
Assignees
Labels
enhancement New feature or request help wanted Community contributions are especially encouraged for these issues. triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable.

Comments

@cjcjameson
Copy link
Contributor

Is your feature request related to a problem? Please describe.

The problem is that security scans complain about bouncycastle from time-to-time. Perhaps we can upgrade / fix the CVEs, but perhaps we can workaround the security issue by removing bouncycastle

Describe the solution you'd like

@wjcarpenter can give more details, but some abstraction?

Describe alternatives you've considered

We will also follow-up for the specific bouncycastle CVE reports ; cc @nicolasbockg

@wjcarpenter
Copy link

Also, if you want to use BouncyCastle's BCFIPS provider for other things in the same environment/classpath, the two providers don't get along well. Working around it is kind of inconvenient.

The Search Guard plugin directly uses org.bouncycastle.crypto.generators.OpenBSDBrcypt from the BC provider, which is not present in the BCFIPS provider.

@setiah
Copy link

setiah commented Nov 3, 2021

What is a better alternative to bouncycastle we are considering here, which is less prone to CVE flagging?

Also could you please elaborate a bit more on the issue here

Also, if you want to use BouncyCastle's BCFIPS provider for other things in the same environment/classpath, the two providers don't get along well.

@wjcarpenter
Copy link

wjcarpenter commented Nov 9, 2021

The CVE factor is just one of a few reasons for wanting to swap out BouncyCastle. For example, an organization might have a policy dictating which Java crypto providers were acceptable for applications they use. One very important reason is the desire to use only FIPS 140-2 certified providers, for which the normal BouncyCastle BC provider is not acceptable. BouncyCastle does have a FIPS 140-2 certified BCFIPS provider, however, it is not possible to use them both on the same classpath. bcgit/bc-java#282 (Like many others, we have tried and seen the wreckage.)

Rather than hard-coding a specific provider in Search Guard plugin, it would be far better IMHO to state the algorithm/keysize requirements so that the consumer can use a Java crypto provide that meets those requirements. There would be no harm in having BC as a default in the Java code if there were some way to configure an override to that default.

@wjcarpenter
Copy link

It's probably the case that the majority of consumers are fine with using BC. It's just that when you need to replace it, you're really stuck. There is no workaround other than modifying the Search Guard source code.

@setiah
Copy link

setiah commented Nov 12, 2021

Thanks for the details. It makes sense to make the crypto providers configurable (yet with strong/popular defaults). A FIPS 140-2 provider also seems to be a popular feature ask on security plugin side https://discuss.opendistrocommunity.dev/t/opendistro-fips-140-compliance/2103,
#1497

Since the looks to be on Security plugin side, i'll transfer this issue to the security repo for further follow up.

@setiah
Copy link

setiah commented Nov 12, 2021

@CEHENKLE seems like I don't have permissions to transfer issue to security repo. Could you please help with this?

@CEHENKLE CEHENKLE transferred this issue from opensearch-project/OpenSearch Nov 12, 2021
@davidlago davidlago added the enhancement New feature or request label Nov 12, 2021
@davidlago davidlago added the triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable. label Oct 10, 2022
@duhang
Copy link

duhang commented Jan 30, 2023

Has this issue been put on OpenSearch Roadmap right?
We would really like to see this item being implemented.
Many thanks!

@peternied peternied added the help wanted Community contributions are especially encouraged for these issues. label Jan 30, 2023
@peternied
Copy link
Member

@duhang Thanks for your interest, this is not being tracked in any of the security plugin teams backlogs. If you are interested in seeing this happen in a future OpenSearch release I would love review a draft pull request. I've also added the help wanted tag to signal this.

gaobinlong pushed a commit to gaobinlong/security that referenced this issue Aug 30, 2023
… root dir of OSD (opensearch-project#1500)

* Add lint rule to forbid imports from packages

Signed-off-by: Craig Perkins <[email protected]>

* Add eslint rule to forbid imports from path containing packages/ from root dir of OSD

Signed-off-by: Craig Perkins <[email protected]>

---------

Signed-off-by: Craig Perkins <[email protected]>
Co-authored-by: Stephen Crawford <[email protected]>
Co-authored-by: Peter Nied <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Community contributions are especially encouraged for these issues. triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable.
Projects
None yet
Development

No branches or pull requests

7 participants