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

[Backport 2.x] Refactors reRequestAuthentication to call notifyIpAuthFailureListener before sending the response to the channel (#3411) #3445

Conversation

DarshitChanpura
Copy link
Member

Backports #3411
(cherry picked from commit 7924da1)

Manual Backport is required because: BackendRegistry had conflicts due to OnBehalfOfAuthenticator not being present in 2.x but it exists in main.

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.

… 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)
@DarshitChanpura DarshitChanpura added the v2.11.0 Issues targeting the 2.11 release label Oct 3, 2023
@DarshitChanpura DarshitChanpura self-assigned this Oct 3, 2023
@DarshitChanpura DarshitChanpura changed the title [Backport 2.x] Refactors reRequestAuthentication to call notifyIpAuthFailureListener before sending the response to the channel (#3411)) [Backport 2.x] Refactors reRequestAuthentication to call notifyIpAuthFailureListener before sending the response to the channel (#3411) Oct 3, 2023
@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

Merging #3445 (4db1635) into 2.x (d7d8472) will increase coverage by 0.03%.
The diff coverage is 72.34%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #3445      +/-   ##
============================================
+ Coverage     64.58%   64.62%   +0.03%     
  Complexity     3510     3510              
============================================
  Files           260      260              
  Lines         19715    19715              
  Branches       3307     3308       +1     
============================================
+ Hits          12733    12740       +7     
+ Misses         5350     5343       -7     
  Partials       1632     1632              
Files Coverage Δ
...zon/dlic/auth/http/saml/HTTPSamlAuthenticator.java 69.02% <100.00%> (ø)
...ensearch/security/http/HTTPBasicAuthenticator.java 75.00% <100.00%> (-1.93%) ⬇️
...rch/security/http/HTTPClientCertAuthenticator.java 88.57% <100.00%> (ø)
...ity/http/proxy/HTTPExtendedProxyAuthenticator.java 84.00% <ø> (+3.23%) ⬆️
...ic/auth/http/jwt/AbstractHTTPJwtAuthenticator.java 59.09% <0.00%> (+0.66%) ⬆️
...mazon/dlic/auth/http/jwt/HTTPJwtAuthenticator.java 81.66% <0.00%> (+0.67%) ⬆️
...dlic/auth/http/saml/AuthTokenProcessorHandler.java 46.40% <83.33%> (-0.08%) ⬇️
...ensearch/security/http/HTTPProxyAuthenticator.java 76.00% <0.00%> (ø)
...ic/auth/http/kerberos/HTTPSpnegoAuthenticator.java 0.00% <0.00%> (ø)
.../org/opensearch/security/auth/BackendRegistry.java 61.48% <76.92%> (+0.85%) ⬆️

... and 3 files with indirect coverage changes

cwperks
cwperks previously approved these changes Oct 3, 2023
willyborankin
willyborankin previously approved these changes Oct 3, 2023
@DarshitChanpura DarshitChanpura dismissed stale reviews from willyborankin and cwperks via 4db1635 October 3, 2023 17:52
@DarshitChanpura
Copy link
Member Author

@cwperks @willyborankin Mind reviewing this again?

@DarshitChanpura DarshitChanpura merged commit 99d32d1 into opensearch-project:2.x Oct 3, 2023
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.11.0 Issues targeting the 2.11 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants