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] Copying Short URL is not adding the security_tenant query parameter #1769

Closed
devardee opened this issue Feb 6, 2024 · 5 comments
Closed
Assignees
Labels
bug Something isn't working triaged v2.13.0

Comments

@devardee
Copy link
Contributor

devardee commented Feb 6, 2024

What is the bug?

In Dashboards, to share visualizations we generate short url's and click on Copy link button. The copied url is not adding the security_tenant query parameter.

How can one reproduce the bug?
Steps to reproduce the behavior:
Adding the screen capture

What is the expected behavior?
The copied link should have the security_tenant query parameter. So that the short link can be resolved correctly.

What is your host/environment?

  • OS: iOS
  • Version: mainline [3.0.0]
  • Plugins: security plugin

Do you have any screenshots?
Yes

issue.mp4

Do you have any additional context?
No

@devardee devardee added bug Something isn't working untriaged labels Feb 6, 2024
@cwperks
Copy link
Member

cwperks commented Feb 6, 2024

@devardee There was a recent PR related to tenancy and short links that should resolve the tenant when the short URL is used: #1462

Edit: I see, the PR above will ensure the user gets logged into the tenant specified in the URL but this issue is around the copy link button not including the url param for security_tenant.

@sumukhswamy
Copy link

@cwperks I am facing a similar issue

trim_short.mov

where when I copy the link and open it in a new browser session, I get this error
{"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred."}

@scrawfor99
Copy link
Collaborator

[Triage] Hi @devardee, thanks for filing an issue. We can probably resolve this issue in a similar way to #1462, so we can close this when a fix is put in place to correct this behavior.

@cwperks
Copy link
Member

cwperks commented Feb 23, 2024

I reproduced the error on the 2.12 release and see this error in the dashboards logs.

opensearch-dashboards-1  | {"type":"log","@timestamp":"2024-02-23T15:50:14Z","tags":["error","http","server","OpenSearchDashboards"],"pid":1,"message":"TypeError: Cannot read properties of undefined (reading 'location')\n    at addTenantParameterToResolvedShortLink (/usr/share/opensearch-dashboards/plugins/securityDashboards/server/multitenancy/tenant_resolver.ts:213:46)\n    at /usr/share/opensearch-dashboards/plugins/securityDashboards/server/plugin.ts:130:46\n    at interceptPreResponse (/usr/share/opensearch-dashboards/src/core/server/http/lifecycle/on_pre_response.js:107:30)\n    at exports.Manager.execute (/usr/share/opensearch-dashboards/node_modules/@hapi/hapi/lib/toolkit.js:57:29)\n    at Request._invoke (/usr/share/opensearch-dashboards/node_modules/@hapi/hapi/lib/request.js:398:55)\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at Request._postCycle (/usr/share/opensearch-dashboards/node_modules/@hapi/hapi/lib/request.js:469:32)\n    at Request._reply (/usr/share/opensearch-dashboards/node_modules/@hapi/hapi/lib/request.js:448:9)"

@derek-ho
Copy link
Collaborator

Completed by @cwperks in: #1804

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

No branches or pull requests

5 participants