Skip to content

Conversation

@cwperks
Copy link
Member

@cwperks cwperks commented Nov 16, 2023

Backport #3717 to 2.11

…pensearch-project#3717)

Modifies `SecurityResponse.asRestResponse` to use the corresponding
constructor for `BytesRestResponse` if the `SecurityResponse` contains
the content-type header. This adds a test that fails before the change
and demonstrates how using the constructor of BytesRestResponse without
content-type defaults to text/plain

---------

Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Stephen Crawford <steecraw@amazon.com>
Signed-off-by: Craig Perkins <craig5008@gmail.com>
Co-authored-by: Stephen Crawford <steecraw@amazon.com>
Co-authored-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com>
(cherry picked from commit b7f47b1)
Signed-off-by: Craig Perkins <cwperx@amazon.com>
@codecov
Copy link

codecov bot commented Nov 16, 2023

Codecov Report

Merging #3721 (1f84623) into 2.11 (1d46ba6) will increase coverage by 0.01%.
The diff coverage is 77.77%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               2.11    #3721      +/-   ##
============================================
+ Coverage     64.86%   64.88%   +0.01%     
- Complexity     3613     3622       +9     
============================================
  Files           273      273              
  Lines         20024    20054      +30     
  Branches       3346     3348       +2     
============================================
+ Hits          12989    13012      +23     
- Misses         5389     5400      +11     
+ Partials       1646     1642       -4     
Files Coverage Δ
...g/opensearch/security/filter/SecurityResponse.java 96.29% <100.00%> (+3.43%) ⬆️
...curity/securityconf/impl/AllowlistingSettings.java 77.77% <100.00%> (ø)
...curity/securityconf/impl/WhitelistingSettings.java 78.57% <100.00%> (ø)
...dlic/auth/http/saml/AuthTokenProcessorHandler.java 46.40% <50.00%> (ø)
.../org/opensearch/security/auth/BackendRegistry.java 62.83% <66.66%> (ø)
...opensearch/security/filter/SecurityRestFilter.java 64.84% <0.00%> (ø)
...ic/auth/http/kerberos/HTTPSpnegoAuthenticator.java 0.00% <0.00%> (ø)

... and 5 files with indirect coverage changes

@peternied
Copy link
Member

peternied commented Nov 16, 2023

In 2.11 we are seeing issues with windows runners taking a huge amount of time compared the 2.x / main branches. Going to bypass these checks for the 2.11.1 release that is waiting on this change being merged.

@peternied peternied merged commit 2dab119 into opensearch-project:2.11 Nov 16, 2023
peternied pushed a commit to peternied/security that referenced this pull request Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants