forked from opensearch-project/OpenSearch-Dashboards
-
Notifications
You must be signed in to change notification settings - Fork 0
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
add permission control service for saved objects and workspace saved objects client wrapper #230
Merged
wanglam
merged 31 commits into
ruanyl:workspace-pr-integr
from
wanglam:feat-add-workspace-saved-objects-client-wrapper-offcial-PR
Mar 6, 2024
Merged
Changes from 22 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
caa8035
feat: add basic workspace saved objects client wrapper
wanglam ab7c1ca
feat: add unit test (#2)
SuZhou-Joe 35a7605
feat: update client wrapper
raintygao 73b1de1
feat: init permission control in workspace plugin
wanglam 1e3c1b8
Support disable permission check on workspace (#228)
Hailong-am 48fea51
feat: add ACLSearchParams consumer in repository (#3)
SuZhou-Joe c84cb39
fix: ACLSearchParams missing in search dsl
wanglam cb97c2e
test: add integration test for workspace saved objects client wrapper
wanglam e3cf913
style: add empty line under license
wanglam cb2116e
test: enable workspace permission control for integration tests
wanglam 76a0bfc
feat: add workspace into includeHiddenTypes (#249)
SuZhou-Joe 78a3fed
fix workspace client wrapper integration tests
wanglam 036d032
add permissions fields to workspace CRUD APIs
wanglam 7804d6b
Move WorkspacePermissionMode inside workspace plugin
wanglam 719e5c2
Address pr comments
wanglam e1b0c55
Remove ACLSearchParams in public SavedObjectsFindOptions
wanglam 04f8602
Remove lodash and Add default permissionModes
wanglam 195ed9d
feat: address concerns on ensureRawRequest (#4)
SuZhou-Joe 6924115
Update annotations and error
wanglam b3f10df
Add unit tests for worksapce saved objects client wrapper
wanglam 9ed67c7
Remove getPrincipalsOfObjects in permission
wanglam 6386883
Fix permissionEnabled flag missed in workspace plugin setup test
wanglam adae252
Change back to Not Authorized error
wanglam 953e6c2
Fix unit tests for query_params and plugin setup
wanglam 70655ce
Fix unittests in workspace server utils
wanglam 43b0eb3
feat: add workspacesSearchOperators to decouple ACLSearchParams
SuZhou-Joe f16f1cc
feat: update test cases
SuZhou-Joe 60b3b02
feat: optimize test cases
SuZhou-Joe 2abdc57
feat: optimize comment
SuZhou-Joe 7fe7530
feat: omit defaultSearchOperator in public savedobjetcs client
SuZhou-Joe b36c380
feat: omit workspacesSearchOperator field
SuZhou-Joe 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
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.
Cannot really remember the difference of
ACLSearchParams.workspaces
vsSavedObjectsFindOptions.workspaces
, could you help me to recall? :DThere 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.
From the code, theSavedObjectsFindOptions.workspaces
support pass*
to match workspaces. TheACLSearchParams.workspaces
doesn't support that. @SuZhou-Joe Could we remove theACLSearchParams.workspaces
? It's a little bit confused.The
SavedObjectsFindOptions.workspaces
support*
to match all workspaces. It's using 'and' operator when generate search dsl. Here is the code.The
ACLSearchParams.workspaces
doesn't support*
to match all workspaces. It's using 'or' operator with permission modes and principals, which means used to find all permitted saved objects.They are the differences in the repository part.
In the
WorkspaceSavedObjectClientWrapper
, the ACLSearchParams.workspaces will be set to allpermitted
workspaces, if noworkspaces
passed. It will always return saved objects inner permitted saved objects.