-
Notifications
You must be signed in to change notification settings - Fork 885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Workspace]Add permission control logic for workspace #6052
Merged
SuZhou-Joe
merged 33 commits into
opensearch-project:main
from
wanglam:feat-add-permission-control-for-workspace
Apr 3, 2024
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
f00c8f7
Add permission control for workspace
wanglam 9bdfbf7
Add changelog for permission control in workspace
wanglam bf9c5af
Fix integration tests and remove no need type
wanglam fbfe74a
Update permission enabled for workspace CRUD integration tests
wanglam e7279f9
Change back to config schema
wanglam 7ba2d5e
feat: do not append workspaces field when no workspaces present (#6)
SuZhou-Joe b72b670
fix: authInfo destructure (#7)
SuZhou-Joe 166e2c1
Fix permissions assign in attributes
wanglam 284e10d
Remove deleteByWorkspace since not exists
wanglam f99ca19
Merge remote-tracking branch 'origin/main' into feat-add-permission-c…
wanglam dd120e3
refactor: remove formatWorkspacePermissionModeToStringArray
wanglam b46caf5
Remove current not used code
wanglam e6c83e7
Add missing unit tests for permission control
wanglam 68969c3
Merge remote-tracking branch 'origin/main' into feat-add-permission-c…
wanglam 2f37567
Update workspaces API test describe
wanglam 87df794
Merge remote-tracking branch 'origin/main' into feat-add-permission-c…
wanglam 131b0e5
Fix workspace CRUD API integration tests failed
wanglam 3a1f63f
Address PR comments
wanglam 6e7a463
Store permissions when savedObjects.permissions.enabled
wanglam 78da4f5
Merge remote-tracking branch 'origin/main' into feat-add-permission-c…
wanglam 5d7d64f
Add permission control for deleteByWorkspace
wanglam 898ce8f
Merge remote-tracking branch 'origin/main' into feat-add-permission-c…
wanglam 128bf18
Merge remote-tracking branch 'origin/main' into feat-add-permission-c…
wanglam ff66b7a
Update src/plugins/workspace/server/permission_control/client.ts
SuZhou-Joe 81d6e28
Update src/plugins/workspace/server/permission_control/client.ts
SuZhou-Joe 88d449a
Merge remote-tracking branch 'origin/main' into feat-add-permission-c…
wanglam 26421b2
Merge remote-tracking branch 'origin/main' into feat-add-permission-c…
wanglam 76523f5
Refactor permissions field in workspace create and update API
wanglam 5854d93
Fix workspace CRUD API integration tests
wanglam 479dad4
Merge branch 'main' into feat-add-permission-control-for-workspace
SuZhou-Joe 94dafe5
Merge branch 'main' into feat-add-permission-control-for-workspace
SuZhou-Joe ee41fb5
Merge remote-tracking branch 'origin/main' into feat-add-permission-c…
wanglam e50b60c
Merge remote-tracking branch 'origin/main' into feat-add-permission-c…
wanglam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two newly added:
ACLSearchParams
andworkspacesSearchOperator
. Can we make sure that if no feature flag is enabled, it doesn't break the current functionality?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I've tried in my local cluster. The
ACLSearchParams
only be used in the new addedWorkspaceSavedObjectClientWrapper
, it won't change any existing logic if these options not provided. If feature flag is disabled, the saved objects withoutworkspaces
andpermissions
still can be find and return.The saved objects with
workspaces
orpermissions
property will using ACLSearch logic to find all saved objects. Here is the details:ACLSearchParams provided
It will return all saved objects that match
ACLSearchParams.principals
andACLSearchParams.permissionModes
.ACLSearchParams provided and workspacesSearchOperator === "OR" and options.workspaces provided
It will combine all saved objects that match
ACLSearchParams
and saved objects in theoptions.workspaces
.