Skip to content

Skip manual access checks when DocRequest-based authz is active#1209

Merged
joshuali925 merged 1 commit into
opensearch-project:mainfrom
DarshitChanpura:onboard-doc-request-authz
Jul 22, 2026
Merged

Skip manual access checks when DocRequest-based authz is active#1209
joshuali925 merged 1 commit into
opensearch-project:mainfrom
DarshitChanpura:onboard-doc-request-authz

Conversation

@DarshitChanpura

Copy link
Copy Markdown
Member

With request classes implementing DocRequest, the security plugin enforces resource-sharing authz before the transport action runs. Guard the legacy UserAccessManager.doesUserHasAccess calls behind !shouldUseResourceAuthz so they only apply in the pre-resource-sharing backend-role path, avoiding a duplicate (and inconsistent) check when resource sharing is enabled.

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

With request classes implementing DocRequest, the security plugin
enforces resource-sharing authz before the transport action runs.
Guard the legacy UserAccessManager.doesUserHasAccess calls behind
!shouldUseResourceAuthz so they only apply in the pre-resource-sharing
backend-role path, avoiding a duplicate (and inconsistent) check when
resource sharing is enabled.

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
@joshuali925
joshuali925 merged commit dbf3bdb into opensearch-project:main Jul 22, 2026
12 of 13 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.

2 participants