[Workspace]Deny get or bulkGet for global data source#8043
Merged
SuZhou-Joe merged 2 commits intoopensearch-project:mainfrom Sep 6, 2024
Merged
[Workspace]Deny get or bulkGet for global data source#8043SuZhou-Joe merged 2 commits intoopensearch-project:mainfrom
SuZhou-Joe merged 2 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Lin Wang <wonglam@amazon.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8043 +/- ##
==========================================
- Coverage 60.60% 60.59% -0.02%
==========================================
Files 3732 3732
Lines 88427 88431 +4
Branches 13701 13702 +1
==========================================
- Hits 53589 53581 -8
- Misses 31579 31591 +12
Partials 3259 3259
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
ruanyl
approved these changes
Sep 6, 2024
SuZhou-Joe
approved these changes
Sep 6, 2024
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Sep 6, 2024
* Deny get or bulkGet for global data source Signed-off-by: Lin Wang <wonglam@amazon.com> * Changeset file for PR #8043 created/updated --------- Signed-off-by: Lin Wang <wonglam@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit d22b68b) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Contributor
|
The backport to To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.17 2.17
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.17
# Create a new branch
git switch --create backport/backport-8043-to-2.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d22b68b3ea439fd97e0ed8363fb9fb79c1f89dd6
# Push it to GitHub
git push --set-upstream origin backport/backport-8043-to-2.17
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.17Then, create a pull request where the |
SuZhou-Joe
pushed a commit
that referenced
this pull request
Sep 6, 2024
* Deny get or bulkGet for global data source * Changeset file for PR #8043 created/updated --------- (cherry picked from commit d22b68b) Signed-off-by: Lin Wang <wonglam@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Sep 6, 2024
* Deny get or bulkGet for global data source * Changeset file for PR #8043 created/updated --------- (cherry picked from commit d22b68b) Signed-off-by: Lin Wang <wonglam@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 27cce8e) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe
pushed a commit
that referenced
this pull request
Sep 6, 2024
…#8056) * Deny get or bulkGet for global data source * Changeset file for PR #8043 created/updated --------- (cherry picked from commit d22b68b) (cherry picked from commit 27cce8e) Signed-off-by: Lin Wang <wonglam@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
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
This PR is for adding permission validation in saved objects client's
getorbulkGetmethods. Currently, a user can callget/bulkGetwith data source id for global data source (not assigned to any workspace). These two methods will throw error when operating on these global data sources.Issues Resolved
#8044
Screenshot
No UI changes
Testing the changes
yarn osd bootstrap --single-version ignoreconfig/opensearch_dashboards.ymlyarn start --no-base-pathtest-userwithkibanauserbackend rolesThese two commands should response
{"statusCode":403,"error":"Forbidden","message":"Invalid data source permission, please associate it to current workspace"}Changelog
Check List
yarn test:jestyarn test:jest_integration