Skip to content

[BUG] URLs to other tenants do not work #1012

@adaisley

Description

@adaisley

Describe the bug

When I copy a Short URL (from the Share button), a security_tenant parameter is added to the end of the URL

e.g. http://myopensearch.server/goto/d4af12eaa1ba5d22b7f3007b14f1122f?security_tenant=T1

This link works if I am in the correct tenant, but if I am in a different tenant then this URL fails with the error

{"statusCode":404,"error":"Not Found","message":"Saved object [url/d4af12eaa1ba5d22b7f3007b14f1122f] not found"}

When using a non-shortened link, OpenSearch Dashboards loads but doesn't switch the tenant so it returns a "Could not locate that dashboard error" (see figure 5) which seems like the same issue, just returned in a nicer way.

To Reproduce
Steps to reproduce the behavior:

  1. Start with an OpenSearch installation with two (or more) tenants
  2. Navigate to a Visualisation or a Dashboard in the first tenant
  3. Click Share, then Copy link
  4. Navigate to the second tenant via the button at the top right
  5. Paste the copied URL from step 3 into the URL bar

Expected behavior
OpenSearch Dashboards should switch your current tenant and load the visualisation/dashboard that was shared with you (if you have access).

OpenSearch Version
2.0.0

Dashboards Version
2.0.0

Plugins
GET /_cat/plugins:

opensearch-alerting                  2.0.0.0
opensearch-anomaly-detection         2.0.0.0
opensearch-asynchronous-search       2.0.0.0
opensearch-cross-cluster-replication 2.0.0.0
opensearch-index-management          2.0.0.0
opensearch-job-scheduler             2.0.0.0
opensearch-knn                       2.0.0.0
opensearch-ml                        2.0.0.0
opensearch-notifications             2.0.0.0
opensearch-notifications-core        2.0.0.0
opensearch-observability             2.0.0.0
opensearch-performance-analyzer      2.0.0.0
opensearch-reports-scheduler         2.0.0.0
opensearch-security                  2.0.0.0
opensearch-sql                       2.0.0.0

Screenshots

Figure 1:
image
Link generated: http://myopensearch.server/goto/d4af12eaa1ba5d22b7f3007b14f1122f?security_tenant=T1

Figure 2:
image

Figure 3:
image

Figure 4:
image

Figure 5:
image

Host/Environment :

  • OpenSearch and OpenSearch Dashboards running on Docker
  • Chrome, Firefox and Edge report the same functionality

Additional context
We have encountered the same issue in 1.3.2, but seems to be okay if you replace the URL of the tab you're currently in, rather than opening a separate tab for the secondary tenant's link.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed, need help from community

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions