Declare workflow_state as child resource of workflow - #1455
Draft
DarshitChanpura wants to merge 1 commit into
Draft
Declare workflow_state as child resource of workflow#1455DarshitChanpura wants to merge 1 commit into
DarshitChanpura wants to merge 1 commit into
Conversation
Workflow state documents track the provisioning/execution state of a workflow template and have no independent access semantics, yet they were registered as a standalone resource type: access to them did not follow the parent workflow's shares, and state documents written without an authenticated user in the thread context (provisioning steps executed under system context) receive no sharing records at all. Declaring parentType/parentIdField on the workflow_state provider makes state documents inherit access from their workflow via the already-mapped workflow_id field. Requires opensearch-project/security#6373 for state documents written under system context to receive parent-linked sharing entries. Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1455 +/- ##
============================================
- Coverage 78.57% 78.50% -0.08%
Complexity 1315 1315
============================================
Files 106 106
Lines 6045 6047 +2
Branches 647 647
============================================
- Hits 4750 4747 -3
- Misses 1004 1010 +6
+ Partials 291 290 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
workflow_statedocuments track the provisioning/execution state of a workflow template and have no independent access semantics, yet they are registered with the resource-sharing framework as a standalone type. Consequences:ResourceIndexListenercannot attribute them)This declares
parentType/parentIdFieldon theworkflow_stateprovider so state documents inherit access from their workflow, via theworkflow_idfield already present in the state index mapping. Access evaluation in the security plugin delegates child→parent natively.Related PRs
Category
Bug fix
Testing
compileJava+ spotless pass; parent id field verified againstmappings/workflow-state.jsonBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.