Skip to content

Conversation

@cwperks
Copy link
Member

@cwperks cwperks commented Nov 3, 2025

Description

Get list of headersToCopy from core and use getHeader(String headerName) instead of getHeaders()

This PR prevents creating a new map every time getHeaders() is called and only copies if any of the allowlisted headers are present on the request.

This PR will also fix compilation after associated PR in core was merged: opensearch-project/OpenSearch#19875

  • Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)

Enhancement

Check List

  • New functionality includes testing
  • New functionality has been documented
  • New Roles/Permissions have a corresponding security dashboards plugin PR
  • API changes companion pull request created
  • 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.

…me) instead of getHeaders()

Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
@cwperks
Copy link
Member Author

cwperks commented Nov 3, 2025

Need new min distribution for 3.4.0.0-SNAPSHOT for the bwc tests

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 73.33%. Comparing base (02022f3) to head (a3f185c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...opensearch/security/filter/SecurityRestFilter.java 93.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5769      +/-   ##
==========================================
+ Coverage   73.30%   73.33%   +0.03%     
==========================================
  Files         435      435              
  Lines       26501    26509       +8     
  Branches     3949     3952       +3     
==========================================
+ Hits        19427    19441      +14     
+ Misses       5194     5185       -9     
- Partials     1880     1883       +3     
Files with missing lines Coverage Δ
.../opensearch/security/OpenSearchSecurityPlugin.java 85.20% <100.00%> (ø)
...opensearch/security/filter/SecurityRestFilter.java 87.19% <93.33%> (+0.01%) ⬆️

... and 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DarshitChanpura DarshitChanpura merged commit e145180 into opensearch-project:main Nov 4, 2025
112 of 117 checks passed
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