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] notebooks not working with OpenSearch 2.17 (using cognito authentication) #2267

Open
margussipria opened this issue Nov 28, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@margussipria
Copy link

What is the bug?
Notebooks do not work after migrating from 2.15 to 2.17 with cognito security enabled (probably anything requiring cookies)

How can one reproduce the bug?

  1. Go to '_dashboards/app/observability-notebooks#/'
  2. See error (in console only)
core.entry.js:15 
 GET https://domain/_dashboards//api/observability/notebooks/savedNotebook 403 (Forbidden)

core.entry.js:15 Detected an unhandled Promise rejection.
TypeError: Cannot read properties of null (reading 'message')

What is the expected behavior?
saved notebooks should be loaded even with cognito security.

What is your host/environment?

  • OS: Hosted OpenSearch_2_17_R20241112-P2 (latest)
  • Version 2.17
  • Plugins (defaults)

Do you have any additional context?
When opening notebooks after migration form version 2.15, notebooks are missing and session will die.

This is because ajax request /_dashboards/api/observability/notebooks/savedNotebook/ gets redirect response /_dashboards//api/observability/notebooks/savedNotebook (2 slashes and removed slash from end). during redirect cookies are not sent and response to redirect would be 403. Manually (with ALB) giving redirect url without 2 slashes results content returned correctly (cookies included).

There is 2 problems, original request is done to wrong URL and redirect is formatted wrongly. For calling of wrong route change was made at #1937.

route is https://github.com/opensearch-project/dashboards-observability/blob/main/server/routes/notebooks/noteRouter.ts#L278
and call is https://github.com/opensearch-project/dashboards-observability/blob/main/public/components/notebooks/components/main.tsx#L111 (probably also line 101)

@margussipria margussipria added bug Something isn't working untriaged labels Nov 28, 2024
@margussipria margussipria changed the title [BUG] [BUG] nodebooks not working with OpenSearch 2.17 (using cognito authentication) Nov 28, 2024
@ps48 ps48 removed the untriaged label Dec 4, 2024
@ps48 ps48 self-assigned this Dec 4, 2024
@ps48 ps48 changed the title [BUG] nodebooks not working with OpenSearch 2.17 (using cognito authentication) [BUG] notebooks not working with OpenSearch 2.17 (using cognito authentication) Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants