Skip to content

Only check validity of certs in the chain of the node certificates #5256

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

willyborankin
Copy link
Collaborator

Description

This PR updates the certificate validation checks on bootup to limit validation to only the certificates within the chain of the node certificates. In 2.18.0 there was a change that validated all certificates contained in a bundle even if they were not part of the chain from the node certificates. Since those certs are not pertinent to OpenSearch, the validation does not need to occur.

Issues Resolved

[List any issues this PR will resolve]

Is this a backport? If so, please add backport PR # and/or commits #, and remove backport-failed label from the original PR.

Do these changes introduce new permission(s) to be displayed in the static dropdown on the front-end? If so, please open a draft PR in the security dashboards plugin and link the draft PR here

Testing

[Please provide details of testing done: unit testing, integration testing and manual testing]

Check List

  • New functionality includes testing
  • New functionality has been documented
  • New Roles/Permissions have a corresponding security dashboards plugin PR
  • API changes companion pull request created
  • 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.

Copy link

codecov bot commented Apr 8, 2025

Codecov Report

Attention: Patch coverage is 62.26415% with 20 lines in your changes missing coverage. Please review.

Project coverage is 71.75%. Comparing base (7603dc2) to head (e6220e2).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
.../opensearch/security/ssl/config/KeyStoreUtils.java 46.87% 14 Missing and 3 partials ⚠️
.../org/opensearch/security/ssl/SslConfiguration.java 81.25% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5256      +/-   ##
==========================================
+ Coverage   71.69%   71.75%   +0.05%     
==========================================
  Files         335      335              
  Lines       22740    22777      +37     
  Branches     3597     3603       +6     
==========================================
+ Hits        16304    16344      +40     
+ Misses       4640     4638       -2     
+ Partials     1796     1795       -1     
Files with missing lines Coverage Δ
...rch/security/ssl/config/KeyStoreConfiguration.java 66.66% <100.00%> (+1.87%) ⬆️
...h/security/ssl/config/TrustStoreConfiguration.java 63.15% <100.00%> (ø)
.../org/opensearch/security/ssl/SslConfiguration.java 77.19% <81.25%> (-1.66%) ⬇️
.../opensearch/security/ssl/config/KeyStoreUtils.java 53.09% <46.87%> (-3.23%) ⬇️

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

cwperks and others added 3 commits April 10, 2025 17:12
Added test to check behave

Signed-off-by: Andrey Pleskach <[email protected]>
@willyborankin willyborankin force-pushed the validate-certs-in-chain branch from e6220e2 to 911e5d4 Compare April 10, 2025 15:12
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