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

Refactor SSL handler retrieval to use HttpChannel / TranportChannel APIs instead of typecasting #3917

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

reta
Copy link
Collaborator

@reta reta commented Jan 4, 2024

Description

This is cherry-pick from #3514 to use the channel properties instead of type-casting

Issues Resolved

Closes #3911

Is this a backport? If so, please add backport PR # and/or commits #

Testing

The change is covered by existing test suites

Check List

  • New functionality includes testing
  • New functionality has been documented
  • 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.

@reta
Copy link
Collaborator Author

reta commented Jan 4, 2024

Depends on opensearch-project/OpenSearch#11751

…PIs instead of typecasting

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
@reta reta marked this pull request as ready for review January 4, 2024 21:17
Copy link

codecov bot commented Jan 4, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (f216743) 65.20% compared to head (5a71b44) 65.18%.
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3917      +/-   ##
==========================================
- Coverage   65.20%   65.18%   -0.03%     
==========================================
  Files         298      298              
  Lines       21195    21181      -14     
  Branches     3456     3452       -4     
==========================================
- Hits        13821    13806      -15     
- Misses       5659     5664       +5     
+ Partials     1715     1711       -4     
Files Coverage Δ
...urity/ssl/transport/SecuritySSLRequestHandler.java 71.95% <100.00%> (+1.62%) ⬆️
...org/opensearch/security/filter/NettyAttribute.java 81.81% <85.71%> (ø)
.../opensearch/security/filter/OpenSearchRequest.java 76.92% <50.00%> (-2.03%) ⬇️

... and 3 files with indirect coverage changes

@willyborankin willyborankin added the backport 2.x backport to 2.x branch label Jan 5, 2024
@willyborankin willyborankin merged commit b038f93 into opensearch-project:main Jan 5, 2024
82 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

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.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/security/backport-2.x
# Create a new branch
git switch --create backport/backport-3917-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b038f93f9711f6a48e96fa82f5830534502d58f6
# Push it to GitHub
git push --set-upstream origin backport/backport-3917-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/security/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-3917-to-2.x.

@willyborankin
Copy link
Collaborator

@reta, could you please manually backport PR?

reta added a commit to reta/security that referenced this pull request Jan 5, 2024
…PIs instead of typecasting (opensearch-project#3917)

This is cherry-pick from
opensearch-project#3514 to use the
channel properties instead of type-casting

Closes  opensearch-project#3911

Is this a backport? If so, please add backport PR # and/or commits #

The change is covered by existing test suites

- [X] New functionality includes testing
- [X] New functionality has been documented
- [X] 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
(cherry picked from commit b038f93)
reta added a commit that referenced this pull request Jan 5, 2024
…TranportChannel APIs instead of typecasting (#3917) (#3922)

Backport of #3917 to
`2.x`
dlin2028 pushed a commit to dlin2028/security that referenced this pull request May 1, 2024
…PIs instead of typecasting (opensearch-project#3917)

### Description
This is cherry-pick from
opensearch-project#3514 to use the
channel properties instead of type-casting

### Issues Resolved
Closes  opensearch-project#3911

Is this a backport? If so, please add backport PR # and/or commits #

### Testing
The change is covered by existing test suites

### Check List
- [X] New functionality includes testing
- [X] New functionality has been documented
- [X] 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch backport-failed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Fix the hardcode instance of check for NettyAttribute
3 participants