-
Notifications
You must be signed in to change notification settings - Fork 163
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
Always show security screen and shows error page when trying to access forbidden data-source #1964
Always show security screen and shows error page when trying to access forbidden data-source #1964
Conversation
…s forbidden data-source Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
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.
Had a general question - can you also fix the tests?
Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
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.
Mostly LGTM, thanks for the thorough testing and videos for the change 👍
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.
Just some minor notes.
public/apps/configuration/panels/audit-logging/test/__snapshots__/audit-logging.test.tsx.snap
Show resolved
Hide resolved
public/apps/configuration/panels/tenant-list/test/__snapshots__/tenant-list.test.tsx.snap
Show resolved
Hide resolved
public/apps/configuration/panels/tenant-list/test/__snapshots__/tenant-list.test.tsx.snap
Show resolved
Hide resolved
public/apps/configuration/panels/test/__snapshots__/role-list.test.tsx.snap
Show resolved
Hide resolved
public/apps/configuration/panels/test/__snapshots__/role-list.test.tsx.snap
Show resolved
Hide resolved
@scrawfor99 addressed all comments and resolved conversations that were duplicates. Please resolve or comment on the open items so we can address those and bring them to closure. |
@DarshitChanpura Small nit on design. Can the "You do not have permissions text" be centered in the container? |
The change LGTM otherwise. Thank you @DarshitChanpura! |
@cwperks The alignment is handled by parent component in this case. AccessErrorComponent uses EuiPageContent, which defaults to center justified. If we want to align it correctly we will have to adjust parent component, since all the wrapper component align the text as left justified. |
b3e444f
into
opensearch-project:main
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-1964-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b3e444fa6f3af1410c10a937a44cb1b2fe0127cb
# Push it to GitHub
git push --set-upstream origin backport/backport-1964-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x Then, create a pull request where the |
…s forbidden data-source (opensearch-project#1964) Signed-off-by: Darshit Chanpura <[email protected]>
…trying to access forbidden data-source (#1964) (#1984) * Always show security screen and shows error page when trying to access forbidden data-source (#1964) Signed-off-by: Darshit Chanpura <[email protected]> * Fixes unit tests Signed-off-by: Darshit Chanpura <[email protected]> * Removes service account related changes Signed-off-by: Darshit Chanpura <[email protected]> --------- Signed-off-by: Darshit Chanpura <[email protected]>
Description
When a user with multi-data-source feature enabled tries to access the cluster, the Security tab will be rendered based on whether the user has access to connected OpenSearch cluster, and not on whether they have access to remote cluster. This is an inconsistent behavior. To fix this we will display Security tab always when
dataSource.enabled
feature flag is set to true.Changes addressed:
Category
New feature
Why these changes are required?
To promote seamless experience for multi-data-source users.
What is the old behavior before changes and new behavior after changes?
Before, admins of remote data-source could not access the security configuration features via dashboard.
With this change, admins will have config screen access to clusters it has access to. If they don't have access, a message along the lines
You do not have permission to view the data for <cluster-name>.
will be displayed.Issues Resolved
Testing
1. Only access to Remote DataSource using admin credentials
Screen.Recording.2024-05-24.at.10.22.01.PM.mov
Note: All refreshes that you seen in this video are manual refreshes to show that correct data-source is set in the url.
Screen.Recording.2024-05-24.at.10.18.41.PM.mov
2. Only access to Local DataSource (also remote data-source using admin credentials)
Screen.Recording.2024-05-24.at.10.25.47.PM.mov
Screen.Recording.2024-05-24.at.10.55.59.PM.mov
Currently, the remote data-source connection uses stored credentials to interact with remote data-source.
Check List
- [ ] New functionality has been documentedBy 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.