-
Notifications
You must be signed in to change notification settings - Fork 343
Only check validity of certs in the chain of the node certificates #4979
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
Only check validity of certs in the chain of the node certificates #4979
Conversation
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4979 +/- ##
==========================================
- Coverage 72.07% 72.01% -0.06%
==========================================
Files 336 336
Lines 22614 22648 +34
Branches 3554 3560 +6
==========================================
+ Hits 16298 16309 +11
- Misses 4543 4567 +24
+ Partials 1773 1772 -1
🚀 New features to boost your workflow:
|
Signed-off-by: Craig Perkins <[email protected]>
|
To generate new certs to add to the truststore I use commands like: To import the new cert to the truststore: The password for the test truststore is |
DarshitChanpura
left a comment
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.
Thanks @cwperks left couple of comments and couple of nits.
src/main/java/org/opensearch/security/ssl/config/KeyStoreUtils.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/ssl/config/KeyStoreUtils.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Craig Perkins <[email protected]>
…pensearch-project#4979) Signed-off-by: Craig Perkins <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]> Signed-off-by: Darshit Chanpura <[email protected]>
|
The backport to To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/security/backport-2.19 2.19
# Navigate to the new working tree
pushd ../.worktrees/security/backport-2.19
# Create a new branch
git switch --create backport/backport-4979-to-2.19
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 280d8e5fb80e7c0732a162ea9f682a75040593d3
# Push it to GitHub
git push --set-upstream origin backport/backport-4979-to-2.19
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/security/backport-2.19Then, create a pull request where the |
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.
Opening this in Draft as POC to start soliciting some feedback. Automated tests need to be added for different scenarios.
Bug fix
Issues Resolved
Related issue: #4949
See discussion on forum: https://forum.opensearch.org/t/is-this-an-issue-with-opensearch-or-the-security-plugin-upgrading-from-2-17-1-to-2-18-0/22395
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.