Skip to content

[Breaking Change] Corrects the security config constant name which uses trusted cas#513

Open
DarshitChanpura wants to merge 1 commit into
opensearch-project:mainfrom
DarshitChanpura:correct-security-constant
Open

[Breaking Change] Corrects the security config constant name which uses trusted cas#513
DarshitChanpura wants to merge 1 commit into
opensearch-project:mainfrom
DarshitChanpura:correct-security-constant

Conversation

@DarshitChanpura

Copy link
Copy Markdown
Member

Description

SecureRestClientBuilder currently is using node-certificate constant pemcert_filepath to build trust store. This is incorrect. It should be using pemtrustedcas_filepath to build a trust-store with root CAs

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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.

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
@DarshitChanpura
DarshitChanpura force-pushed the correct-security-constant branch from 99db999 to 7e666e0 Compare August 30, 2023 19:18
@codecov

codecov Bot commented Aug 30, 2023

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.50%. Comparing base (bae1bee) to head (7e666e0).
⚠️ Report is 140 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #513      +/-   ##
============================================
- Coverage     74.60%   74.50%   -0.11%     
+ Complexity      868      866       -2     
============================================
  Files           130      130              
  Lines          5632     5632              
  Branches        689      689              
============================================
- Hits           4202     4196       -6     
- Misses         1124     1129       +5     
- Partials        306      307       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


// These reside in security plugin.
public static final String OPENSEARCH_SECURITY_SSL_HTTP_PEMCERT_FILEPATH = "plugins.security.ssl.http.pemcert_filepath";
public static final String OPENSEARCH_SECURITY_SSL_HTTP_PEMTRUSTEDCAS_FILEPATH = "plugins.security.ssl.http.pemtrustedcas_filepath";

@lezzago lezzago Aug 30, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we go ahead with this breaking change, there should be issues created to each of the plugins that use this constant about this breaking change.

Affected plugins: https://github.com/search?q=org%3Aopensearch-project%20%22OPENSEARCH_SECURITY_SSL_HTTP_PEMCERT_FILEPATH%22&type=code

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also is it necessary to have a variable name change here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants