-
Notifications
You must be signed in to change notification settings - Fork 282
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
Refactors reRequestAuthentication to call notifyIpAuthFailureListener before sending the response to the channel #3411
Conversation
…isteners to be called before sending back the channel response Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #3411 +/- ##
============================================
+ Coverage 64.23% 64.27% +0.04%
Complexity 3491 3491
============================================
Files 264 264
Lines 20152 20152
Branches 3363 3364 +1
============================================
+ Hits 12944 12953 +9
+ Misses 5527 5526 -1
+ Partials 1681 1673 -8
|
…bled Signed-off-by: Darshit Chanpura <[email protected]>
1eb4ffc
to
fa46d36
Compare
Signed-off-by: Darshit Chanpura <[email protected]>
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.
Thank you @DarshitChanpura. Overall this looks like a really good change to me and I really like reducing the number of channel.sendResponses
because I really think there should just be a single place for that call.
The SAML flow is pretty confusing, but that pre-exists this PR.
Completely agree. SAML auth flow is slightly confusing and was tricky to navigate with the fix. |
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.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/security/backport-2.x
# Create a new branch
git switch --create backport/backport-3411-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 7924da13a57ecbf3352d84e6d020012723b81fa1
# Push it to GitHub
git push --set-upstream origin backport/backport-3411-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 |
… before sending the response to the channel (opensearch-project#3411) Prior to this change, the ip auth failure listener was not called upon challengeAuthenticator check invocation, which caused AddressBasedRateLimiter to not be invoked. With this change AddressBasedRateLimiter will be invoked upon multiple wrong requests from an ip. Signed-off-by: Darshit Chanpura <[email protected]> (cherry picked from commit 7924da1)
Description
Prior to this change, the ip auth failure listener was not called upon challengeAuthenticator check invocation, which caused AddressBasedRateLimiter to not be invoked. With this change AddressBasedRateLimiter will be invoked upon multiple wrong requests from an ip
Issues Resolved
Testing
Integration Testing (Adds a new test to verify the change)
When cluster was setup with Basic http challenge:
Before:
After:
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.