Skip to content
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

[BUG][NewHomePage] Avoid Requiring Index Write Permission for the New Homepage Loading #6320

Open
Flyingliuhub opened this issue Apr 3, 2024 · 6 comments
Labels
bug Something isn't working home v2.15.0

Comments

@Flyingliuhub
Copy link
Member

Flyingliuhub commented Apr 3, 2024

Describe the bug

The new homepage was introduced in the 2.13 release, which required index write permission when loading. However, this should be avoided as dashboard users may not have index write permission.

To Reproduce
Steps to reproduce the behavior:

  1. Enable useNewHomePage in the advance setting
  2. Open the homepage with users who only have readonly permission users
  3. The new homepage was broken with error message "There was an error loading the homepage."

Steps to reproduce the behavior in local cluster:

  1. Run OS with security plugin yarn opensearch snapshot --security
  2. Run osd yarn start --no-base-path
  3. Login with osd with admin user and enable newhome feature from advanced setting for Global tenant
  4. Copy the default role readall and add Global tenant read permission
  5. Create user test and map to the copied readall_copy role
  6. Login with osd with test user which created in the step 5
  7. Navigate to homepage

Expected behavior
The new home page loading should not required to index write permission

Impact
In case of admin enabled advance setting in the global tenant, all the readonly users under global tenant will impact when visit new home page.

OpenSearch Version
8.13.0

Dashboards Version
2.13.0

Plugins

All the official release plugins

Screenshots

image
newhomepageissue2.mov

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Browser and version [e.g. 22]

Additional context

{
    "statusCode": 403,
    "error": "Forbidden",
    "message": "no permissions for [indices:data/write/index] and User [name=xxx, backend_roles=[xxx], requestedTenant=null]: security_exception: [security_exception] Reason: no permissions for [indices:data/write/index] and User [name=xxxx, backend_roles=[xxxx], requestedTenant=null]"
}

@Flyingliuhub Flyingliuhub added bug Something isn't working untriaged labels Apr 3, 2024
@seraphjiang
Copy link
Member

Thanks @Flyingliuhub @ashwin-pc

@bbarani @wbeckler do you think we should conduct a patch release to include fix for this?

cc: @kgcreative @elfisher

@bbarani
Copy link
Member

bbarani commented Apr 3, 2024

Based on feedback from @ashwin-pc, this bug is in an opt-in feature and the new dashboard is not enabled by default so the risk is low. Please let me know if you think otherwise.

@seraphjiang
Copy link
Member

Based on feedback from @ashwin-pc, this bug is in an opt-in feature and the new dashboard is not enabled by default so the risk is low. Please let me know if you think otherwise.

not sure how we define the opt-in feature, compare the experimental feature , GA feature.

@Flyingliuhub Flyingliuhub removed their assignment Apr 4, 2024
@ananzh
Copy link
Member

ananzh commented Apr 24, 2024

@Flyingliuhub I am not able reproduce this. Here are my steps:

  • Add opensearch_security.auth.anonymous_auth_enabled: true in opensearch_dashboards. also set http:
    anonymous_auth_enabled: true in opensearch
  • I use global admin to set to use new home page
  • log out
  • remove login part from url and reload

Here is the video, and start at 40s
https://github.com/opensearch-project/OpenSearch-Dashboards/assets/79961084/2ae244dc-6c27-46cc-bf70-5392b4387312

@Flyingliuhub
Copy link
Member Author

Flyingliuhub commented Apr 24, 2024

@Flyingliuhub I am not able reproduce this. Here are my steps:

* Add opensearch_security.auth.anonymous_auth_enabled: true in opensearch_dashboards. also set http:
  anonymous_auth_enabled: true in opensearch

* I use global admin to set to use new home page

* log out

* remove login part from url and reload

Here is the video, and start at 40s https://github.com/opensearch-project/OpenSearch-Dashboards/assets/79961084/2ae244dc-6c27-46cc-bf70-5392b4387312

@ananzh You are visit default home, not newhome page, you need to visit the new home page for repro the issue

@ananzh ananzh added v2.15.0 and removed v2.14.0 labels May 4, 2024
@ananzh
Copy link
Member

ananzh commented May 4, 2024

@Flyingliuhub will revisit this in 2.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working home v2.15.0
Projects
None yet
Development

No branches or pull requests

6 participants