Skip to content

Clarify cluster node request classification - #6326

Open
cwperks wants to merge 2 commits into
opensearch-project:mainfrom
cwperks:agent/rename-cluster-node-request-helpers
Open

Clarify cluster node request classification#6326
cwperks wants to merge 2 commits into
opensearch-project:mainfrom
cwperks:agent/rename-cluster-node-request-helpers

Conversation

@cwperks

@cwperks cwperks commented Jul 25, 2026

Copy link
Copy Markdown
Member

What changed

  • rename HeaderHelper.isInterClusterRequest() to isLocalClusterNodeRequest()
  • rename HeaderHelper.isTrustedClusterRequest() to isRemoteClusterNodeRequest()
  • update authorization call sites, local variables, comments, and trace messages
  • add focused tests for the local and remote classifications

Why

The existing names invert current OpenSearch terminology: the
interClusterRequest transient represents a request from another node in the
local cluster, while trustedClusterRequest represents a node request from a
different cluster. The new names make security-sensitive branches easier to
audit.

This is a terminology-only change. The existing transient keys and request
classification behavior remain unchanged.

Validation

  • ./gradlew :precommit -Pcrypto.standard=FIPS-140-3
  • ./gradlew test --tests 'org.opensearch.security.support.HeaderHelperTests' -Pcrypto.standard=FIPS-140-3
  • ./gradlew citest --tests 'org.opensearch.security.support.HeaderHelperTests' -Pcrypto.standard=FIPS-140-3

Signed-off-by: Craig Perkins <craig5008@gmail.com>
@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

(Review updated until commit 67e70a8)

Here are some key observations to aid the review process:

🧪 PR contains tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ No major issues detected

Signed-off-by: Craig Perkins <craig5008@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Persistent review updated to latest commit 67e70a8

@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 54.16667% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.41%. Comparing base (30e36a1) to head (67e70a8).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...org/opensearch/security/filter/SecurityFilter.java 62.50% 0 Missing and 3 partials ⚠️
.../opensearch/security/OpenSearchSecurityPlugin.java 50.00% 1 Missing and 1 partial ⚠️
.../security/action/whoami/TransportWhoAmIAction.java 0.00% 2 Missing ⚠️
...rch/security/transport/SecurityRequestHandler.java 75.00% 2 Missing ⚠️
...ecurity/privileges/dlsfls/DlsFlsLegacyHeaders.java 0.00% 0 Missing and 1 partial ⚠️
.../org/opensearch/security/support/HeaderHelper.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6326      +/-   ##
==========================================
+ Coverage   75.32%   75.41%   +0.09%     
==========================================
  Files         456      456              
  Lines       29900    29924      +24     
  Branches     4520     4530      +10     
==========================================
+ Hits        22522    22568      +46     
+ Misses       5289     5262      -27     
- Partials     2089     2094       +5     
Files with missing lines Coverage Δ
...ecurity/privileges/dlsfls/DlsFlsLegacyHeaders.java 82.85% <0.00%> (ø)
.../org/opensearch/security/support/HeaderHelper.java 68.42% <0.00%> (ø)
.../opensearch/security/OpenSearchSecurityPlugin.java 84.37% <50.00%> (ø)
.../security/action/whoami/TransportWhoAmIAction.java 28.57% <0.00%> (ø)
...rch/security/transport/SecurityRequestHandler.java 57.92% <75.00%> (ø)
...org/opensearch/security/filter/SecurityFilter.java 68.60% <62.50%> (+0.12%) ⬆️

... and 11 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.

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.

1 participant