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] Window reloads while executing any API in dev tools whose payload is not allowed #8991

Open
Minhal-111 opened this issue Nov 28, 2024 · 2 comments
Labels
bug Something isn't working build Build related additions or modifications

Comments

@Minhal-111
Copy link

Describe the bug

When attempting to execute any API in the Dev Tools with a payload that is not allowed, the screen not only throws an exception but also reloads

Related component

Build

To Reproduce

Execute any API in dev tools whose payload is not allow :

For e.g-

PUT _cluster/settings
{
  "transient": {
    "search.max_buckets": 5000
  }
}
{
  "Message": "Your request: '/_cluster/settings' payload is not allowed."
}

I understand that there are some APIs which can not be executed by the users however it should only throw an error and not reload the window/tab.

Expected behavior

Error should appear on the output screen without the tab being reloaded

Additional Details

No response

@Minhal-111 Minhal-111 added bug Something isn't working untriaged labels Nov 28, 2024
@github-actions github-actions bot added the build Build related additions or modifications label Nov 28, 2024
@Minhal-111 Minhal-111 changed the title [BUG] Window reloads while executing any API in dev tools whose payload is not allowed [BUG] Window reloads while executing any API in dev tools whose payload is not allowed with error: Nov 28, 2024
@Minhal-111 Minhal-111 changed the title [BUG] Window reloads while executing any API in dev tools whose payload is not allowed with error: [BUG] Window reloads while executing any API in dev tools whose payload is not allowed Nov 28, 2024
@dblock dblock transferred this issue from opensearch-project/OpenSearch Dec 2, 2024
@dblock dblock removed the untriaged label Dec 16, 2024
@dblock
Copy link
Member

dblock commented Dec 16, 2024

[Catch All Triage - 1, 2, 3]

@wanglam
Copy link
Contributor

wanglam commented Jan 3, 2025

According to the current implementation of dev tools proxy API will reuse the same status code from OpenSearch, I guess the API return 401 for not allowed requests.
It will be caught in the security dashboards plugin and trigger a window reload when status code is 401 according the implementation.
This reload logic will be used when config.ui.autologout is enabled, you can try to add opensearch_security.ui.autologout: false to config/opensearch_dashboards.yml to disable this automatic reload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build Build related additions or modifications
Projects
None yet
Development

No branches or pull requests

3 participants