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

Ensure that challenge response contains body #4233

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Apr 11, 2024

Description

Included Unauthorized in the body of the challenge response to be consistent with the behavior from 2.10 and before.

  • Category

Bug fix

Issues Resolved

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.

willyborankin
willyborankin previously approved these changes Apr 11, 2024
@cwperks cwperks dismissed stale reviews from willyborankin and peternied via a05a28c April 16, 2024 00:06
@cwperks
Copy link
Member Author

cwperks commented Apr 16, 2024

@peternied I pushed a fix for the resource-focused tests. For each request in the test it was holding the response in memory which became larger since the response body was now populated. Instead of returning the entire request object, I changed it to only return the status code. This better isolates the resources being tested to the resources of the cluster and not of the test case.

@peternied
Copy link
Member

@cwperks Could you look into that test failure from SecurityInterceptorTests, doesn't look related - could you create an issue for follow up?

Copy link

codecov bot commented Apr 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.04%. Comparing base (d87ab3f) to head (a05a28c).
Report is 10 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4233      +/-   ##
==========================================
- Coverage   66.17%   66.04%   -0.14%     
==========================================
  Files         301      301              
  Lines       21708    21709       +1     
  Branches     3506     3506              
==========================================
- Hits        14365    14337      -28     
- Misses       5580     5610      +30     
+ Partials     1763     1762       -1     
Files Coverage Δ
...ensearch/security/http/HTTPBasicAuthenticator.java 72.72% <100.00%> (ø)

... and 5 files with indirect coverage changes

@cwperks
Copy link
Member Author

cwperks commented Apr 16, 2024

@cwperks Could you look into that test failure from SecurityInterceptorTests, doesn't look related - could you create an issue for follow up?

@peternied I am seeing AddressAlreadyInUse errors:

com.amazon.dlic.auth.http.saml.HTTPSamlAuthenticatorTest > shouldUnescapeSamlEntitiesTest2 FAILED
    java.net.BindException: Address already in use

I will file an issue to see if these errors can be systematically addressed. iirc it does port randomization, but I wonder if there can be port randomization with memory to not assign previously allocated ports.

Copy link
Member

@DarshitChanpura DarshitChanpura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cwperks Are we only focusing on BasicAuth for this one?

@cwperks
Copy link
Member Author

cwperks commented Apr 16, 2024

@cwperks Are we only focusing on BasicAuth for this one?

Yes, this was the instance where the response changed from 2.10 -> 2.11

Copy link
Member

@DarshitChanpura DarshitChanpura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@peternied peternied merged commit a528c91 into opensearch-project:main Apr 18, 2024
81 of 82 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 18, 2024
Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit a528c91)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dlin2028 pushed a commit to dlin2028/security that referenced this pull request May 1, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants